mirror of
https://github.com/verilator/verilator.git
synced 2026-08-30 01:38:21 +02:00
+12
-1
@@ -288,6 +288,18 @@ class CoverageVisitor final : public VNVisitor {
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstClass* nodep) override {
|
||||
VL_RESTORER(m_modp);
|
||||
VL_RESTORER(m_state);
|
||||
VL_RESTORER(m_exprTempNames);
|
||||
VL_RESTORER(m_funcTemps);
|
||||
createHandle(nodep);
|
||||
m_modp = nodep;
|
||||
// Covergroup declarations are not executable statements; suppress line/expr/toggle
|
||||
// coverage so declarative elements (covergroup, coverpoint, cross) are not annotated
|
||||
m_state.m_inModOff = nodep->isCovergroup();
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstAlways* nodep) override {
|
||||
if (nodep->keyword() == VAlwaysKwd::CONT_ASSIGN) {
|
||||
// Handle continuous assigns for expression coverage (but not line coverage)
|
||||
@@ -806,7 +818,6 @@ class CoverageVisitor final : public VNVisitor {
|
||||
pair.first->second = varp;
|
||||
if (m_ftaskp) {
|
||||
varp->funcLocal(true);
|
||||
varp->lifetime(VLifetime::AUTOMATIC_EXPLICIT);
|
||||
m_ftaskp->stmtsp()->addHereThisAsNext(varp);
|
||||
} else {
|
||||
m_modp->stmtsp()->addHereThisAsNext(varp);
|
||||
|
||||
Reference in New Issue
Block a user