diff --git a/src/V3Coverage.cpp b/src/V3Coverage.cpp index 2261278743..a5de959023 100644 --- a/src/V3Coverage.cpp +++ b/src/V3Coverage.cpp @@ -515,8 +515,11 @@ class CoverageVisitor final : public VNVisitor { createHandle(nodep); iterateAndNextNull(nodep->stmtsp()); if (m_state.lineCoverageOn(nodep)) { // if the case body didn't disable it - lineTrack(nodep); UINFO(4, " COVER: " << nodep << endl); + nodep->addStmtsp(newCoverInc(nodep->fileline(), "", "v_branch", "case", + linesCov(m_state, nodep), 1, + traceNameForLine(nodep, "case"))); + lineTrack(nodep); nodep->addStmtsp(newCoverInc(nodep->fileline(), "", "v_line", "case", linesCov(m_state, nodep), 0, traceNameForLine(nodep, "case"))); diff --git a/src/VlcTop.cpp b/src/VlcTop.cpp index 55a5753e7e..86ec6a0877 100644 --- a/src/VlcTop.cpp +++ b/src/VlcTop.cpp @@ -127,7 +127,11 @@ void VlcTop::writeInfo(const string& filename) { int point_num = 0; for (const auto& point : sc.points()) { os << "BRDA:" << sc.lineno() << ","; - os << "0,"; + if (point->comment() == "case") { + os << "42,"; + } else { + os << "0,"; + } os << point_num << ","; os << point->count() << "\n";