-
Notifications
You must be signed in to change notification settings - Fork 647
Support emitting variadic cat #4992
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
Conversation
|
Woohoo! Glad it was easy 😁 🤞 . Can't wait to never see hi_hi_lo_lo_hi_lo_hi_hi in FIRRTL source again! 😉 |
efff5f9 to
d4b30b0
Compare
To avoid emitting nodes simply to cast SInts to UInts, improve the internal IR with PrimExpr which are primitive expressions.
d4b30b0 to
35486ce
Compare
|
Ready for review at your leisure @seldridge. I think we separately also need to bump the emitted Firrtl Version before 7.0 release. I'm running an internal smoke test to make sure there are no surprises but I'm not worried. |
seldridge
left a comment
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
| chirrtl should include("node lo_lo = cat(in[6], in[7])") | ||
| chirrtl should include("node lo_hi = cat(in[4], in[5])") | ||
| chirrtl should include("node hi_lo = cat(in[2], in[3])") | ||
| chirrtl should include("node hi_hi = cat(in[0], in[1])") | ||
| chirrtl should include("cat(in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7])") |
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.
This looks a lot nicer!
Initial version was surprisingly easy, but ended up being a little more complicated because I added support to Chisel's internal IR for complex expressions instead of every expression also being a Statement.
Contributor Checklist
docs/src?Type of Improvement
Desired Merge Strategy
Release Notes
This should not be visible to most users unless they inspect emitted
.fir. It reduces memory use, improves performance, and reduces the size of emitted.fira little bit, ~2-5% depending on the design.Reviewer Checklist (only modified by reviewer)
3.6.x,5.x, or6.xdepending on impact, API modification or big change:7.0)?Enable auto-merge (squash)and clean up the commit message.Create a merge commit.