From fa1c0ae2a2bc0676949f1b47a49858f8b15b16f5 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 22 Aug 2007 19:10:09 -0700 Subject: [PATCH] $finish() now stops at the end of the time step not immediately. The event loop used to check for $finish at every iteration. This patch alters this behavior to only check just before you advance to the next time step. This allows events for the current time step to complete. --- vvp/schedule.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vvp/schedule.cc b/vvp/schedule.cc index 616051592..933d6f668 100644 --- a/vvp/schedule.cc +++ b/vvp/schedule.cc @@ -614,7 +614,7 @@ void schedule_simulate(void) signals_capture(); - while (schedule_runnable && sched_list) { + while (sched_list) { if (schedule_stopped_flag) { schedule_stopped_flag = false; @@ -629,6 +629,7 @@ void schedule_simulate(void) postponed sync events. Run them all. */ if (ctim->delay > 0) { + if (!schedule_runnable) break; schedule_time += ctim->delay; ctim->delay = 0; @@ -680,7 +681,3 @@ void schedule_simulate(void) vpiPostsim(); } -/* - * $Log: schedule.cc,v $ - */ -