Support coverpoint bin 'with' filters (#8518)

This commit is contained in:
Marco Bartoli
2026-09-28 18:29:54 -04:00
committed by GitHub
parent a949674a6b
commit bde1b98ee0
48 changed files with 2366 additions and 293 deletions
+12
View File
@@ -359,6 +359,9 @@ class EmitVBaseVisitorConst VL_NOT_FINAL : public VNVisitorConst {
if (setp != nodep->transp()) puts(", ");
iterateConst(setp);
}
} else if (VN_IS(nodep->rangesp(), CoverWith)) {
puts(" = ");
iterateConst(nodep->rangesp());
} else if (nodep->rangesp()) { // LCOV_EXCL_BR_LINE - false: CoverBin always has
// transp/rangesp/default
puts(" = {");
@@ -375,6 +378,15 @@ class EmitVBaseVisitorConst VL_NOT_FINAL : public VNVisitorConst {
}
puts(";\n");
}
void visit(AstCoverWith* nodep) override {
const bool rangeList = !VN_IS(nodep->subp(), CoverpointRef);
if (rangeList) putfs(nodep, "{");
iterateAndCommaConstNull(nodep->subp());
if (rangeList) puts("}");
puts(" with (");
iterateConst(nodep->filterp());
puts(")");
}
void visit(AstCoverBinsof* nodep) override {
putfs(nodep, nodep->isNegated() ? "!binsof(" : "binsof(");
iterateConst(nodep->pointp());