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/sector_tags.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/sector_tags.hh')
-rw-r--r-- | src/mem/cache/tags/sector_tags.hh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mem/cache/tags/sector_tags.hh b/src/mem/cache/tags/sector_tags.hh index 7a2cddae9..c3c3bc8f9 100644 --- a/src/mem/cache/tags/sector_tags.hh +++ b/src/mem/cache/tags/sector_tags.hh @@ -100,6 +100,18 @@ class SectorTags : public BaseTags /** Mask out all bits that aren't part of the set index. */ const unsigned setMask; + /** + * 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 sector 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 SectorTagsParams Params; @@ -143,18 +155,6 @@ class SectorTags : public BaseTags CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) override; /** - * 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 sector 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. - */ - virtual const std::vector<SectorBlk*> getPossibleLocations(Addr addr) - const; - - /** * Insert the new block into the cache and update replacement data. * * @param addr Address of the block. |