mirror of https://github.com/YosysHQ/yosys.git
15 lines
185 B
Verilog
15 lines
185 B
Verilog
|
// 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
|