summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/fa_lru.hh
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-03-28 12:23:19 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-04-13 09:27:52 +0000
commitf119531fc123d33bef34a6ee28cad22717c63927 (patch)
tree5fc1e3794a351b7ce269a5e7dfedd8e6a2e4c195 /src/mem/cache/tags/fa_lru.hh
parente6ab75cc6cc89436904905f92dfec8a964de3108 (diff)
downloadgem5-f119531fc123d33bef34a6ee28cad22717c63927.tar.xz
mem-cache: Add MoveToTail to FALRU
FALRU was missing MoveToTail functionality within its invalidate function, and MoveToHead was doing unnecessary passes when the moved block was the head already. Besides, added some comments to make the code understandable. Change-Id: I2430d82b5d53c88b102a62610ea38b46d6e03a55 Reviewed-on: https://gem5-review.googlesource.com/9541 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/tags/fa_lru.hh')
-rw-r--r--src/mem/cache/tags/fa_lru.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 129af9f37..73d66604f 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -122,11 +122,19 @@ class FALRU : public BaseTags
/**
* Move a cache block to the MRU position.
+ *
* @param blk The block to promote.
*/
void moveToHead(FALRUBlk *blk);
/**
+ * Move a cache block to the LRU position.
+ *
+ * @param blk The block to demote.
+ */
+ void moveToTail(FALRUBlk *blk);
+
+ /**
* Check to make sure all the cache boundaries are still where they should
* be. Used for debugging.
* @return True if everything is correct.