Internals: Set fabricated variable lifetimes

Set implicit net and traced coverage var lifetimes. No functional change.
This commit is contained in:
Geza Lore
2026-09-25 16:33:53 +01:00
parent 0e0ce2be52
commit 2e5e34d426
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -199,6 +199,7 @@ class CoverageVisitor final : public VNVisitor {
AstVar* const varp = new AstVar{fl_nowarn, VVarType::MODULETEMP, trace_var_name,
incp->findUInt32DType()};
varp->setIgnoreSchedWrite(); // Ignore the increment output, so no UNOPTFLAT
varp->lifetime(VLifetime::STATIC_IMPLICIT);
varp->trace(true);
m_modp->addStmtsp(varp);
UINFO(5, "New coverage trace: " << varp);
+1
View File
@@ -3285,6 +3285,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
}
AstVar* const newp
= new AstVar{nodep->fileline(), VVarType::WIRE, nodep->name(), VFlagLogicPacked{}, 1};
newp->lifetime(VLifetime::STATIC_IMPLICIT);
newp->trace(modp->modTrace());
modp->addStmtsp(newp);
// Link it to signal list, must add the variable under the module;