configs: add maxinsts option on command line
authorKorey Sewell <ksewell@umich.edu>
Wed, 16 Sep 2009 13:45:30 +0000 (09:45 -0400)
committerKorey Sewell <ksewell@umich.edu>
Wed, 16 Sep 2009 13:45:30 +0000 (09:45 -0400)
-option to allow threads to run to a max_inst_any_thread which is more useful/quicker in a lot of
cases then always having to figure out what tick to run your simulation to.

configs/common/Options.py
configs/common/Simulation.py

index 0ddd2f06dd2bb4b2e8dc75134e0dc67a0c754260..1da831e1f77c3d702f45fe8fd54b79825f055ca0 100644 (file)
@@ -38,6 +38,7 @@ parser.add_option("--fastmem", action="store_true")
 # Run duration options
 parser.add_option("-m", "--maxtick", type="int")
 parser.add_option("--maxtime", type="float")
+parser.add_option("--maxinsts", type="int")
 parser.add_option("--prog_intvl", type="int")
 
 
index d7dde241ccf8ab7796136a56d24a47161048ca5e..23dfad6c6b07808b2231e86d8e18b01693e1c7d9 100644 (file)
@@ -95,6 +95,10 @@ def run(options, root, testsys, cpu_class):
         for i in xrange(np):
             testsys.cpu[i].progress_interval = options.prog_intvl
 
+    if options.maxinsts:
+        for i in xrange(np):
+            testsys.cpu[i].max_insts_any_thread = options.maxinsts
+
     if cpu_class:
         switch_cpus = [cpu_class(defer_registration=True, cpu_id=(np+i))
                        for i in xrange(np)]