Tested with Yosys 0.37+29 (git sha1 3c3788ee2, clang 10.0.0-4ubuntu1 -fPIC -Os)
.
The mismatch is confirmed by Icarus Verilog.
No x
or z
values are involved.
How to reproduce:
bash run.sh
This will:
- Create
top_opt.sv
, the optimized version oftop_noopt.sv
. - Run a simple simulation of
top_opt.sv
andtop_noopt.sv
with Icarus Verilog. - Report a mismatch.
Expected output (the output should not be affected by the optimizations):
no optimization
Output: 00000000
with optimization
Output: 00000000
Actual output:
no optimization
Output: 00000000
with optimization
Output: ffffffff