diff options
author | Patrick Urban <patrick.urban@web.de> | 2021-09-24 21:50:26 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-11-13 21:53:25 +0100 |
commit | acb993b27b7027112bf10796efbf2886815f8630 (patch) | |
tree | 6dbc12ce01fc730770eedfbff7131374b299b5cc /tests/arch/common/shifter.v | |
parent | 0a72952d5f259a23f9d1122d936d3d4d60ce224d (diff) | |
download | yosys-acb993b27b7027112bf10796efbf2886815f8630.tar.gz yosys-acb993b27b7027112bf10796efbf2886815f8630.tar.bz2 yosys-acb993b27b7027112bf10796efbf2886815f8630.zip |
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.
Diffstat (limited to 'tests/arch/common/shifter.v')
-rw-r--r-- | tests/arch/common/shifter.v | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/arch/common/shifter.v b/tests/arch/common/shifter.v index 3030608ab..06e63c9af 100644 --- a/tests/arch/common/shifter.v +++ b/tests/arch/common/shifter.v @@ -1,7 +1,13 @@ module top(out, clk, in); output [7:0] out; input signed clk, in; - reg signed [7:0] out = 0; + reg signed [7:0] out; + +`ifndef NO_INIT + initial begin + out = 0; + end +`endif always @(posedge clk) begin |