diff options
author | David Guillen <david.guillen@arm.com> | 2015-05-05 03:22:21 -0400 |
---|---|---|
committer | David Guillen <david.guillen@arm.com> | 2015-05-05 03:22:21 -0400 |
commit | 5287945a8bb98476a9326c5d9c51491cdc7212f2 (patch) | |
tree | c2263df9baa298e151c2fc68c22b9e3439f07edf /src/mem/cache/tags/lru.hh | |
parent | d0d933facc9085727c12f53de76a2cb879ded4c8 (diff) | |
download | gem5-5287945a8bb98476a9326c5d9c51491cdc7212f2.tar.xz |
mem: Remove templates in cache model
This patch changes the cache implementation to rely on virtual methods
rather than using the replacement policy as a template argument.
There is no impact on the simulation performance, and overall the
changes make it easier to modify (and subclass) the cache and/or
replacement policy.
Diffstat (limited to 'src/mem/cache/tags/lru.hh')
-rw-r--r-- | src/mem/cache/tags/lru.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh index a034dd6ab..df5a8e39d 100644 --- a/src/mem/cache/tags/lru.hh +++ b/src/mem/cache/tags/lru.hh @@ -69,11 +69,11 @@ class LRU : public BaseSetAssoc */ ~LRU() {} - BlkType* accessBlock(Addr addr, bool is_secure, Cycles &lat, + CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat, int context_src); - BlkType* findVictim(Addr addr) const; + CacheBlk* findVictim(Addr addr); void insertBlock(PacketPtr pkt, BlkType *blk); - void invalidate(BlkType *blk); + void invalidate(CacheBlk *blk); }; #endif // __MEM_CACHE_TAGS_LRU_HH__ |