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.
This commit is contained in:
Korey Sewell 2009-09-16 09:45:30 -04:00
parent 9b8e61beb3
commit 7858a8e68f
2 changed files with 5 additions and 0 deletions

View 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")

View 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)]