summaryrefslogtreecommitdiff
path: root/src/mem/cache/replacement_policies/ReplacementPolicies.py
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-06-05 13:59:42 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-10-10 18:18:45 +0000
commit160bcba0d6729d37caf65e97a99e2ebdcf71f6a8 (patch)
tree8ad9997f4ec420402b2c5a5bc386883d2972b945 /src/mem/cache/replacement_policies/ReplacementPolicies.py
parent79eccfbe674d3cc8ebd2d9ed6787893f981de43a (diff)
downloadgem5-160bcba0d6729d37caf65e97a99e2ebdcf71f6a8.tar.xz
mem-cache: Create Tree-PLRU replacement policy
Implementation of a Tree-PLRU replacement policy. It is based on the assumption that a set associative cache is used. Change-Id: I74b227e88fd6c93aab5bb2cd0e8730376db28f52 Reviewed-on: https://gem5-review.googlesource.com/c/11106 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/replacement_policies/ReplacementPolicies.py')
-rw-r--r--src/mem/cache/replacement_policies/ReplacementPolicies.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mem/cache/replacement_policies/ReplacementPolicies.py b/src/mem/cache/replacement_policies/ReplacementPolicies.py
index 5737fa450..0bbf1d16b 100644
--- a/src/mem/cache/replacement_policies/ReplacementPolicies.py
+++ b/src/mem/cache/replacement_policies/ReplacementPolicies.py
@@ -90,3 +90,9 @@ class RRIPRP(BRRIPRP):
class NRURP(BRRIPRP):
btp = 0
max_RRPV = 1
+
+class TreePLRURP(BaseReplacementPolicy):
+ type = 'TreePLRURP'
+ cxx_class = 'TreePLRURP'
+ cxx_header = "mem/cache/replacement_policies/tree_plru_rp.hh"
+ num_leaves = Param.Int(Parent.assoc, "Number of leaves in each tree")