mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Internals: Factor out --prof-exec section handling, add debug code
This commit is contained in:
+6
-7
@@ -1064,10 +1064,9 @@ class TaskVisitor final : public VNVisitor {
|
||||
AstCFunc* dpiFuncp) {
|
||||
const char* const tmpSuffixp = V3Task::dpiTemporaryVarSuffix();
|
||||
|
||||
if (v3Global.opt.profExec())
|
||||
cfuncp->addStmtsp(
|
||||
new AstCStmt{nodep->fileline(),
|
||||
"VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPush(\"dpiimports\");"});
|
||||
if (v3Global.opt.profExec()) {
|
||||
cfuncp->addStmtsp(AstCStmt::profExecSectionPush(nodep->fileline(), "dpiimports"));
|
||||
}
|
||||
|
||||
// Convert input/inout arguments to DPI types
|
||||
string args;
|
||||
@@ -1161,9 +1160,9 @@ class TaskVisitor final : public VNVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
if (v3Global.opt.profExec())
|
||||
cfuncp->addStmtsp(new AstCStmt{nodep->fileline(),
|
||||
"VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPop();"});
|
||||
if (v3Global.opt.profExec()) {
|
||||
cfuncp->addStmtsp(AstCStmt::profExecSectionPop(nodep->fileline(), "dpiimports"));
|
||||
}
|
||||
}
|
||||
|
||||
AstVarScope* getDpiExporTrigger() {
|
||||
|
||||
Reference in New Issue
Block a user