blob: 7a4083605779d38970eca373494b03f4c24aecbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// D flip-flop Code
module d_ff ( d, clk, q, q_bar);
input d ,clk;
output q, q_bar;
wire d ,clk;
reg q, q_bar;
always @ (posedge clk)
begin
q <= d;
q_bar <= !d;
end
endmodule
|