From b40af2328a254b109a08327475bb8f2aa906399b Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Mon, 30 Oct 2006 13:33:27 -0500 Subject: [PATCH] add some comments and make the warmup period in a switchover parameterizable. configs/common/Options.py: make the warmup period in a standard switch part of the option. configs/common/Simulation.py: add some comments and also make the warmup period an option. --HG-- extra : convert_revision : 0fa587291b97ff87c3b3a617e7359ac6d9bed7a5 --- configs/common/Options.py | 5 +++-- configs/common/Simulation.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configs/common/Options.py b/configs/common/Options.py index d9c1cc64e..d89023082 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -53,5 +53,6 @@ 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_true", - help="switch from one cpu mode to another") +parser.add_option("-s", "--standard_switch", action="store", type="int", + help="switch from timing CPU to Detailed CPU after a period of \ + cycles warmup", default=5000000000) diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index b927315ba..59cf32303 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -116,12 +116,15 @@ def run(options, root, testsys): m5.switchCpus(switch_cpu_list) m5.resume(testsys) - exit_event = m5.simulate(3000000) + exit_event = m5.simulate(options.standard_switch) m5.switchCpus(switch_cpu_list1) num_checkpoints = 0 exit_cause = '' + ## Checkpoints being taken via the command line at and at subsequent + ## periods of . Checkpoint instructions received from the benchmark running + ## are ignored and skipped in favor of command line checkpoint instructions. if options.take_checkpoints: [when, period] = options.take_checkpoints.split(",", 1) when = int(when) -- 2.30.2