diff options
author | Tristan Gingold | 2015-10-31 07:13:55 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-10-31 07:13:55 +0100 |
commit | 15bc89b633b601dbc338041dc977494f6c38fc7f (patch) | |
tree | 7e474b94cff43e97e4056c037b3498053ef61146 /src/grt/grt-processes.adb | |
parent | ce10f7dbd57cb5d2273567aa536bfce79620849c (diff) | |
download | ghdl-15bc89b633b601dbc338041dc977494f6c38fc7f.tar.gz ghdl-15bc89b633b601dbc338041dc977494f6c38fc7f.tar.bz2 ghdl-15bc89b633b601dbc338041dc977494f6c38fc7f.zip |
Rework --stop-time to not display a message if simulation is already finished.
Diffstat (limited to 'src/grt/grt-processes.adb')
-rw-r--r-- | src/grt/grt-processes.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/grt/grt-processes.adb b/src/grt/grt-processes.adb index feb3123..242a9e5 100644 --- a/src/grt/grt-processes.adb +++ b/src/grt/grt-processes.adb @@ -1088,6 +1088,17 @@ package body Grt.Processes is end if; exit when Status = Run_Finished; + if Next_Time > Stop_Time + and then Next_Time /= Std_Time'Last + then + -- FIXME: Implement with a callback instead ? This could be done + -- in 2 steps: an after_delay for the time and then a read_only + -- to finish the current cycle. Note that no message should be + -- printed if the simulation is already finished at the stop time. + Info ("simulation stopped by --stop-time"); + exit; + end if; + if Current_Delta = 0 then Grt.Hooks.Call_Cycle_Hooks; end if; |