Prev Problem
Next Problem

79. DFF with Synchronous Reset

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

Code

module dff_sync_reset (
    input  CLK,
    input  RST,
    input  D,
    output reg Q
);
    always @(posedge CLK or posedge RST)
    begin
        if(RST == 1'b1)
            Q <= 1'b0;
        else
            Q <= D;
    end
    
endmodule

 

Was this helpful?
Upvote
Downvote