-
Notifications
You must be signed in to change notification settings - Fork 603
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
Recursively generate one-hot multiplexers for aggregates #1557
Conversation
acb0e37
to
9f26d89
Compare
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.
Can you show an example of what this changes and write a test to ensure we never regress on it?
Chisel would originally generate the following.
This change causes Chisel to emit the following instead.
I could only find tests which test functionality of the generated circuit, rather than properties of the generated FIRRTL. As this change does not affect functionality, how should it be tested? |
We have some patterns for checking the generated Verilog, but I'm not sure if it's worth it here. I poked around to see the existing tests; I think it would be nice to make the existing check actually check all of the indices rather than being a mere sanity check: https://github.com/freechipsproject/chisel3/blob/473a13877c60ba9fb13de47542a8397412c2b967/src/test/scala/chiselTests/OneHotMuxSpec.scala#L179 |
9f26d89
to
019ab7c
Compare
I modified the ParameterizedOneHotTesters to test all cases |
019ab7c
to
3ccb639
Compare
Looks like my suggestion was wrong, I'll fix it and merge this |
Thanks @jerryz123! |
Thanks for pushing this through, @jackkoenig . |
The primary motivation for this is to enable optimization passes over elements of an Aggregate that would otherwise be unable to propagate across the UInt conversion.
Type of change: feature request
Impact: no functional change
Development Phase: implementation
Release Notes