summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/base_set_assoc.hh
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-04-17 15:46:14 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-06-01 11:21:46 +0000
commite404dddca9715e4d0098830783ca3f6fca86f35b (patch)
tree46c6ddd348a7abac1068a735ecdf34c22597b758 /src/mem/cache/tags/base_set_assoc.hh
parent7704113d94f2e574afeb079e0cc5b98fc6bed33b (diff)
downloadgem5-e404dddca9715e4d0098830783ca3f6fca86f35b.tar.xz
mem-cache: Privatize extractSet
Only BaseSetAssoc uses extractSet(). Besides, skewed caches need the way information to know which set an address is located at. Change-Id: Id222e907dc550d053018561bb2683cfc415471ec Reviewed-on: https://gem5-review.googlesource.com/9962 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/tags/base_set_assoc.hh')
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 33b2d39c4..830af6f3d 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -279,16 +279,6 @@ class BaseSetAssoc : public BaseTags
}
/**
- * Calculate the set index from the address.
- * @param addr The address to get the set from.
- * @return The set index of the address.
- */
- int extractSet(Addr addr) const override
- {
- return ((addr >> setShift) & setMask);
- }
-
- /**
* Regenerate the block address from the tag and set.
*
* @param block The block.
@@ -313,6 +303,18 @@ class BaseSetAssoc : public BaseTags
}
return false;
}
+
+ private:
+ /**
+ * Calculate the set index from the address.
+ *
+ * @param addr The address to get the set from.
+ * @return The set index of the address.
+ */
+ int extractSet(Addr addr) const
+ {
+ return ((addr >> setShift) & setMask);
+ }
};
#endif //__MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__