Add in checkpointing in the frontend, so that when a checkpoint is called, the python...
authorLisa Hsu <hsul@eecs.umich.edu>
Wed, 16 Aug 2006 21:54:00 +0000 (17:54 -0400)
committerLisa Hsu <hsul@eecs.umich.edu>
Wed, 16 Aug 2006 21:54:00 +0000 (17:54 -0400)
--HG--
extra : convert_revision : a55e4ac20da5a57ea8735951b9070960b9b8298f

configs/example/fs.py

index 92d2e29e6f122e1e5372d0c5279c393e56839fc1..7c888c53647c8de8a1b8e6c6bc5075f35c35f6a2 100644 (file)
@@ -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()