-
Notifications
You must be signed in to change notification settings - Fork 532
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
No error or warning reported when a vector lsb or msb value contains x
or z
bits
#1140
Comments
Division by 0 in Verilog results in a value of all 'x. Its not an error. |
for normal registers, I would agree. but this is being used to set a localparam, then to size a new vector. |
The error messages you quote don't come from iverilog. Compiling your code with iverilog, I get
That is because there is a missing semicolon after the module port list. Adding the semicolon allows the code to compile without error. |
Closing as invalid. Feel free to reopen if you can provide a simple test case that demonstrates a problem when compiled with iverilog. |
This reproduces the issue. It just seams that something like this would produce a warning or error message. module top();
localparam LP = 4'b000x;
wire [LP:0] test_wires;
endmodule |
If you can find anything in the standard that suggests something is being done incorrectly please let us know. |
OK, yes, this is a different issue to the one you originally reported. Your original example doesn't use In traditional Verilog, the msb or lsb expressions are required to be integer expressions. The standard expression evaluation rules cause any |
x
or z
bits
I have a fix for this specific issue, but there are still other places where an undefined/high-Z value in a constant is not being handled properly. |
FYI I'm changing this to a bug since it is giving invalid/unexpected results without a warning. |
When I run the above code and simulate with IVerlog, The only error message I get is
There is no dump file or any output.
The text was updated successfully, but these errors were encountered: