mem-ruby: Use check_on_cache_probe on MOESI
authorPouya Fotouhi <Pouya.Fotouhi@amd.com>
Thu, 8 Aug 2019 01:01:20 +0000 (20:01 -0500)
committerPouya Fotouhi <pfotouhi@ucdavis.edu>
Tue, 13 Aug 2019 00:51:54 +0000 (00:51 +0000)
This change uses check_on_cache_probe statement to check if the cacheline
subject to eviction is locked in MOESI.

Change-Id: Ie650ccdc15bb41b4088e534975b662408aaccf24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19890
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/mem/protocol/MOESI_AMD_Base-CorePair.sm

index e1504dea80d424addb6187b0b24ac41507061d3c..140bbc400423e26ecdd0cb16d77584f423889245 100644 (file)
@@ -543,7 +543,9 @@ machine(MachineType:CorePair, "CP-like Core Coherence")
                           tbe);
                 }
               } else {
+                // Check if the line we want to evict is not locked
                 Addr victim := L1Icache.cacheProbe(in_msg.LineAddress);
+                check_on_cache_probe(mandatoryQueue_in, victim);
                 trigger(Event:L1I_Repl, victim,
                         getCacheEntry(victim), TBEs.lookup(victim));
               }
@@ -582,7 +584,9 @@ machine(MachineType:CorePair, "CP-like Core Coherence")
                             cache_entry, tbe);
                   }
                 } else {
+                  // Check if the line we want to evict is not locked
                   Addr victim := L1D1cache.cacheProbe(in_msg.LineAddress);
+                  check_on_cache_probe(mandatoryQueue_in, victim);
                   trigger(Event:L1D1_Repl, victim,
                           getCacheEntry(victim), TBEs.lookup(victim));
                 }
@@ -618,7 +622,9 @@ machine(MachineType:CorePair, "CP-like Core Coherence")
                             cache_entry, tbe);
                   }
                 } else {
+                  // Check if the line we want to evict is not locked
                   Addr victim := L1D0cache.cacheProbe(in_msg.LineAddress);
+                  check_on_cache_probe(mandatoryQueue_in, victim);
                   trigger(Event:L1D0_Repl, victim, getCacheEntry(victim),
                           TBEs.lookup(victim));
                 }