diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2018-03-09 15:04:20 +0100 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2018-10-10 18:17:42 +0000 |
commit | d204e56b2b9b8ad561fc258ebdc50ae8365159e1 (patch) | |
tree | 52783a7a32db7d055cb85e5454e6512c22cb2b1c /src/mem/cache/tags/skewed_assoc.hh | |
parent | 99a6c94e58b6375c0d524530cab2a27b6ea0f2bc (diff) | |
download | gem5-d204e56b2b9b8ad561fc258ebdc50ae8365159e1.tar.xz |
mem-cache: Use possible locations to find block
Use possible locations to find block to make it placement policy
independent.
Change-Id: I4c9d9e1e1ff91ce12e85ca1970f927d8f4f5a93b
Reviewed-on: https://gem5-review.googlesource.com/c/8884
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/tags/skewed_assoc.hh')
-rw-r--r-- | src/mem/cache/tags/skewed_assoc.hh | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mem/cache/tags/skewed_assoc.hh b/src/mem/cache/tags/skewed_assoc.hh index 9fc39e297..597c32fcd 100644 --- a/src/mem/cache/tags/skewed_assoc.hh +++ b/src/mem/cache/tags/skewed_assoc.hh @@ -120,6 +120,19 @@ class SkewedAssoc : public BaseSetAssoc */ unsigned extractSet(Addr addr, unsigned way) const; + protected: + /** + * Find all possible block locations for insertion and replacement of + * an address. Should be called immediately before ReplacementPolicy's + * findVictim() not to break cache resizing. + * Returns blocks in all ways belonging to the set of the address. + * + * @param addr The addr to a find possible locations for. + * @return The possible locations. + */ + std::vector<ReplaceableEntry*> getPossibleLocations(const Addr addr) const + override; + public: /** Convenience typedef. */ typedef SkewedAssocParams Params; @@ -135,18 +148,6 @@ class SkewedAssoc : public BaseSetAssoc ~SkewedAssoc() {}; /** - * Find all possible block locations for insertion and replacement of - * an address. Should be called immediately before ReplacementPolicy's - * findVictim() not to break cache resizing. - * Returns blocks in all ways belonging to the set of the address. - * - * @param addr The addr to a find possible locations for. - * @return The possible locations. - */ - const std::vector<CacheBlk*> getPossibleLocations(Addr addr) const - override; - - /** * Finds the given address in the cache, do not update replacement data. * i.e. This is a no-side-effect find of a block. * |