From 3eb86a2376d91f371deea7e79310723265af4111 Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 3 Dec 2007 16:58:39 -0800 Subject: [PATCH] Process end of simulation events. This is copied from the development branch. It allows the processing of events that happen at the simulation finish time. --- vvp/schedule.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vvp/schedule.cc b/vvp/schedule.cc index 94f6db15c..fcc46c293 100644 --- a/vvp/schedule.cc +++ b/vvp/schedule.cc @@ -442,11 +442,12 @@ void schedule_simulate(void) signals_capture(); - while (schedule_runnable && sched_list) { + while (sched_list) { if (schedule_stopped_flag) { schedule_stopped_flag = false; stop_handler(0); + if (!schedule_runnable) break; continue; } @@ -457,6 +458,7 @@ void schedule_simulate(void) postponed sync events. Run them all. */ if (ctim->delay > 0) { + if (!schedule_runnable) break; struct event_s*sync_cur; while ( (sync_cur = pull_sync_event()) ) { assert(sync_cur->type == TYPE_GEN);