summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/Options.py1
-rw-r--r--configs/common/Simulation.py8
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)]