-
Notifications
You must be signed in to change notification settings - Fork 303
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][circt-bmc] Add verif.bmc
op and circt-bmc
tool
#7259
Conversation
// Fail to convert unsupported verif ops to avoid silent failure | ||
struct VerifCoverOpConversion : OpConversionPattern<verif::CoverOp> { | ||
using OpConversionPattern<verif::CoverOp>::OpConversionPattern; | ||
|
||
LogicalResult | ||
matchAndRewrite(verif::CoverOp op, OpAdaptor adaptor, | ||
ConversionPatternRewriter &rewriter) const override { | ||
return op.emitError("Conversion of CoverOps to SMT not yet supported"); | ||
}; | ||
}; | ||
|
||
struct VerifClockedAssertOpConversion | ||
: OpConversionPattern<verif::ClockedAssertOp> { | ||
using OpConversionPattern<verif::ClockedAssertOp>::OpConversionPattern; | ||
|
||
LogicalResult | ||
matchAndRewrite(verif::ClockedAssertOp op, OpAdaptor adaptor, | ||
ConversionPatternRewriter &rewriter) const override { | ||
return op.emitError( | ||
"Conversion of ClockedAssertOps to SMT not yet supported"); | ||
}; | ||
}; | ||
|
||
struct VerifClockedCoverOpConversion | ||
: OpConversionPattern<verif::ClockedCoverOp> { | ||
using OpConversionPattern<verif::ClockedCoverOp>::OpConversionPattern; | ||
|
||
LogicalResult | ||
matchAndRewrite(verif::ClockedCoverOp op, OpAdaptor adaptor, | ||
ConversionPatternRewriter &rewriter) const override { | ||
return op.emitError( | ||
"Conversion of ClockedCoverOps to SMT not yet supported"); | ||
}; | ||
}; | ||
|
||
struct VerifClockedAssumeOpConversion | ||
: OpConversionPattern<verif::ClockedAssumeOp> { | ||
using OpConversionPattern<verif::ClockedAssumeOp>::OpConversionPattern; | ||
|
||
LogicalResult | ||
matchAndRewrite(verif::ClockedAssumeOp op, OpAdaptor adaptor, | ||
ConversionPatternRewriter &rewriter) const override { | ||
return op.emitError( | ||
"Conversion of ClockedAssumeOps to SMT not yet supported"); | ||
}; | ||
}; | ||
|
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.
Not totally sure if this is necessary, but my thinking is that without these patterns the errors produced will likely be pretty opaque to someone not familiar with CIRCT/MLIR internals, which maybe isn't ideal for this tool.
Can this be split up into
|
That should be fine, thanks for the suggestion! |
New op PR now up at #7263 |
This PR (based on an initial draft by @maerhart, thanks!) introduces a bounded model checking tool based on the SMT dialect, similar to the updated circt-lec tool.
To achieve this, a BMC op is added to the verif dialect - in order to support multiple clocks in the near future, this has init and loop regions that allow the manipulation of clocks to be specified (e.g. so that specific interleavings can be explored). These regions are allowed some extra state arguments, as is likely necessary for specifying clock interleavings (e.g. to say which clock's turn it is to be toggled next).
Sorry for the big diff!