-
Notifications
You must be signed in to change notification settings - Fork 211
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
Migen - Cat() simulation not matching verilog when Cat_object is sliced #228
Comments
Does Verilog allow |
Sounds like i'm not doing anything wrong in that I'm using 'Cat' as it is intended to be used. Doesn't look hopeful for {x, y}[a:b] Note: lines 20 and 21 were my edits I haven't used verilog so don't really know if there are workarounds ... i might look more into the code for Cat and verilog.convert to see if i have any ideas. I don't think Yosys will be supporting VHDL anytime soon so I doubt switching to VHDL will be adopted by the Symbiflow community. |
Love Migen BTW ... definitely delivers on the promise of making HDLs Pythonic ... hope this can get sorted out |
With parentheses maybe? |
( {} )[] not working either ... i'll try the other idea |
Sigh, Verilog is such a pain.
Is this any good? https://github.com/ghdl/ghdl-yosys-plugin |
i don't know about ghdl ... will look at it the workaround worked ... assigning to an intermediate signal and slicing that do we leave this open? |
you can use Cat().l as the intermediate if you're careful ... 'l' doesn't make sense as an identifier if you are accessing both sides (l and r) of the wire ... Cat().l is not flat so this workaround not universal
|
Cat() not behaving as i expect when i use slices ... Cat_object[slice] ...
Have tried a number of permutations ... assigning to a slice ... Cat_object[n].eq(rhs) or from a slice ... lhs.eq(Cat_object[n])
The verilog (good and bad) has been tested in HW with both Vivado and Symbiflow ... it is not the toolchain that is a problem.
Possible that I do not understand how Cat is supposed to be used but the fact remains the simulation results differ from the produced verilog.
Code I used to test here: https://github.com/scted/Cat-demo
Snippet of one permutation (see TestRHSCat) here:
Output verilog ends up with only MSB being connected to an input. For some reason, 4 wires ... slice_proxy0[1:0] and slice_proxy1[1:0] are declared):
The text was updated successfully, but these errors were encountered: