Prev Problem
Next Problem

83. T Flip-Flop

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

Code

module t_ff (
    input  CLK,
    input  T,
    output reg Q
);
    always @(posedge CLK)
    begin
        if(T == 1'b0)
            Q <= Q;
        else
            Q <= ~Q;
    end
    
endmodule

 

Was this helpful?
Upvote
Downvote