summaryrefslogtreecommitdiff
path: root/src/mem/cache/replacement_policies/ReplacementPolicies.py
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-03-09 17:05:39 +0100
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-03-30 16:46:59 +0000
commit207cb98c70d753adb1906856fd34a7e288df5318 (patch)
tree14605bebba99c52891ec210e1f8b8c4a2278912d /src/mem/cache/replacement_policies/ReplacementPolicies.py
parentab46e32b36810bec329a015d794f0aafff8d4b6f (diff)
downloadgem5-207cb98c70d753adb1906856fd34a7e288df5318.tar.xz
mem-cache: Create BRRIP replacement policy
Implementation of a Bimodal Re-Reference Interval Prediction replacement policy. Change-Id: I25d4a59a60ef7ac496c66852e394fd6cbaf50912 Reviewed-on: https://gem5-review.googlesource.com/8891 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/replacement_policies/ReplacementPolicies.py')
-rw-r--r--src/mem/cache/replacement_policies/ReplacementPolicies.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/cache/replacement_policies/ReplacementPolicies.py b/src/mem/cache/replacement_policies/ReplacementPolicies.py
index be9f2de50..9176d2b32 100644
--- a/src/mem/cache/replacement_policies/ReplacementPolicies.py
+++ b/src/mem/cache/replacement_policies/ReplacementPolicies.py
@@ -54,3 +54,13 @@ class RandomRP(BaseReplacementPolicy):
type = 'RandomRP'
cxx_class = 'RandomRP'
cxx_header = "mem/cache/replacement_policies/random_rp.hh"
+
+class BRRIPRP(BaseReplacementPolicy):
+ type = 'BRRIPRP'
+ cxx_class = 'BRRIPRP'
+ cxx_header = "mem/cache/replacement_policies/brrip_rp.hh"
+ max_RRPV = Param.Unsigned(3, "Maximum RRPV possible")
+ hit_priority = Param.Bool(False,
+ "Prioritize evicting blocks that havent had a hit recently")
+ btp = Param.Percent(3,
+ "Percentage of blocks to be inserted with long RRPV")