You are on page 1of 1

D – Flip flop

module d_ff(d,clk,q,q1);
input d,clk;
output q,q1;
reg q,q1;
initial begin
q=1'b0;q1=1'b1;
end
always @(posedge clk)
begin
q=d;
q1=~d;
end
endmodule

You might also like