changeset 37a6fb91f96d in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=37a6fb91f96d
description:
        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:

 configs/common/Simulation.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 3bf3100e9fa1 -r 37a6fb91f96d configs/common/Simulation.py
--- a/configs/common/Simulation.py      Tue Apr 09 16:25:30 2013 -0500
+++ b/configs/common/Simulation.py      Tue Apr 09 16:25:30 2013 -0500
@@ -183,7 +183,7 @@
         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 @@
     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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to