summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/Tags.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/tags/Tags.py')
-rw-r--r--src/mem/cache/tags/Tags.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mem/cache/tags/Tags.py b/src/mem/cache/tags/Tags.py
index 781ac8e3f..8e302898c 100644
--- a/src/mem/cache/tags/Tags.py
+++ b/src/mem/cache/tags/Tags.py
@@ -38,6 +38,7 @@
from m5.params import *
from m5.proxy import *
from ClockedObject import ClockedObject
+from IndexingPolicies import *
class BaseTags(ClockedObject):
type = 'BaseTags'
@@ -64,6 +65,14 @@ class BaseTags(ClockedObject):
sequential_access = Param.Bool(Parent.sequential_access,
"Whether to access tags and data sequentially")
+ # Get indexing policy
+ indexing_policy = Param.BaseIndexingPolicy(SetAssociative(),
+ "Indexing policy")
+
+ # Set the indexing entry size as the block size
+ entry_size = Param.Int(Parent.cache_line_size,
+ "Indexing entry size in bytes")
+
class BaseSetAssoc(BaseTags):
type = 'BaseSetAssoc'
cxx_header = "mem/cache/tags/base_set_assoc.hh"
@@ -85,6 +94,9 @@ class SectorTags(BaseTags):
# Number of sub-sectors (data blocks) per sector
num_blocks_per_sector = Param.Int(1, "Number of sub-sectors per sector");
+ # The indexing entry now is a sector block
+ entry_size = Parent.cache_line_size * Self.num_blocks_per_sector
+
# Get replacement policy from the parent (cache)
replacement_policy = Param.BaseReplacementPolicy(
Parent.replacement_policy, "Replacement policy")
@@ -96,6 +108,6 @@ class FALRU(BaseTags):
min_tracked_cache_size = Param.MemorySize("128kB", "Minimum cache size for"
" which we track statistics")
-class SkewedAssoc(BaseSetAssoc):
- type = 'SkewedAssoc'
- cxx_header = "mem/cache/tags/skewed_assoc.hh"
+
+ # This tag uses its own embedded indexing
+ indexing_policy = NULL