-
Notifications
You must be signed in to change notification settings - Fork 853
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
Inout port not working with array replication operator #4371
Comments
Is that supposed to be |
No, it is supposed to be the replication operator Basically, it should be converting the |
Ah I see, I didn't expect the 3'h5 to work in that context. I suspect this is the same underlying issue as #4370 with |
@alchitry From my experience in Amaranth I would recommend not letting Yosys deal with |
If this was just for a personal project, I would likely do just that. However, this is from the Lucid -> Verilog translator and making that generate vendor primitives would be the same as updating Yosys to do the same. For now, I understand the limitation and I'll document it in our tutorials. |
It would be less effort though since you no longer need to care about the batshit Verilog semantics. |
Version
Yosys 0.40+45 (git sha1 dd21955, g++ 13.2.1 -march=x86-64 -mtune=generic -O2 -fstack-protector-strong -fPIC -Os)
On which OS did this happen?
Linux
Reproduction Steps
I'm currently working on the new Lucid to Verilog translator for Alchitry Labs and come across a weird behaviour when working with
inout
ports and the array replication operator.With the replication syntax, all 5 LEDs light up when the first button is pressed.
If I change the line
IO_P_button = {3'h5{D_flip_q ? 1'bz : 1'h0}};
toIO_P_button = D_flip_q ? 5'bzzzzz : 5'h0;
it works as expected with each LED tied to its own button.I'm targeting the iCE40HX8K-CB132
Expected Behavior
When a button is pressed the corresponding LED lights up.
Actual Behavior
When the first (LSB) button is pressed, it lights up all the LEDs.
The text was updated successfully, but these errors were encountered: