diff --git a/include/verilated_cov_model.h b/include/verilated_cov_model.h index 5b5e4b868..89d936fe6 100644 --- a/include/verilated_cov_model.h +++ b/include/verilated_cov_model.h @@ -31,9 +31,9 @@ // Per-bin classification. A bin's kind is which set it lives in (structural), // not a per-bin field. Only Normal feeds coverage(); the rest are recorded. enum class VlCovBinKind : uint8_t { - NORMAL = 0, // Base coverage-collecting bin - DEFAULT = 1, // Bin declared with 'default' range (which is excluded per LRM) - IGNORE = 2, // Ignore bin + NORMAL = 0, // Base coverage-collecting bin + DEFAULT = 1, // Bin declared with 'default' range (which is excluded per LRM) + IGNORE = 2, // Ignore bin ILLEGAL = 3 // Illegal bin }; diff --git a/src/V3Covergroup.cpp b/src/V3Covergroup.cpp index 9004926e4..0d43e9f60 100644 --- a/src/V3Covergroup.cpp +++ b/src/V3Covergroup.cpp @@ -688,8 +688,7 @@ class FunctionalCoverageVisitor final : public VNVisitor { + std::to_string(fl->firstColumn()) + ");"; if (count < 0) { // single bin cs->add(".addSingleNamer(" + std::string{binp->binsType().binSetEnum()} + ", \"" - + binp->name() - + "\", " + loc); + + binp->name() + "\", " + loc); } else { // value array bin cs->add(".addArrayNamer(" + std::string{binp->binsType().binSetEnum()} + ", " + std::to_string(count) + ", \"" + binp->name() + "\", " + loc); @@ -704,8 +703,7 @@ class FunctionalCoverageVisitor final : public VNVisitor { AstCStmt* const hitp = new AstCStmt{fl}; hitp->add(memberRef(fl, cpVarp)); hitp->add((binp->binsType().binIsNormal() ? ".incrementBin(" : ".recordHit(") - + std::to_string(idx) - + ");"); + + std::to_string(idx) + ");"); AstNode* actionp = hitp; if (binp->binsType() == VCoverBinsType::BINS_ILLEGAL) { actionp->addNext(makeIllegalBinAction(fl, "Illegal bin " + binp->prettyNameQ()