-
Notifications
You must be signed in to change notification settings - Fork 298
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
[FIRRTL] SFCCompat: can select different values for a single invalid value #7677
Comments
@jackkoenig points out that this behaviour is documented in the FIRRTL dialect rationale: circt/docs/Dialects/FIRRTL/RationaleFIRRTL.md Lines 956 to 958 in f75bbd7
|
Right, I think we are violating the FIRRTL spec here, but what's missing is a reasonable way in the FIRRTL spec to define aggregate-typed registers that are partially reset. If we add a direct way to do that, we can remove that interpretation of invalid values and stop violating the spec 🙂. |
Yea, "look through connects and find invalids" is just flat broken. I don't see why we are doing that, other than for backwards (no longer a good reason) compatibility. It should be enough to pick a value for |
In general, we need to be actively choosing values for invalids to minimize the circuit. We haven't been doing this for SFCCompat reasons. |
Incidentally that is what's happening here though. The looking across allows us to remove reset from 2 registers rather than resetting them to the same value. I agree generally, but I maintain that we need the "invalid as no reset value" aspect of this until we have a better (and more direct) way to define partially reset registers. |
gives:
The resets for both registers are optimized away by SFCCompat, which implies that it selected
w = reg0
when loweringreg0
andw = reg1
when loweringreg1
. It should select a single value for the invalid value.The text was updated successfully, but these errors were encountered: