vvp: enable main event queue before executing cbStartOfSimulation callbacks.

Before the start of simulation, functor update events resulting from
initial value propagation are added to the initialisation event queue
(schedule_init_list). Once simulation has started, they are added to
the main event queue (sched_list). The cbStartOfSimulation callbacks
are executed after the initialisation event queue has been emptied.
Currently, if these callbacks generate further functor update events,
those events are added to the initialisation event queue, but that
queue is not looked at again. Instead, make sure any new events are
added to the main event queue.

This issue and proposed fix was reported by gatk555 in PR #1065.
This commit is contained in:
gatk555 2024-01-14 21:50:41 +00:00 committed by Martin Whitaker
parent a9eed015c3
commit b128508841
1 changed files with 2 additions and 2 deletions

View File

@ -1147,6 +1147,8 @@ void schedule_simulate(void)
delete cur; delete cur;
} }
sim_started = true;
if (verbose_flag) { if (verbose_flag) {
vpi_mcd_printf(1, " ...execute StartOfSim callbacks\n"); vpi_mcd_printf(1, " ...execute StartOfSim callbacks\n");
} }
@ -1154,8 +1156,6 @@ void schedule_simulate(void)
// Execute start of simulation callbacks // Execute start of simulation callbacks
vpiStartOfSim(); vpiStartOfSim();
sim_started = true;
signals_capture(); signals_capture();
if (verbose_flag) { if (verbose_flag) {