diff options
author | Pouya Fotouhi <pfotouhi@ucdavis.edu> | 2019-01-19 15:41:37 -0800 |
---|---|---|
committer | Pouya Fotouhi <pfotouhi@ucdavis.edu> | 2019-02-12 05:51:07 +0000 |
commit | 8d7933293f030f180db5effc01865286ba682ca3 (patch) | |
tree | 9e4d3bd906795c7972c9f974c5fff3e87704f073 /src/mem/protocol/MESI_Three_Level-L0cache.sm | |
parent | 502af7c0f58e53105c78cc0cea39404904a09214 (diff) | |
download | gem5-8d7933293f030f180db5effc01865286ba682ca3.tar.xz |
mem-ruby: Fixing MESI Three Level
Adding back some changes done in patch 676ae57827.
Transient state IS_I, STALE_DATA, Data_Stale event are necessary.
Issue: (cacheline A, initial state for P0 and P1 is I)
| P0 | P1 |
|GETX (A)| |
| |GETS (A)|
|Inv_All | |
P1 never sends the ACK - deadlock
It should ACK, later upon data use it as stale data, and got to I.
Solution:
P1(A):
GETS: I->IS
Inv_All: IS->IS_I, Send ACK
Data: IS_I->I, STALE_DATA to L0
Signed-off-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Change-Id: I1e7b2c05439d08579c68d8eb444e0f332e75e07f
Reviewed-on: https://gem5-review.googlesource.com/c/15715
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/protocol/MESI_Three_Level-L0cache.sm')
-rw-r--r-- | src/mem/protocol/MESI_Three_Level-L0cache.sm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mem/protocol/MESI_Three_Level-L0cache.sm b/src/mem/protocol/MESI_Three_Level-L0cache.sm index 4950d63b2..a87a3d9fd 100644 --- a/src/mem/protocol/MESI_Three_Level-L0cache.sm +++ b/src/mem/protocol/MESI_Three_Level-L0cache.sm @@ -101,6 +101,7 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache") Data, desc="Data for processor"; Data_Exclusive, desc="Data for processor"; + Data_Stale, desc="Data for processor, but not for storage"; Ack, desc="Ack for processor"; Ack_all, desc="Last ack for processor"; @@ -268,6 +269,8 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache") trigger(Event:Data_Exclusive, in_msg.addr, cache_entry, tbe); } else if(in_msg.Class == CoherenceClass:DATA) { trigger(Event:Data, in_msg.addr, cache_entry, tbe); + } else if(in_msg.Class == CoherenceClass:STALE_DATA) { + trigger(Event:Data_Stale, in_msg.addr, cache_entry, tbe); } else if (in_msg.Class == CoherenceClass:ACK) { trigger(Event:Ack, in_msg.addr, cache_entry, tbe); } else if (in_msg.Class == CoherenceClass:WB_ACK) { @@ -732,6 +735,15 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache") kd_wakeUpDependents; } + transition(IS, Data_Stale, I) { + u_writeDataToCache; + hx_load_hit; + s_deallocateTBE; + ff_deallocateCacheBlock; + o_popIncomingResponseQueue; + kd_wakeUpDependents; + } + transition(Inst_IS, Data, S) { u_writeInstToCache; hx_ifetch_hit; @@ -748,6 +760,15 @@ machine(MachineType:L0Cache, "MESI Directory L0 Cache") kd_wakeUpDependents; } + transition(Inst_IS, Data_Stale, I) { + u_writeInstToCache; + hx_ifetch_hit; + s_deallocateTBE; + ff_deallocateCacheBlock; + o_popIncomingResponseQueue; + kd_wakeUpDependents; + } + transition({IM,SM}, Data_Exclusive, M) { u_writeDataToCache; hhx_store_hit; |