From 44f80e7ca5dd404628f07d00a01aaf2f0c604276 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sat, 25 Jul 2009 00:50:27 -0400 Subject: o3-smt: enforce numThreads parameter for SMT SE mode --- src/cpu/o3/cpu_builder.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3