Closed westonMS closed 2 years ago
If the Ternary operation is not in parenthesis, the bug will not occur
Thanks for reporting, we will investigate this.
This should be already fixed, please update the plugin to the newest version as described here to verify.
I have re-tested this with the latest plugin and the design works now. However, we want fixes to be available to all users when they use the main install. I re-installed the tool-chain with the latest install instructions and this is not fixed without manually updating the plugin.
@Zach227 the environment for xc7 was updated very few hours ago: https://github.com/chipsalliance/f4pga-examples/commits/main. Did you fetch and pull the latest changes from the main branch 2h ago (when you wrote the comment)?
I retested this with the latest update and the issue is now resolved.
Shift-Ternary Bug
Using Surelog plugin, with Yosys, Yosys gives the following bug
ERROR: Unsupported expression in mark_as_unsigned!
Yosys parser is able to compile the program without using Surelog
The error is caused by a shift operator followed by a ternary operator. Shifting either directions causes the bug. So does the
<<<
or>>>
shift operator. Problem Statement :(0)<<(0)?(0):(0);
Simplified code that causes error:
Source code generated using Verismith