mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fixes #8394
This commit is contained in:
@@ -352,6 +352,10 @@ class EmitCModel final : public EmitCFunc {
|
||||
// Create sensitivity list for when to evaluate the model.
|
||||
putsDecoration(nullptr, "// Sensitivities on all clocks and combinational inputs\n");
|
||||
puts("SC_METHOD(eval);\n");
|
||||
if (v3Global.usesTiming()) {
|
||||
putsDecoration(nullptr, "// Notified by pending time delays/DPI exports\n");
|
||||
puts("sensitive << vlSymsp->__Vm_wakeEvent;\n");
|
||||
}
|
||||
for (AstNode* nodep = modp->stmtsp(); nodep; nodep = nodep->nextp()) {
|
||||
if (const AstVar* const varp = VN_CAST(nodep, Var)) {
|
||||
if (varp->isNonOutput() && (varp->isScSensitive() || varp->isPrimaryClock())) {
|
||||
@@ -430,7 +434,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
puts("if (eventsPending()) {\n");
|
||||
puts("sc_core::sc_time dt = sc_core::sc_time::from_value(nextTimeSlot() - "
|
||||
"contextp()->time());\n");
|
||||
puts("next_trigger(dt);\n");
|
||||
puts("vlSymsp->__Vm_wakeEvent.notify(dt);\n");
|
||||
puts("}\n");
|
||||
puts("}\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user