You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
Note that the asAsyncReset and asClock folds should likely happen, but the cleanest representation would be to use asyncreset and clock literals (which do not exist).
The text was updated successfully, but these errors were encountered:
The following constants are not folded when they likely should be:
asAsyncReset(const) -> const
asClock(const) -> const
cvt(const) -> signed(const)
mul(0, _) -> 0
,mul(_, 0) -> 0
,mul(0, 0) -> 0
div(0, _) -> 0
div(0, _)
vs.div(0, 0)
? This may also match everyone's favorite controversial folddiv(a, a) -> 1)
. 😉rem(0, _) -> 0
To demonstrate any of these, you can construct a circuit like the following for
asClock
:If constant propagation succeeds, then register
r_1
will be removed. If it doesn't, then it hangs around. E.g., the above produces:It should produce:
For a complete list of all tests, these are currently available in this branch: https://github.com/llvm/circt/blob/760d069d8ea7cac610f6ad22d962b1d9475458a8/test/Dialect/FIRRTL/SFCTests/invalid-reg-pass.fir. (These were generated using this script.) Anything that looks like a missed constant prop is marked with an
<--
. These useis invalid
instead of constant zero, but it's the same thing during constant propagation in the Scala FIRRTL compiler as invalids are converted to constant zero.Note that the
asAsyncReset
andasClock
folds should likely happen, but the cleanest representation would be to use asyncreset and clock literals (which do not exist).The text was updated successfully, but these errors were encountered: