summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-07-25 00:50:27 -0400
committerKorey Sewell <ksewell@umich.edu>2009-07-25 00:50:27 -0400
commit44f80e7ca5dd404628f07d00a01aaf2f0c604276 (patch)
tree5de08b94c6686ba3d7a3a63067692860f06b0bf4
parente7a3bda4970ca2458cbd6095ec5c19e46e8c1ab8 (diff)
downloadgem5-44f80e7ca5dd404628f07d00a01aaf2f0c604276.tar.xz
o3-smt: enforce numThreads parameter for SMT SE mode
-rw-r--r--configs/example/se.py1
-rw-r--r--src/cpu/o3/cpu_builder.cc11
2 files changed, 8 insertions, 4 deletions
diff --git a/configs/example/se.py b/configs/example/se.py
index 1193da004..4b3842cd1 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -124,6 +124,7 @@ if options.detailed:
(CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
CPUClass.clock = '2GHz'
+CPUClass.numThreads = len(workloads)
np = options.num_cpus
diff --git a/src/cpu/o3/cpu_builder.cc b/src/cpu/o3/cpu_builder.cc
index a433235a0..097dc7181 100644
--- a/src/cpu/o3/cpu_builder.cc
+++ b/src/cpu/o3/cpu_builder.cc
@@ -51,14 +51,17 @@ DerivO3CPUParams::create()
// Full-system only supports a single thread for the moment.
ThreadID actual_num_threads = 1;
#else
+ if (workload.size() > numThreads) {
+ fatal("Workload Size (%i) > Max Supported Threads (%i) on This CPU",
+ workload.size(), numThreads);
+ } else if (workload.size() == 0) {
+ fatal("Must specify at least one workload!");
+ }
+
// In non-full-system mode, we infer the number of threads from
// the workload if it's not explicitly specified.
ThreadID actual_num_threads =
(numThreads >= workload.size()) ? numThreads : workload.size();
-
- if (workload.size() == 0) {
- fatal("Must specify at least one workload!");
- }
#endif
numThreads = actual_num_threads;