summaryrefslogtreecommitdiff
path: root/src/mem/protocol
diff options
context:
space:
mode:
authorPouya Fotouhi <Pouya.Fotouhi@amd.com>2019-08-07 19:48:49 -0500
committerPouya Fotouhi <pfotouhi@ucdavis.edu>2019-08-13 00:52:27 +0000
commit444a49d11080d52568ce9fe6b34039bb7db639c2 (patch)
treeeb776bd6b4ef549c3f253fa9aa1d058a3c7ba33c /src/mem/protocol
parentdef0a4c6fdefd9458bc15ccf7c36efdd79204821 (diff)
downloadgem5-444a49d11080d52568ce9fe6b34039bb7db639c2.tar.xz
mem-ruby: Use check_on_cache_probe on MI
This change uses check_on_cache_probe statement to check if the cacheline subject to eviction is locked in MI. Change-Id: I276822e987e52f7682ff30f55880f295b6af023d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19888 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/protocol')
-rw-r--r--src/mem/protocol/MI_example-cache.sm9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mem/protocol/MI_example-cache.sm b/src/mem/protocol/MI_example-cache.sm
index b8036c123..8738f336e 100644
--- a/src/mem/protocol/MI_example-cache.sm
+++ b/src/mem/protocol/MI_example-cache.sm
@@ -254,9 +254,12 @@ machine(MachineType:L1Cache, "MI Example L1 Cache")
if (is_invalid(cache_entry) &&
cacheMemory.cacheAvail(in_msg.LineAddress) == false ) {
// make room for the block
- trigger(Event:Replacement, cacheMemory.cacheProbe(in_msg.LineAddress),
- getCacheEntry(cacheMemory.cacheProbe(in_msg.LineAddress)),
- TBEs[cacheMemory.cacheProbe(in_msg.LineAddress)]);
+ // Check if the line we want to evict is not locked
+ Addr addr := cacheMemory.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
+ trigger(Event:Replacement, addr,
+ getCacheEntry(addr),
+ TBEs[addr]);
}
else {
trigger(mandatory_request_type_to_event(in_msg.Type), in_msg.LineAddress,