decouple the switch option from the warmup period option - parsing was confused otherwise, oops.

--HG--
extra : convert_revision : 951fc664c59363df5f5e026aa791d83c26f050ec
This commit is contained in:
Lisa Hsu 2006-10-30 14:12:15 -05:00
parent 9be53b10b3
commit 883f0394f5
2 changed files with 6 additions and 5 deletions

View file

@ -53,6 +53,8 @@ parser.add_option("-r", "--checkpoint_restore", action="store", type="int",
# CPU Switching - default switch model goes from a checkpoint
# to a timing simple CPU with caches to warm up, then to detailed CPU for
# data measurement
parser.add_option("-s", "--standard_switch", action="store", type="int",
help="switch from timing CPU to Detailed CPU after a period of \
<N> cycles warmup", default=5000000000)
parser.add_option("-s", "--standard_switch", action="store_true",
help="switch from timing CPU to Detailed CPU")
parser.add_option("-w", "--warmup", action="store", type="int",
help="if -s, then this is the warmup period. else, this is ignored",
default=5000000000)

View file

@ -116,7 +116,7 @@ def run(options, root, testsys):
m5.switchCpus(switch_cpu_list)
m5.resume(testsys)
exit_event = m5.simulate(options.standard_switch)
exit_event = m5.simulate(options.warmup)
m5.switchCpus(switch_cpu_list1)
num_checkpoints = 0
@ -130,7 +130,6 @@ def run(options, root, testsys):
when = int(when)
period = int(period)
print "when is ", when, " period is ", period
exit_event = m5.simulate(when)
while exit_event.getCause() == "checkpoint":
exit_event = m5.simulate(when - m5.curTick())