summaryrefslogtreecommitdiff
path: root/src/cpu/o3/O3CPU.py
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-12-24 09:04:16 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2019-01-17 11:09:08 +0000
commit7b4e441c35e6f3d11b050fb0d6aff7919f10d953 (patch)
tree06a27d94287b2fe69360df5a7fa26ff322eff92c /src/cpu/o3/O3CPU.py
parent38339e0a7f7ce119feefc95591703df2f851ee4d (diff)
downloadgem5-7b4e441c35e6f3d11b050fb0d6aff7919f10d953.tar.xz
cpu-o3: Make the smtLSQPolicy a Param.ScopedEnum
The smtLSQPolicy is a parameter in the o3 cpu that can have 3 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: I82041b88bd914c5dc660058d9e3998e3114e7c35 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/15397 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/cpu/o3/O3CPU.py')
-rw-r--r--src/cpu/o3/O3CPU.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpu/o3/O3CPU.py b/src/cpu/o3/O3CPU.py
index f6c395aed..02d56de92 100644
--- a/src/cpu/o3/O3CPU.py
+++ b/src/cpu/o3/O3CPU.py
@@ -51,6 +51,9 @@ from BranchPredictor import *
class FetchPolicy(ScopedEnum):
vals = [ 'SingleThread', 'RoundRobin', 'Branch', 'IQCount', 'LSQCount' ]
+class SMTQueuePolicy(ScopedEnum):
+ vals = [ 'Dynamic', 'Partitioned', 'Threshold' ]
+
class DerivO3CPU(BaseCPU):
type = 'DerivO3CPU'
cxx_header = 'cpu/o3/deriv.hh'
@@ -151,7 +154,8 @@ class DerivO3CPU(BaseCPU):
smtNumFetchingThreads = Param.Unsigned(1, "SMT Number of Fetching Threads")
smtFetchPolicy = Param.FetchPolicy('SingleThread', "SMT Fetch policy")
- smtLSQPolicy = Param.String('Partitioned', "SMT LSQ Sharing Policy")
+ smtLSQPolicy = Param.SMTQueuePolicy('Partitioned',
+ "SMT LSQ Sharing Policy")
smtLSQThreshold = Param.Int(100, "SMT LSQ Threshold Sharing Parameter")
smtIQPolicy = Param.String('Partitioned', "SMT IQ Sharing Policy")
smtIQThreshold = Param.Int(100, "SMT IQ Threshold Sharing Parameter")