summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2006-08-16 17:54:00 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2006-08-16 17:54:00 -0400
commitc475fd5211b49bdc8ac8c51882394bb468cc3865 (patch)
tree3b37081e2a2b76c57dce5e6fab8e699510cc96b9
parentdf3af8018e5a252f7c4e8f52b872263c8ab375cc (diff)
downloadgem5-c475fd5211b49bdc8ac8c51882394bb468cc3865.tar.xz
Add in checkpointing in the frontend, so that when a checkpoint is called, the python handles it, and the simulation continues. Also, make it so that the cycle number is part of the cpt dir name, so that multiple checkpoints do not overwrite each other.
--HG-- extra : convert_revision : a55e4ac20da5a57ea8735951b9070960b9b8298f
-rw-r--r--configs/example/fs.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 92d2e29e6..7c888c536 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -102,21 +102,19 @@ else:
m5.instantiate(root)
-#exit_event = m5.simulate(2600000000000)
-#if exit_event.getCause() != "user interrupt received":
-# m5.checkpoint(root, 'cpt')
-# exit_event = m5.simulate(300000000000)
-# if exit_event.getCause() != "user interrupt received":
-# m5.checkpoint(root, 'cptA')
-
-
if options.maxtick:
- exit_event = m5.simulate(options.maxtick)
+ arg = options.maxtick
elif options.maxtime:
simtime = int(options.maxtime * root.clock.value)
print "simulating for: ", simtime
- exit_event = m5.simulate(simtime)
+ arg = simtime
else:
- exit_event = m5.simulate()
+ arg = -1
+
+exit_event = m5.simulate(arg)
+
+while exit_event.getCause() == "checkpoint":
+ m5.checkpoint(root, "cpt.%d")
+ exit_event = m5.simulate(arg)
print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause()