-
Notifications
You must be signed in to change notification settings - Fork 366
[circt-bmc] Support registers with reset signals #8622
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
Conversation
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.
Hey @liuyic00, thanks for adding this!! It looks good to me - would you be able to also add a circt-bmc integration test for this functionality? Maybe something like a register with an initial value of 1 and a reset value of 0, and you check that it's possible for the register value to be 0 (obviously you'll have to make sure the time bound isn't high enough for the register to wrap round back to 0). I think after that this should be ready to merge!
Thanks for the review!! The integration test has been added. By the way, I will keep working on |
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.
Integration test looks good to me, thanks!
Very exciting that you'll be pushing for Chisel ingestion - what features do you still need that circt-bmc is currently missing? Very happy to give pointers where I can, and feel free to request reviews from me etc.!
For a small example, we still need the support of:
I will open another PR for |
Cool! Do you need async resets for the designs with firregs that you're looking at? I guess with synchronous resets you don't need anything new over compreg, but I can imagine async might be a bit more complex (that said, I could also believe that all you need to support them is another multiplexer like you do in this PR that additionally multiplexes between the register output and the reset value. The only unusual case I can think of off the top of my head is one where an async reset starts low, goes high between clock edges, then goes low again, but I think we cover that anyway in circt-bmc's default mode since it evaluates the negedge too. I suspect there'll be a corner case or two that I'm not thinking of anyway). A register to track whether the circuit's been reset or not sounds sensible to me. Do you have merge permissions, or should I hit merge on this PR for you? |
I don’t need async resets, but you’re right! I will handle it as you said. Yes please merge this! I dont have merge permissions. |
This adds support for registers with reset signals in
ExternalizeRegistersPass
.