Currently, when the numThreads parameter is set to something larger than
1 in full system mode, the O3 CPU will just silently change it back down
again to 1. This could be confusing to the user since it won't be
immediately apparent, even when looking at config.ini, that their config
isn't being respected.
This change moves that check into the CPU constructor, where CPU
behavior probably should be rather than the create() method which should
just build the object, and also turns it into an error.
Change-Id: I627ff8702b5e8aaad8839aa8d52524690be25619
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35936
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
system(params->system),
lastRunningCycle(curCycle())
{
+ fatal_if(FullSystem && params->numThreads > 1,
+ "SMT is not supported in O3 in full system mode currently.");
+
if (!params->switched_out) {
_status = Running;
} else {
DerivO3CPU *
DerivO3CPUParams::create()
{
- ThreadID actual_num_threads;
- if (FullSystem) {
- // Full-system only supports a single thread for the moment.
- actual_num_threads = 1;
- } else {
+ if (!FullSystem) {
if (workload.size() > numThreads) {
fatal("Workload Size (%i) > Max Supported Threads (%i) on This CPU",
workload.size(), numThreads);
// In non-full-system mode, we infer the number of threads from
// the workload if it's not explicitly specified.
- actual_num_threads =
+ numThreads =
(numThreads >= workload.size()) ? numThreads : workload.size();
}
- numThreads = actual_num_threads;
-
return new DerivO3CPU(this);
}