You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above RTLIL was created by a code generator. It seems unlikely that a designer would intentionally create a wire that is 4 billion bits wide, so it might be nice to produce a warning or error which points to the oversized wire instead of (or in addition to) printing an error at the attempt to slice that wire.
As someone who is still learning the toolchain, it was not immediately clear to me why the parser complained about slicing the first 32 bits out of a value, but I can understand that a wire should not be billions of bits wide under normal circumstances.
Actual behavior
The parser points to this line as the source of the problem:
assign \y $1 [31:0]
In a larger design, the problematic RTLIL line will probably be located among many similar (and valid) statements, which makes it harder to track down the real source of the problem.
In my case, I was designing an ALU with a variety of operations, and only the left-shift one produced this issue. When I looked at the RTLIL line which Yosys me pointed to, I couldn't tell why that particular assign \y statement would cause issues when it was surrounded by dozens of almost identical statements which the parser seemed happy with.
Thank you!
The text was updated successfully, but these errors were encountered:
Steps to reproduce the issue
Attempt to parse the following RTLIL:
To test, save the above RTLIL as
bug.il
and run:yosys -q -p "read_ilang bug.il; write_verilog bug.v;"
Observe:
ERROR: Parser error in line 24: invalid slice
Expected behavior
The above RTLIL was created by a code generator. It seems unlikely that a designer would intentionally create a wire that is 4 billion bits wide, so it might be nice to produce a warning or error which points to the oversized wire instead of (or in addition to) printing an error at the attempt to slice that wire.
As someone who is still learning the toolchain, it was not immediately clear to me why the parser complained about slicing the first 32 bits out of a value, but I can understand that a wire should not be billions of bits wide under normal circumstances.
Actual behavior
The parser points to this line as the source of the problem:
assign \y $1 [31:0]
In a larger design, the problematic RTLIL line will probably be located among many similar (and valid) statements, which makes it harder to track down the real source of the problem.
In my case, I was designing an ALU with a variety of operations, and only the left-shift one produced this issue. When I looked at the RTLIL line which Yosys me pointed to, I couldn't tell why that particular
assign \y
statement would cause issues when it was surrounded by dozens of almost identical statements which the parser seemed happy with.Thank you!
The text was updated successfully, but these errors were encountered: