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 #82
Comments
Hi @scted, This sounds like a Migen issue, not something that is specific to symbiflow-examples? Migen issues can be reported as https://github.com/m-labs/migen Thanks, Tim @mithro Ansell
|
almost certainly migen ... was told to report anything remotely related to the examples (using the migen installed by the examples) here but will also post on m-labs |
@mithro FYI ... m-labs/migen#228 real issue with a workaround ... which is to assign the Cat object to an intermediate signal of equal size and then slice the intermediate signal do you know anything about ghdl? ... "Is this any good? https://github.com/ghdl/ghdl-yosys-plugin" m-labs think emitting vhdl would be better ... seems like verilog may be difficult and errorprone do i close this issue here or do you? #githubrookie
|
Hi @scted I did some a fast check how your example behaves in nMigen. Had to tweak the code a little to be nMigen compliant:
And I got the following Verilog:
The generated Verilog is much simpler than the one from migen. Also, it looks correct - slicing worked fine here. |
@kgugala ... cool ... might give nMigen a try and see what i can break:) ... interesting that Yosys is generating the code. |
Have spent a week on this so far. 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
In the code snippet (bottom), the 'lhs' and 'rhs' permutations (where slicing of the Cat_object is used) do not connect all the ins to the outs ... only the msb ends up being connected
The verilog produced for 'lhs' and 'rhs' (below) does something funky with 'slice_proxy0' and 'slice_proxy1' ...
The text was updated successfully, but these errors were encountered: