Fix verilator_gantt for hierarchically Verilated models (#5700)

This commit is contained in:
Bartłomiej Chmiel
2024-12-23 09:10:46 -06:00
committed by GitHub
parent 530ebecfb7
commit 72a47e16c1
6 changed files with 81 additions and 18 deletions
+4 -2
View File
@@ -123,8 +123,10 @@ AstCFunc* V3Order::order(AstNetlist* netlistp, //
}();
if (v3Global.opt.profExec()) {
funcp->addStmtsp(new AstCStmt{flp, "VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPush(\"func "
+ tag + "\");\n"});
const string name
= (v3Global.opt.hierChild() ? (v3Global.opt.topModule() + " ") : "") + "func " + tag;
funcp->addStmtsp(new AstCStmt{flp, "VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPush(\""
+ name + "\");\n"});
}
// Build the OrderGraph