Support expression coverage on assign statements (#7543)

This commit is contained in:
Thomas Brown
2026-05-13 13:59:29 -04:00
committed by GitHub
parent e485dfe48c
commit 1c3ee7ce4c
7 changed files with 65 additions and 1 deletions
+8 -1
View File
@@ -290,8 +290,15 @@ class CoverageVisitor final : public VNVisitor {
}
void visit(AstAlways* nodep) override {
if (nodep->keyword() == VAlwaysKwd::CONT_ASSIGN) {
// Don't want line coverage for it, iterate for expression/toggle coverage only
// Handle continuous assigns for expression coverage (but not line coverage)
VL_RESTORER(m_state);
VL_RESTORER(m_exprStmtsp);
VL_RESTORER(m_inToggleOff);
m_exprStmtsp = nodep;
m_inToggleOff = true;
createHandle(nodep);
iterateChildren(nodep);
// Note: No line coverage for continuous assigns
return;
}
iterateProcedure(nodep);