-
Notifications
You must be signed in to change notification settings - Fork 308
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
[HWLegalizeModules] Lower types-like packed array handling (#5355) #6402
Conversation
CC @uenoku @seldridge . The impetus for this was #6324; this patch fixes the test case provided there. Note that this is my first CIRCT PR, so I'm not surprised if there are nits/things I can/should do better. I'm open to guidance, so fire away :) . |
Note also that while the form here should in theory support nested arrays, I only briefly tried it, and it needs some more TLC for that to work, which I don't really have time to continue to track down now, but at least it shouldn't crash. (I can spend more time addressing feedback on what's already here though, ofc). Likewise, I'm sure there are several other missing use cases that this pass should eventually support, which are not done here, but this should be a (big) step in the right direction. I'm happy to follow up if pinged about specific issues relating to expanding this code. (I may also do some follow-up work on this anyways as it was quite fun!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really great! I have one feedback regarding iterator update but otherwise LGTM
@jackkoenig FYI |
Nice, I wonder if we're going to need this for firtool used by the Chisel 5.x line. |
751393c
to
29cf79d
Compare
@uenoku feedback addressed, cheers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR refactors HWLegalizeModules to something more like existing lower types passes in order to support more complex patterns such as array concatenations. Several new tests are also added. Fix llvm#5355.
29cf79d
to
bf712b0
Compare
I'm going to merge the PR. Thank you for the contribution and making chisel workable with yosys again! |
Cheers, and thanks for making contributing to CIRCT a great experience! |
This PR refactors HWLegalizeModules to something more like existing lower types passes in order to support more complex patterns such as array concatenations. Several new tests are also added.
Fix #5355.