summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/fa_lru.cc
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-06-02 14:51:59 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-06-08 09:37:23 +0000
commitf89fe7049d3ae91835bf3c5da72462b60e35d095 (patch)
tree652f4940aa4848957579917aa020932f0bddc6eb /src/mem/cache/tags/fa_lru.cc
parent62db2c46f460deb41d43930e4b6460e53f70376a (diff)
downloadgem5-f89fe7049d3ae91835bf3c5da72462b60e35d095.tar.xz
mem-cache: Move tagsInUse to children
Move tagsInUse to children, as sector caches have different tag invalidation and insertion, and thus they must handle updating this variable. Change-Id: I875c9b7364a909c76daf610d1e226c4e82063870 Reviewed-on: https://gem5-review.googlesource.com/10721 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/tags/fa_lru.cc')
-rw-r--r--src/mem/cache/tags/fa_lru.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 8eab62845..b5950f6cf 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -122,6 +122,9 @@ FALRU::invalidate(CacheBlk *blk)
{
BaseTags::invalidate(blk);
+ // Decrease the number of tags in use
+ tagsInUse--;
+
// Move the block to the tail to make it the next victim
moveToTail((FALRUBlk*)blk);
@@ -169,7 +172,6 @@ FALRU::accessBlock(Addr addr, bool is_secure, Cycles &lat,
return blk;
}
-
CacheBlk*
FALRU::findBlock(Addr addr, bool is_secure) const
{
@@ -215,6 +217,9 @@ FALRU::insertBlock(PacketPtr pkt, CacheBlk *blk)
// Do common block insertion functionality
BaseTags::insertBlock(pkt, blk);
+ // Increment tag counter
+ tagsInUse++;
+
// New block is the MRU
moveToHead(falruBlk);