mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
$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.
This commit is contained in:
+2
-5
@@ -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 $
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user