Skip to content
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

[Verif] Add clocked Assert Assume Cover ops #7022

Merged
merged 27 commits into from
May 23, 2024

Conversation

dobios
Copy link
Member

@dobios dobios commented May 10, 2024

This PR is in response to #6982 and adds clocked versions of assert, assume, cover.
What still needs to be done:

  • Update ExportVerilog
  • Add Verifier that checks that we have exactly one disable and clock.
  • Add tests

@dobios dobios changed the title [Verif] clocked assert assume cover opes [Verif] Add clocked Assert Assume Cover ops May 10, 2024
@dobios dobios marked this pull request as draft May 10, 2024 22:49
@dobios dobios added the verif label May 10, 2024
@dobios dobios self-assigned this May 13, 2024
@dobios dobios requested a review from fabianschuiki May 13, 2024 23:21
@dobios dobios marked this pull request as ready for review May 14, 2024 23:56
@dobios dobios requested a review from dtzSiFive as a code owner May 14, 2024 23:56
@dobios
Copy link
Member Author

dobios commented May 20, 2024

@uenoku @fabianschuiki I moved the verification into a dedicated pass, now the question is: when should this pass be called? Just before emission? At the end of the hw pass pipeline?

@fabianschuiki
Copy link
Contributor

when should this pass be called? Just before emission? At the end of the hw pass pipeline?

I would run this pass at least just before ExportVerilog, or before any pass that wants to rely on the invariant that clocked asserts contain no ltl.clock ops in the property/sequence that they're checking.

Copy link
Member

@uenoku uenoku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for iterating on this! Separating verification into a pass makes sense to me.

@uenoku @fabianschuiki I moved the verification into a dedicated pass, now the question is: when should this pass be called? Just before emission? At the end of the hw pass pipeline?

I think we want to verify after IR constructed so probably after LowerToHW would be good place. It also makes sense to verify before ExportVerilog.

include/circt/Dialect/Verif/Passes.td Outdated Show resolved Hide resolved
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a few nits on stray changes that you may want to revert/restore. Love the tests!

include/circt/Dialect/Verif/VerifVisitors.h Show resolved Hide resolved
test/Dialect/Verif/errors.mlir Outdated Show resolved Hide resolved
lib/Conversion/ExportVerilog/ExportVerilog.cpp Outdated Show resolved Hide resolved
@dobios dobios merged commit efa6955 into main May 23, 2024
4 checks passed
@dobios dobios deleted the dev/dobios/clocked-assert-verif-op branch May 23, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants