20 #include "mlir/IR/ImplicitLocOpBuilder.h"
21 #include "llvm/ADT/TypeSwitch.h"
23 using namespace circt;
24 using namespace firrtl;
42 auto whenStmt = dyn_cast<WhenOp>(printOp->getParentOp());
50 if (whenStmt.hasElseRegion())
55 Block &thenBlock = whenStmt.getThenBlock();
56 auto opIt = std::next(printOp->getIterator());
57 auto opEnd = thenBlock.end();
60 auto fmt = printOp.getFormatString();
61 if (!(fmt.contains(
"[verif-library-assert]") ||
62 fmt.contains(
"[verif-library-assume]") ||
63 fmt.contains(
"[verif-library-cover]") || fmt.starts_with(
"assert:") ||
64 fmt.starts_with(
"assume:") || fmt.starts_with(
"cover:") ||
65 fmt.starts_with(
"assertNotX:") || fmt.starts_with(
"Assertion failed")))
74 auto stopOp = dyn_cast<StopOp>(*opIt++);
75 if (!stopOp || opIt != opEnd || stopOp.getClock() != printOp.getClock() ||
76 stopOp.getCond() != printOp.getCond())
bool isRecognizedPrintfEncodedVerif(PrintFOp printOp)
Classifier for legacy verif intent captured in printf + when's.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.