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

[FIRRTL] Add require and ensure intrinsics #8154

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fabianschuiki
Copy link
Contributor

Add the circt.verif.require and circt.verif.ensure intrinsics as a way to produce the verif.require and verif.ensure operations from FIRRTL. At a later point we'll probably want to promote the five verif ops assert, assume, cover, require, and ensure to the FIRRTL spec and merge the functionality of the circt.verif.assert intrinsic with the firrtl.assert operation.

Note that this requires dropping of the clock operand from verif.require and verif.ensure. This operand was never used, so it feels like a reasonable change. At a later point we might want to merge verif.clocked_assert into verif.assert by adding clock operands to the verif ops in general.

@fabianschuiki fabianschuiki added FIRRTL Involving the `firrtl` dialect verif labels Jan 30, 2025
Add a simple pass that removes all contracts from the IR, treating them
as passthroughs. Run the pass in firtool's HW-to-SV pipeline early on to
add additional optimization opportunities. ExportVerilog will eventually
ignore contracts anyway.
Add the `circt.verif.require` and `circt.verif.ensure` intrinsics as a
way to produce the `verif.require` and `verif.ensure` operations from
FIRRTL. At a later point we'll probably want to promote the five verif
ops `assert`, `assume`, `cover`, `require`, and `ensure` to the FIRRTL
spec and merge the functionality of the `circt.verif.assert` intrinsic
with the `firrtl.assert` operation.

Note that this requires dropping of the clock operand from
`verif.require` and `verif.ensure`. This operand was never used, so it
feels like a reasonable change. At a later point we might want to merge
`verif.clocked_assert` into `verif.assert` by adding clock operands to
the verif ops in general.
@fabianschuiki fabianschuiki force-pushed the fschuiki/firrtl-require-ensure branch from 87ed7db to e7601b8 Compare January 30, 2025 22:47
@fabianschuiki fabianschuiki force-pushed the fschuiki/strip-contracts branch from 1c83d54 to cb6bd01 Compare January 30, 2025 22:47
Base automatically changed from fschuiki/strip-contracts to main January 31, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIRRTL Involving the `firrtl` dialect verif
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant