diff options
author | Joel Hestness <jthestness@gmail.com> | 2013-04-09 16:25:30 -0500 |
---|---|---|
committer | Joel Hestness <jthestness@gmail.com> | 2013-04-09 16:25:30 -0500 |
commit | 82c6734f6b0a614d01cb7c64a6bc53a20ca906a1 (patch) | |
tree | a694485cea7b0fe78e267c77a308099a9e9b032b /configs | |
parent | 1583056de8d5d9698cfeb87fb72a80e532e275c3 (diff) | |
download | gem5-82c6734f6b0a614d01cb7c64a6bc53a20ca906a1.tar.xz |
Configs: Fix handling of maxtick and take_checkpoints
In Simulation.py, calls to m5.simulate(num_ticks) will run the simulated system
for num_ticks after the current tick. Fix calls to m5.simulate in
scriptCheckpoints() and benchCheckpoints() to appropriately handle the maxticks
variable.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/Simulation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index fc6ae0f5f..cecf030ad 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -183,7 +183,7 @@ def scriptCheckpoints(options, maxtick, cptdir): period = int(period) num_checkpoints = 0 - exit_event = m5.simulate(when) + exit_event = m5.simulate(when - m5.curTick()) exit_cause = exit_event.getCause() while exit_cause == "checkpoint": exit_event = m5.simulate(when - m5.curTick()) @@ -215,7 +215,7 @@ def scriptCheckpoints(options, maxtick, cptdir): return exit_event def benchCheckpoints(options, maxtick, cptdir): - exit_event = m5.simulate(maxtick) + exit_event = m5.simulate(maxtick - m5.curTick()) exit_cause = exit_event.getCause() num_checkpoints = 0 |