Don't run final blocks if there was a compiletf, etc error.

This commit is contained in:
Cary R 2013-05-14 17:44:27 -07:00
parent 7d26515bc4
commit 5e94554d72
1 changed files with 6 additions and 1 deletions

View File

@ -997,6 +997,7 @@ static void run_rosync(struct event_time_s*ctim)
void schedule_simulate(void)
{
bool run_finals;
sim_started = false;
schedule_time = 0;
@ -1039,6 +1040,10 @@ void schedule_simulate(void)
vpi_mcd_printf(1, " ...run scheduler\n");
}
// If there were no compiletf, etc. errors then we are going to
// process events and when done run the final blocks.
run_finals = schedule_runnable;
if (schedule_runnable) while (sched_list) {
if (schedule_stopped_flag) {
@ -1126,7 +1131,7 @@ void schedule_simulate(void)
}
// Execute final events.
schedule_runnable = true;
schedule_runnable = run_finals;
while (schedule_runnable && schedule_final_list) {
struct event_s*cur = schedule_final_list->next;
if (cur->next == cur) {