From: Korey Sewell Date: Wed, 16 Sep 2009 13:45:30 +0000 (-0400) Subject: configs: add maxinsts option on command line X-Git-Tag: stable_2012_02_02~1747 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7858a8e68f9fc8e915c812515f816e8a75921d72;p=gem5.git configs: add maxinsts option on command line -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. --- diff --git a/configs/common/Options.py b/configs/common/Options.py index 0ddd2f06d..1da831e1f 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -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") diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index d7dde241c..23dfad6c6 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -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)]