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 condition expansion for ExpandWhens on Property intrinsics #7021

Merged
merged 3 commits into from
May 11, 2024

Conversation

dobios
Copy link
Member

@dobios dobios commented May 10, 2024

This PR corrects when expansions for [Assert, Assume, Cover]Poperty by creating an implies statement between the condition of the when and the property itself.
Basically in the case of the following:

when(cond): 
    AssertProperty(prop)

is currently being expanded to simply

AssertProperty(prop)

which is wrong, so this PR makes so that it gets expanded to

AssertProperty(cond implies prop)

@dobios dobios added the bug Something isn't working label May 10, 2024
@dobios dobios requested a review from fabianschuiki May 10, 2024 22:24
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! Thanks for fixing this 🥳

test/Dialect/FIRRTL/expand-whens.mlir Outdated Show resolved Hide resolved
@dobios dobios merged commit 684262a into main May 11, 2024
4 checks passed
@dobios dobios deleted the dev/dobios/when-in-assert-condition branch May 11, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants