Support proper automatic/static initialization, and remove STATICVAR warning (#6405). (#7086)

This commit is contained in:
Wilson Snyder
2026-02-24 14:04:43 -05:00
committed by GitHub
parent 3992da6027
commit 7607f0e7fa
35 changed files with 914 additions and 282 deletions
+7
View File
@@ -456,6 +456,13 @@ class GateOkVisitor final : public VNVisitorConst {
clearSimple("Not a buffer (goes to a clock)");
}
}
void visit(AstCReset* nodep) override {
if (!m_isSimple) return;
// CReset is pure because we can optimize assignments, but if is
// the only assignment to a variable we still need to initial
// assign to get randomization etc
clearSimple("CReset");
}
//--------------------
void visit(AstNode* nodep) override {
if (!m_isSimple) return; // Fastpath