m5: Added option to take a checkpoint at the end of simulation
authorBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:58 +0000 (13:55 -0800)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:58 +0000 (13:55 -0800)
configs/common/Options.py
configs/common/Simulation.py

index 2d4aedcae350e4f883d536c949a5d391ec1f2849..abc26f1b5a3e7feef0d1f5d17d5dbeed20302a3a 100644 (file)
@@ -53,6 +53,9 @@ parser.add_option("--checkpoint-dir", action="store", type="string",
     help="Place all checkpoints in this absolute directory")
 parser.add_option("-r", "--checkpoint-restore", action="store", type="int",
     help="restore from checkpoint <N>")
+parser.add_option("--checkpoint-at-end", action="store_true",
+                  help="take a checkpoint at end of run")
+
 
 # CPU Switching - default switch model goes from a checkpoint
 # to a timing simple CPU with caches to warm up, then to detailed CPU for
index 112a951b668b37d16c38bdb32c05debfe6d9d411..1c9d4ff4ebbf311ee47309d7e02b936466c19541 100644 (file)
@@ -374,3 +374,6 @@ def run(options, root, testsys, cpu_class):
         exit_cause = exit_event.getCause()
     print 'Exiting @ cycle %i because %s' % (m5.curTick(), exit_cause)
 
+    if options.checkpoint_at_end:
+        m5.checkpoint(root, joinpath(cptdir, "cpt.%d"))
+