summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/protocol/MOESI_CMP_directory-L1cache.sm18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mem/protocol/MOESI_CMP_directory-L1cache.sm b/src/mem/protocol/MOESI_CMP_directory-L1cache.sm
index 1f573162b..b8d8ab4a0 100644
--- a/src/mem/protocol/MOESI_CMP_directory-L1cache.sm
+++ b/src/mem/protocol/MOESI_CMP_directory-L1cache.sm
@@ -412,10 +412,13 @@ machine(MachineType:L1Cache, "L1 cache protocol")
TBEs[in_msg.LineAddress]);
} else {
// No room in the L1, so we need to make room in the L1
+ // Check if the line we want to evict is not locked
+ Addr addr := L1Icache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
trigger(Event:L1_Replacement,
- L1Icache.cacheProbe(in_msg.LineAddress),
- getL1ICacheEntry(L1Icache.cacheProbe(in_msg.LineAddress)),
- TBEs[L1Icache.cacheProbe(in_msg.LineAddress)]);
+ addr,
+ getL1ICacheEntry(addr),
+ TBEs[addr]);
}
}
} else {
@@ -443,10 +446,13 @@ machine(MachineType:L1Cache, "L1 cache protocol")
TBEs[in_msg.LineAddress]);
} else {
// No room in the L1, so we need to make room in the L1
+ // Check if the line we want to evict is not locked
+ Addr addr := L1Dcache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
trigger(Event:L1_Replacement,
- L1Dcache.cacheProbe(in_msg.LineAddress),
- getL1DCacheEntry(L1Dcache.cacheProbe(in_msg.LineAddress)),
- TBEs[L1Dcache.cacheProbe(in_msg.LineAddress)]);
+ addr,
+ getL1DCacheEntry(addr),
+ TBEs[addr]);
}
}
}