summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorPouya Fotouhi <Pouya.Fotouhi@amd.com>2019-08-07 19:43:27 -0500
committerPouya Fotouhi <pfotouhi@ucdavis.edu>2019-08-12 18:21:28 +0000
commit507a0cecc5fb7e7575079e945188800552f30288 (patch)
tree4f12cc8408249a53bae9a0312f99226e52bf47f0 /src/mem
parente424be8281cfca6b05297a9d51ca979b555bdfca (diff)
downloadgem5-507a0cecc5fb7e7575079e945188800552f30288.tar.xz
mem-ruby: Use check_on_cache_probe to protect locked lines from eviction
This change uses check_on_cache_probe statement to check if the cacheline subject to eviction is locked in MESI Three Level. Change-Id: Ib0de54aa067c7603db1f7321cc4825b123b641ac Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19868 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/protocol/MESI_Three_Level-L0cache.sm18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mem/protocol/MESI_Three_Level-L0cache.sm b/src/mem/protocol/MESI_Three_Level-L0cache.sm
index a87a3d9fd..84bb0d868 100644
--- a/src/mem/protocol/MESI_Three_Level-L0cache.sm
+++ b/src/mem/protocol/MESI_Three_Level-L0cache.sm
@@ -324,9 +324,12 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache")
Icache_entry, TBEs[in_msg.LineAddress]);
} else {
// No room in the L0, so we need to make room in the L0
- trigger(Event:L0_Replacement, Icache.cacheProbe(in_msg.LineAddress),
- getICacheEntry(Icache.cacheProbe(in_msg.LineAddress)),
- TBEs[Icache.cacheProbe(in_msg.LineAddress)]);
+ // Check if the line we want to evict is not locked
+ Addr addr := Icache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
+ trigger(Event:L0_Replacement, addr,
+ getICacheEntry(addr),
+ TBEs[addr]);
}
}
} else {
@@ -354,9 +357,12 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache")
Dcache_entry, TBEs[in_msg.LineAddress]);
} else {
// No room in the L1, so we need to make room in the L0
- trigger(Event:L0_Replacement, Dcache.cacheProbe(in_msg.LineAddress),
- getDCacheEntry(Dcache.cacheProbe(in_msg.LineAddress)),
- TBEs[Dcache.cacheProbe(in_msg.LineAddress)]);
+ // Check if the line we want to evict is not locked
+ Addr addr := Dcache.cacheProbe(in_msg.LineAddress);
+ check_on_cache_probe(mandatoryQueue_in, addr);
+ trigger(Event:L0_Replacement, addr,
+ getDCacheEntry(addr),
+ TBEs[addr]);
}
}
}