mem-cache: Move size/entry_size params away from the template
Change-Id: Iec7a79cd9f2fa60d97f4a430e047e286f50338c8 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
12
src/mem/cache/tags/Tags.py
vendored
12
src/mem/cache/tags/Tags.py
vendored
@@ -46,12 +46,6 @@ class TaggedIndexingPolicy(SimObject):
|
||||
cxx_header = "mem/cache/tags/tagged_entry.hh"
|
||||
cxx_template_params = ["class Types"]
|
||||
|
||||
# Get the size from the parent (cache)
|
||||
size = Param.MemorySize(Parent.size, "capacity in bytes")
|
||||
|
||||
# Get the entry size from the parent (tags)
|
||||
entry_size = Param.Int(Parent.entry_size, "entry size in bytes")
|
||||
|
||||
# Get the associativity
|
||||
assoc = Param.Int(Parent.assoc, "associativity")
|
||||
|
||||
@@ -61,6 +55,12 @@ class TaggedSetAssociative(TaggedIndexingPolicy):
|
||||
cxx_class = "gem5::TaggedSetAssociative"
|
||||
cxx_header = "mem/cache/tags/tagged_entry.hh"
|
||||
|
||||
# Get the size from the parent (cache)
|
||||
size = Param.MemorySize(Parent.size, "capacity in bytes")
|
||||
|
||||
# Get the entry size from the parent (tags)
|
||||
entry_size = Param.Int(Parent.entry_size, "entry size in bytes")
|
||||
|
||||
|
||||
class BaseTags(ClockedObject):
|
||||
type = "BaseTags"
|
||||
|
||||
@@ -49,12 +49,6 @@ class BaseIndexingPolicy(SimObject):
|
||||
cxx_header = "mem/cache/tags/indexing_policies/base.hh"
|
||||
cxx_template_params = ["class Types"]
|
||||
|
||||
# Get the size from the parent (cache)
|
||||
size = Param.MemorySize(Parent.size, "capacity in bytes")
|
||||
|
||||
# Get the entry size from the parent (tags)
|
||||
entry_size = Param.Int(Parent.entry_size, "entry size in bytes")
|
||||
|
||||
# Get the associativity
|
||||
assoc = Param.Int(Parent.assoc, "associativity")
|
||||
|
||||
@@ -64,8 +58,20 @@ class SetAssociative(BaseIndexingPolicy):
|
||||
cxx_class = "gem5::SetAssociative"
|
||||
cxx_header = "mem/cache/tags/indexing_policies/set_associative.hh"
|
||||
|
||||
# Get the size from the parent (cache)
|
||||
size = Param.MemorySize(Parent.size, "capacity in bytes")
|
||||
|
||||
# Get the entry size from the parent (tags)
|
||||
entry_size = Param.Int(Parent.entry_size, "entry size in bytes")
|
||||
|
||||
|
||||
class SkewedAssociative(BaseIndexingPolicy):
|
||||
type = "SkewedAssociative"
|
||||
cxx_class = "gem5::SkewedAssociative"
|
||||
cxx_header = "mem/cache/tags/indexing_policies/skewed_associative.hh"
|
||||
|
||||
# Get the size from the parent (cache)
|
||||
size = Param.MemorySize(Parent.size, "capacity in bytes")
|
||||
|
||||
# Get the entry size from the parent (tags)
|
||||
entry_size = Param.Int(Parent.entry_size, "entry size in bytes")
|
||||
|
||||
Reference in New Issue
Block a user