-
Notifications
You must be signed in to change notification settings - Fork 299
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
[Arc] Hoist reset value in CompReg when lowering for simulation #6972
Conversation
As you pointed out, the ConvertToArcs pass supports zero-resets by adding them as operands to the Should we instead only apply this pattern if the reset value is non-zero? |
I updated it accordingly. I used a pattern match to check for constant zero instead of the naive |
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. Thanks for adding support!
If you want to be very thorough you could add a very small integration test with just a compreg that has a non-zero reset value since this patch assumes that the arc canonicalizer will always be run before ConvertToArcs. So, if someone changes the Arcilator pipeline, the loss of support could go unnoticed.
I wanted to do that and forgot about it! Good idea. |
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.
Nice, thanks!
Very cool, thanks for adding this! 🥳 |
Arcilator currently does not support non-zero reset values for compreg. This change canonicalizes reset values to a mux on the input, as it currently makes no difference for simulation purposes, and sidesteps the reset value limitations.