summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/lru.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2008-11-04 11:35:58 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2008-11-04 11:35:58 -0500
commitc68032ddcbf0aad10123710e7c7c932bf52061a0 (patch)
tree1bbeeb7adc7012716bf51c6546d7a52a3267226d /src/mem/cache/tags/lru.hh
parent4ab52cb986962f7c0fb0fa07de10d8cdfb51458a (diff)
downloadgem5-c68032ddcbf0aad10123710e7c7c932bf52061a0.tar.xz
decouple eviction from insertion in the cache.
Diffstat (limited to 'src/mem/cache/tags/lru.hh')
-rw-r--r--src/mem/cache/tags/lru.hh16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh
index 4f4c495f3..79af973a0 100644
--- a/src/mem/cache/tags/lru.hh
+++ b/src/mem/cache/tags/lru.hh
@@ -180,12 +180,20 @@ public:
LRUBlk* findBlock(Addr addr) const;
/**
- * Find a replacement block for the address provided.
- * @param pkt The request to a find a replacement candidate for.
+ * Find a block to evict for the address provided.
+ * @param addr The addr to a find a replacement candidate for.
* @param writebacks List for any writebacks to be performed.
- * @return The block to place the replacement in.
+ * @return The candidate block.
*/
- LRUBlk* findReplacement(Addr addr, PacketList &writebacks);
+ LRUBlk* findVictim(Addr addr, PacketList &writebacks);
+
+ /**
+ * Insert the new block into the cache. For LRU this means inserting into
+ * the MRU position of the set.
+ * @param addr The address to update.
+ * @param blk The block to update.
+ */
+ void insertBlock(Addr addr, BlkType *blk);
/**
* Generate the tag from the given address.