Program:
module t_ff
(input t,clk,output reg q);
wire q_bar;
not(q_bar,q);
initial
begin
q = 1'b0;
end
always@(posedge clk)
begin
if(!t)
q = q;
else
q = q_bar;
end
endmodule
Program:
module t_ff
(input t,clk,output reg q);
wire q_bar;
not(q_bar,q);
initial
begin
q = 1'b0;
end
always@(posedge clk)
begin
if(!t)
q = q;
else
q = q_bar;
end
endmodule