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/random_repl.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/random_repl.hh')
-rw-r--r-- | src/mem/cache/tags/random_repl.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/cache/tags/random_repl.hh b/src/mem/cache/tags/random_repl.hh index 7f2795379..642c76777 100644 --- a/src/mem/cache/tags/random_repl.hh +++ b/src/mem/cache/tags/random_repl.hh @@ -58,11 +58,11 @@ class RandomRepl : public BaseSetAssoc */ ~RandomRepl() {} - 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_RANDOM_REPL_HH__ |