-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in AND-reduction #2300
Labels
area: wrong runtime result
Issue involves an incorrect runtine result from Verilated model
resolution: fixed
Closed; fixed
Comments
wsnyder
added a commit
that referenced
this issue
Apr 30, 2020
Thanks for the good test. This should have been covered in the test suite, sorry for the hole. Fixed towards v4.034. |
Closed
Thanks! I have to say, the tree dumps with |
jackkoenig
added a commit
to chipsalliance/firrtl
that referenced
this issue
May 1, 2020
Workaround for verilator/verilator#2300 present in Verilator versions v4.026 - v4.032. This transform turns AND reductions for expressions > 64-bits into an equality check with all ones. It is included in all Verilog emitters.
14 tasks
Did this also affect bitwise-or/xor/xnor reductions? |
No, I tested the others too and didn't find any issue. |
This was referenced May 6, 2020
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: wrong runtime result
Issue involves an incorrect runtine result from Verilated model
resolution: fixed
Closed; fixed
I have created a repo that illustrates the issue: https://github.com/jackkoenig/verilator-and-reduction-bug
Commit of the above repo at time of filing issue: 9a38b944bd9909d32611ed3c0a920a3f49170fd5
Pasted from README:
It seems there is a bug in handling of AND-reduction (and possibly other reductions, I haven't checked) for wires with >64-bits. I have confirmed the buggy behavior in versions >= 4.026.
This test case compares the results of equivalent operations AND-reduce and checking equality with all ones for a 68-bit register:
To reproduce, setup verilator and run:
On versions < 4.026 you will see the correct output:
For versions >= 4.026, you will see the incorrect output:
The text was updated successfully, but these errors were encountered: