mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Support coverpoint bin 'with' filters (#8518)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user