3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-30 15:00:26 +00:00

Allow initial blocks to be disabled during tests

Wrap initial blocks with a NO_INIT so that tests for archs without register initialization feature don't fail.
This commit is contained in:
Patrick Urban 2021-09-24 21:50:26 +02:00 committed by Marcelina Kościelnicka
parent 0a72952d5f
commit acb993b27b
6 changed files with 20 additions and 4 deletions

View file

@ -4,9 +4,11 @@ module dff ( input d, clk, output reg q );
endmodule
module dffe( input d, clk, en, output reg q );
`ifndef NO_INIT
initial begin
q = 0;
end
`endif
always @( posedge clk )
if ( en )
q <= d;