1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00
2003-05-12 16:57:17 +00:00

19 lines
301 B
Verilog

module dff(q, d, clk, reset);
input d;
input clk;
input reset;
output q;
reg q;
always @(posedge clk or negedge reset) begin
if (reset == 0) begin
q <= 0;
end
else begin
q <= d;
end
end // always @ (posedge clk or negedge reset)
endmodule // inc