Fix waking --sc wrapper when DPI/delay makes work runnable (#8394) (#8534)

Fixes #8394
This commit is contained in:
Nazar Zibilyuk
2026-10-01 12:01:17 +01:00
committed by GitHub
parent 71c6638ccf
commit ea536a54b8
10 changed files with 188 additions and 1 deletions
+7
View File
@@ -1534,6 +1534,13 @@ class TaskVisitor final : public VNVisitor {
} else {
cfuncp->addStmtsp(assignp);
}
// With --sc, also wake the SystemC wrapper: it cannot see the flag, and may
// otherwise sleep until its next timed slot. (usesTiming() is not known yet.)
if (v3Global.opt.systemC()) {
assignp->addNextHere(new AstCStmt{
flp, "vlSymsp->__Vm_wakeEvent.notify(sc_core::SC_ZERO_TIME);\n"});
}
}
}