summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/Tags.py
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-04-05 11:54:39 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-06-13 07:58:00 +0000
commit5bb8643808e81412ef634c142a9a403032d9141f (patch)
tree5ffb310c35ca4e154621654046672981a2fb0342 /src/mem/cache/tags/Tags.py
parent8008ce25e9ff7e82e4bd0b7da041a31dc841057b (diff)
downloadgem5-5bb8643808e81412ef634c142a9a403032d9141f.tar.xz
mem-cache: Create Sector Cache
Implementation of Sector Caches, i.e., a cache with multiple sequential data entries per tag entry for Set Associtive placement policies. Change-Id: I8e1e9448fa44ba308ccb16cd5bcc5fd36c988feb Reviewed-on: https://gem5-review.googlesource.com/9741 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/tags/Tags.py')
-rw-r--r--src/mem/cache/tags/Tags.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mem/cache/tags/Tags.py b/src/mem/cache/tags/Tags.py
index 76cd8d6b9..8fdfdce61 100644
--- a/src/mem/cache/tags/Tags.py
+++ b/src/mem/cache/tags/Tags.py
@@ -67,12 +67,28 @@ class BaseTags(ClockedObject):
class BaseSetAssoc(BaseTags):
type = 'BaseSetAssoc'
cxx_header = "mem/cache/tags/base_set_assoc.hh"
+
+ # Get the cache associativity
assoc = Param.Int(Parent.assoc, "associativity")
# Get replacement policy from the parent (cache)
replacement_policy = Param.BaseReplacementPolicy(
Parent.replacement_policy, "Replacement policy")
+class SectorTags(BaseTags):
+ type = 'SectorTags'
+ cxx_header = "mem/cache/tags/sector_tags.hh"
+
+ # Get the cache associativity
+ assoc = Param.Int(Parent.assoc, "associativity")
+
+ # Number of sub-sectors (data blocks) per sector
+ num_blocks_per_sector = Param.Int(1, "Number of sub-sectors per sector");
+
+ # Get replacement policy from the parent (cache)
+ replacement_policy = Param.BaseReplacementPolicy(
+ Parent.replacement_policy, "Replacement policy")
+
class FALRU(BaseTags):
type = 'FALRU'
cxx_class = 'FALRU'