summaryrefslogtreecommitdiff
path: root/src/cpu/o3/O3CPU.py
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2019-01-03 19:01:04 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2019-01-17 11:09:08 +0000
commit1e9f65343c79b2c3b081e785cfec070d25292be7 (patch)
treec642d8a00623729d8b9bf0aba175b60fdfd2dbff /src/cpu/o3/O3CPU.py
parent8c549224a5e7d7a3142a9365d544475601dee41d (diff)
downloadgem5-1e9f65343c79b2c3b081e785cfec070d25292be7.tar.xz
cpu-o3: Make the smtCommitPolicy a Param.ScopedEnum
The smtCommitPolicy 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: I3625f2c08a1ae0c3b0dce7a641c6ae1ce3fd79a5 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/15400 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.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/o3/O3CPU.py b/src/cpu/o3/O3CPU.py
index e3704c0fa..32cc19010 100644
--- a/src/cpu/o3/O3CPU.py
+++ b/src/cpu/o3/O3CPU.py
@@ -54,6 +54,9 @@ class FetchPolicy(ScopedEnum):
class SMTQueuePolicy(ScopedEnum):
vals = [ 'Dynamic', 'Partitioned', 'Threshold' ]
+class CommitPolicy(ScopedEnum):
+ vals = [ 'Aggressive', 'RoundRobin', 'OldestReady' ]
+
class DerivO3CPU(BaseCPU):
type = 'DerivO3CPU'
cxx_header = 'cpu/o3/deriv.hh'
@@ -163,7 +166,7 @@ class DerivO3CPU(BaseCPU):
smtROBPolicy = Param.SMTQueuePolicy('Partitioned',
"SMT ROB Sharing Policy")
smtROBThreshold = Param.Int(100, "SMT ROB Threshold Sharing Parameter")
- smtCommitPolicy = Param.String('RoundRobin', "SMT Commit Policy")
+ smtCommitPolicy = Param.CommitPolicy('RoundRobin', "SMT Commit Policy")
branchPred = Param.BranchPredictor(TournamentBP(numThreads =
Parent.numThreads),