yosys/tests/arch/common/dffs.v

16 lines
285 B
Verilog
Raw Permalink Normal View History

2019-10-18 12:50:24 +02:00
module dff ( input d, clk, output reg q );
always @( posedge clk )
q <= d;
endmodule
2019-10-18 12:50:24 +02:00
module dffe( input d, clk, en, output reg q );
`ifndef NO_INIT
initial begin
2019-10-18 12:50:24 +02:00
q = 0;
end
`endif
2019-10-18 12:50:24 +02:00
always @( posedge clk )
if ( en )
q <= d;
endmodule