diff options
author | Geoffrey Blake <geoffrey.blake@arm.com> | 2012-03-09 09:59:27 -0500 |
---|---|---|
committer | Geoffrey Blake <geoffrey.blake@arm.com> | 2012-03-09 09:59:27 -0500 |
commit | 043709fdfab3b6c46f6ef95d1f642cd3c06ee20a (patch) | |
tree | ef8bab03f4260b67b57b00844d0245ca1e849ea0 /configs/common | |
parent | df05ffab1289b26aab2a0eb71ee55dcb7f42e5e9 (diff) | |
download | gem5-043709fdfab3b6c46f6ef95d1f642cd3c06ee20a.tar.xz |
CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
Enables the CheckerCPU to be selected at runtime with the --checker option
from the configs/example/fs.py and configs/example/se.py configuration
files. Also merges with the SE/FS changes.
Diffstat (limited to 'configs/common')
-rw-r--r-- | configs/common/Options.py | 1 | ||||
-rw-r--r-- | configs/common/Simulation.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py index 5fd6177c9..f7514d086 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -31,6 +31,7 @@ parser.add_option("--cpu-type", type="choice", default="atomic", choices = ["atomic", "timing", "detailed", "inorder", "arm_detailed"], help = "type of cpu to run with") +parser.add_option("--checker", action="store_true"); parser.add_option("-n", "--num-cpus", type="int", default=1) parser.add_option("--caches", action="store_true") parser.add_option("--l2cache", action="store_true") diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index 0ae287e77..b7c2c0fc0 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -129,6 +129,9 @@ def run(options, root, testsys, cpu_class): # simulation period if options.maxinsts: switch_cpus[i].max_insts_any_thread = options.maxinsts + # Add checker cpu if selected + if options.checker: + switch_cpus[i].addCheckerCpu() testsys.switch_cpus = switch_cpus switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)] @@ -176,6 +179,11 @@ def run(options, root, testsys, cpu_class): if options.maxinsts: switch_cpus_1[i].max_insts_any_thread = options.maxinsts + # attach the checker cpu if selected + if options.checker: + switch_cpus[i].addCheckerCpu() + switch_cpus_1[i].addCheckerCpu() + testsys.switch_cpus = switch_cpus testsys.switch_cpus_1 = switch_cpus_1 switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in xrange(np)] |