-
Notifications
You must be signed in to change notification settings - Fork 925
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
Wrong error message mentioning defparam when overriding localparam #4927
Comments
Or for extra fun, calling I suspect the pre-parsing to AST treats the parameter assignment as equivalent to a defparam, and doesn't distinguish between the two when it then tries to derive the design. |
i.e. Wrong error message mentioning defparam when overriding localparam #4927
Previously abstract cells would only be derived if there was no top module declared, this means that `-check` would miss certain kinds of errors that it would normally detect. This fixes #4927.
The work around here is to call (e.g.)
Turns out trying to get the missing parameter error from |
I realize there was actually another issue in the reported error message. |
I think this might actually be better as an assertion error; I don't know how you would end up with a non-constant module name unless the AST was malformed so I don't think there is any case where this error is appropriate... |
Version
Yosys 0.50+56 (git sha1 9106d6b, g++ 14.2.1 -march=x86-64 -mtune=generic -O2 -fno-plt -fexceptions -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/home/prostboa/Dev/AUR/yosys-git/src=/usr/src/debug/yosys-git -flto=auto -fPIC -O3)
On which OS did this happen?
Linux
Reproduction Steps
Try to synthesize this (erroneous) design:
Synthesize with this command:
yosys -l yosys.log -p "synth_xilinx -arch xc7 -top top ; write_json top.json" top.v
Expected Behavior
The error message should indicate that overriding localparams is illegal, and indicate the name of the related parameter.
So the root cause of the error can be found even in a very large design.
Actual Behavior
The error message mentions defparams, which is very misleading because defparam is a verilog keyword that is not used in the design.
The error message is extremely difficult to understand and does not indicate what parameter is related to the issue:
The text was updated successfully, but these errors were encountered: