mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Set vlSymsp in modules at construction time.
This ensures it's available from very early on. No functional change.
This commit is contained in:
+4
-5
@@ -234,8 +234,8 @@ class EmitCImp final : EmitCFunc {
|
||||
"(" + modName + "* vlSelf);");
|
||||
puts("\n");
|
||||
|
||||
puts(modName + "::" + modName + "(const char* _vcname__)\n");
|
||||
puts(" : VerilatedModule(_vcname__)\n");
|
||||
puts(modName + "::" + modName + "(" + symClassName() + "* symsp, const char* name)\n");
|
||||
puts(" : VerilatedModule{name}\n");
|
||||
|
||||
ofp()->indentInc();
|
||||
for (const AstNode* nodep = modp->stmtsp(); nodep; nodep = nodep->nextp()) {
|
||||
@@ -258,6 +258,7 @@ class EmitCImp final : EmitCFunc {
|
||||
}
|
||||
}
|
||||
}
|
||||
puts(", vlSymsp{symsp}\n");
|
||||
ofp()->indentDec();
|
||||
|
||||
puts(" {\n");
|
||||
@@ -277,10 +278,8 @@ class EmitCImp final : EmitCFunc {
|
||||
"(" + modName + "* vlSelf, bool first);");
|
||||
}
|
||||
|
||||
puts("\nvoid " + modName + "::" + protect("__Vconfigure") + "(" + symClassName()
|
||||
+ "* _vlSymsp, bool first) {\n");
|
||||
puts("\nvoid " + modName + "::" + protect("__Vconfigure") + "(bool first) {\n");
|
||||
puts("if (false && first) {} // Prevent unused\n");
|
||||
puts("this->vlSymsp = _vlSymsp;\n"); // First, as later stuff needs it.
|
||||
if (v3Global.opt.coverage()) {
|
||||
puts(modName + "__" + protect("_configure_coverage") + "(this, first);\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user