Skip to content

Commit b128508

Browse files
gatk555martinwhitaker
authored andcommitted
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.
1 parent a9eed01 commit b128508

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vvp/schedule.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,15 +1147,15 @@ void schedule_simulate(void)
11471147
delete cur;
11481148
}
11491149

1150+
sim_started = true;
1151+
11501152
if (verbose_flag) {
11511153
vpi_mcd_printf(1, " ...execute StartOfSim callbacks\n");
11521154
}
11531155

11541156
// Execute start of simulation callbacks
11551157
vpiStartOfSim();
11561158

1157-
sim_started = true;
1158-
11591159
signals_capture();
11601160

11611161
if (verbose_flag) {

0 commit comments

Comments
 (0)