summaryrefslogtreecommitdiff
path: root/configs/common/Simulation.py
diff options
context:
space:
mode:
authorGeoffrey Blake <geoffrey.blake@arm.com>2012-03-09 09:59:27 -0500
committerGeoffrey Blake <geoffrey.blake@arm.com>2012-03-09 09:59:27 -0500
commit043709fdfab3b6c46f6ef95d1f642cd3c06ee20a (patch)
treeef8bab03f4260b67b57b00844d0245ca1e849ea0 /configs/common/Simulation.py
parentdf05ffab1289b26aab2a0eb71ee55dcb7f42e5e9 (diff)
downloadgem5-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/Simulation.py')
-rw-r--r--configs/common/Simulation.py8
1 files changed, 8 insertions, 0 deletions
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)]