summaryrefslogtreecommitdiff
path: root/src/cpu/o3/deriv.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2019-01-03 17:45:56 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2019-01-17 11:09:08 +0000
commit38339e0a7f7ce119feefc95591703df2f851ee4d (patch)
tree3f99ddbd0e1b9073c23becf8aba1c28417e5a436 /src/cpu/o3/deriv.cc
parent8ddec57062bdde7935bb0472f2d993fb0c38c680 (diff)
downloadgem5-38339e0a7f7ce119feefc95591703df2f851ee4d.tar.xz
cpu-o3: Make the smtFetchPolicy a Param.ScopedEnum
The smtFetchPolicy is a parameter in the o3 cpu that can have 5 different values. Previously this setting was done through a string and a parser function would turn it into a c++ enum value. This changeset turns the string into a python Param.ScopedEnum. Change-Id: Iafb4b4b27587541185ea912e5ed581bce09695f5 Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15396 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/cpu/o3/deriv.cc')
-rw-r--r--src/cpu/o3/deriv.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cpu/o3/deriv.cc b/src/cpu/o3/deriv.cc
index 6b2af76e0..e8ff66913 100644
--- a/src/cpu/o3/deriv.cc
+++ b/src/cpu/o3/deriv.cc
@@ -57,14 +57,8 @@ DerivO3CPUParams::create()
numThreads = actual_num_threads;
- // Default smtFetchPolicy to "RoundRobin", if necessary.
- std::string round_robin_policy = "RoundRobin";
- std::string single_thread = "SingleThread";
-
- if (actual_num_threads > 1 && single_thread.compare(smtFetchPolicy) == 0)
- smtFetchPolicy = round_robin_policy;
- else
- smtFetchPolicy = smtFetchPolicy;
+ if (actual_num_threads > 1 && smtFetchPolicy == FetchPolicy::SingleThread)
+ smtFetchPolicy = FetchPolicy::RoundRobin;
return new DerivO3CPU(this);
}