summaryrefslogtreecommitdiff
path: root/src/mem/cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache')
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 21a250e75..44f68d5fc 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -239,8 +239,6 @@ public:
uint32_t task_id = pkt->req->taskId();
if (!blk->isTouched) {
- tagsInUse++;
- blk->isTouched = true;
if (!warmedUp && tagsInUse.value() >= warmupBound) {
warmedUp = true;
warmupCycle = curTick();
@@ -260,6 +258,9 @@ public:
blk->invalidate();
}
+ // Previous block, if existed, has been removed, and now we have
+ // to insert the new one and mark it as touched
+ tagsInUse++;
blk->isTouched = true;
// Set tag for new block. Caller is responsible for setting status.