[LLHD] Make Deseq pass emit seq.firreg instead of seq.compreg #8662
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The LLHD Deseq pass detects clocks and optional asynchronous resets. It currently, mistakenly, creates
seq.compreg
ops with those clocks and resets. Theseq.compreg
op turns out to have a synchronous reset though, making the lowering invalid. Use theseq.firreg
op instead, as it allows the reset type to be specified explicitly. This requries an additionalcomb.mux
to be created for potential enable signals, whichseq.firreg
does not support directly.We should really nail down the semantics of
seq.compreg
in a follow-up commit. The documentation is very vague, and Deseq is likely not the last pass mistakenly assuming the explicit reset ofseq.compreg
is assumed to be asynchronous.