Program:
module d_ff
(input d,clk,output reg q);
wire q_bar ;
not(q_bar,q) ;
always@(posedge clk)
begin
if(!d)
begin
q = 0;
end
else
begin
q = 1;
end
end
endmodule
Program:
module d_ff
(input d,clk,output reg q);
wire q_bar ;
not(q_bar,q) ;
always@(posedge clk)
begin
if(!d)
begin
q = 0;
end
else
begin
q = 1;
end
end
endmodule