-
Notifications
You must be signed in to change notification settings - Fork 46
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
Parallel assignment asserts do not work with icarus verilog #859
Comments
Very very tricky. I wonder if there's any way to configure Icarus to just throw errors the first time "x" appears instead of propagating "x"… seems unlikely, but just thought it might be worth poking around to see. |
One possible fix to this is using
I'm hoping that the effect of this is that we only execute the onehot check when the guards have defined values. |
#847 attempted to enable parallel assignment checking with the icarus backend but inadvertently made all tests fail (another argument for #755). The problem is that the
onehot
primitive returns false for constants with000x
wherex
is generated from unassigned ports causing the program to fail.Additionally, because the assertions are always active, even during cycles responsible for resetting undriven ports, the program will immediately fail. The likely fix is to add an additional guard in front that ensure that checking only occurs when reset if false.
Sadly, this is not as simple as
~reset & ~onehot(...)
because0 & x = x
in Verilog which is really really unfortunate.The text was updated successfully, but these errors were encountered: