2 * Copyright (c) 2019 ARM Limited
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
14 * Copyright (c) 1999-2013 Mark D. Hill and David A. Wood
15 * All rights reserved.
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 machine(MachineType:L2Cache, "Token protocol")
42 : CacheMemory * L2cache;
43 Cycles response_latency := 1;
44 Cycles request_latency := 1;
47 // From local bank of L2 cache TO the network
48 MessageBuffer * L1RequestFromL2Cache, network="To", virtual_network="0",
49 vnet_type="request"; // this L2 bank -> a local L1
50 MessageBuffer * GlobalRequestFromL2Cache, network="To", virtual_network="1",
51 vnet_type="request"; // this L2 bank -> mod-directory
52 MessageBuffer * responseFromL2Cache, network="To", virtual_network="2",
53 vnet_type="response"; // this L2 bank -> a local L1 || mod-directory
55 // FROM the network to this local bank of L2 cache
56 MessageBuffer * L1RequestToL2Cache, network="From", virtual_network="0",
57 vnet_type="request"; // a local L1 -> this L2 bank, Lets try this???
58 MessageBuffer * GlobalRequestToL2Cache, network="From", virtual_network="1",
59 vnet_type="request"; // mod-directory -> this L2 bank
60 MessageBuffer * responseToL2Cache, network="From", virtual_network="2",
61 vnet_type="response"; // a local L1 || mod-directory -> this L2 bank
63 MessageBuffer * triggerQueue;
66 state_declaration(State, desc="L2 Cache states", default="L2Cache_State_I") {
69 NP, AccessPermission:Invalid, desc="Not Present";
70 I, AccessPermission:Invalid, desc="Invalid";
71 ILS, AccessPermission:Invalid, desc="Idle/NP, but local sharers exist";
72 ILX, AccessPermission:Invalid, desc="Idle/NP, but local exclusive exists";
73 ILO, AccessPermission:Invalid, desc="Idle/NP, but local owner exists";
74 ILOX, AccessPermission:Invalid, desc="Idle/NP, but local owner exists and chip is exclusive";
75 ILOS, AccessPermission:Invalid, desc="Idle/NP, but local owner exists and local sharers as well";
76 ILOSX, AccessPermission:Invalid, desc="Idle/NP, but local owner exists, local sharers exist, chip is exclusive ";
77 S, AccessPermission:Read_Only, desc="Shared, no local sharers";
78 O, AccessPermission:Read_Only, desc="Owned, no local sharers";
79 OLS, AccessPermission:Read_Only, desc="Owned with local sharers";
80 OLSX, AccessPermission:Read_Only, desc="Owned with local sharers, chip is exclusive";
81 SLS, AccessPermission:Read_Only, desc="Shared with local sharers";
82 M, AccessPermission:Read_Write, desc="Modified";
86 IFGX, AccessPermission:Busy, desc="Blocked, forwarded global GETX to local owner/exclusive. No other on-chip invs needed";
87 IFGS, AccessPermission:Busy, desc="Blocked, forwarded global GETS to local owner";
88 ISFGS, AccessPermission:Busy, desc="Blocked, forwarded global GETS to local owner, local sharers exist";
89 IFGXX, AccessPermission:Busy, desc="Blocked, forwarded global GETX to local owner but may need acks from other sharers";
90 OLSF, AccessPermission:Busy, desc="Blocked, got Fwd_GETX with local sharers, waiting for local inv acks";
93 ILOW, AccessPermission:Busy, desc="local WB request, was ILO";
94 ILOXW, AccessPermission:Busy, desc="local WB request, was ILOX";
95 ILOSW, AccessPermission:Busy, desc="local WB request, was ILOS";
96 ILOSXW, AccessPermission:Busy, desc="local WB request, was ILOSX";
97 SLSW, AccessPermission:Busy, desc="local WB request, was SLS";
98 OLSW, AccessPermission:Busy, desc="local WB request, was OLS";
99 ILSW, AccessPermission:Busy, desc="local WB request, was ILS";
100 IW, AccessPermission:Busy, desc="local WB request from only sharer, was ILS";
101 OW, AccessPermission:Busy, desc="local WB request from only sharer, was OLS";
102 SW, AccessPermission:Busy, desc="local WB request from only sharer, was SLS";
103 OXW, AccessPermission:Busy, desc="local WB request from only sharer, was OLSX";
104 OLSXW, AccessPermission:Busy, desc="local WB request from sharer, was OLSX";
105 ILXW, AccessPermission:Busy, desc="local WB request, was ILX";
107 IFLS, AccessPermission:Busy, desc="Blocked, forwarded local GETS to _some_ local sharer";
108 IFLO, AccessPermission:Busy, desc="Blocked, forwarded local GETS to local owner";
109 IFLOX, AccessPermission:Busy, desc="Blocked, forwarded local GETS to local owner but chip is exclusive";
110 IFLOXX, AccessPermission:Busy, desc="Blocked, forwarded local GETX to local owner/exclusive, chip is exclusive";
111 IFLOSX, AccessPermission:Busy, desc="Blocked, forwarded local GETS to local owner w/ other sharers, chip is exclusive";
112 IFLXO, AccessPermission:Busy, desc="Blocked, forwarded local GETX to local owner with other sharers, chip is exclusive";
114 IGS, AccessPermission:Busy, desc="Semi-blocked, issued local GETS to directory";
115 IGM, AccessPermission:Busy, desc="Blocked, issued local GETX to directory. Need global acks and data";
116 IGMLS, AccessPermission:Busy, desc="Blocked, issued local GETX to directory but may need to INV local sharers";
117 IGMO, AccessPermission:Busy, desc="Blocked, have data for local GETX but need all acks";
118 IGMIO, AccessPermission:Busy, desc="Blocked, issued local GETX, local owner with possible local sharer, may need to INV";
119 OGMIO, AccessPermission:Busy, desc="Blocked, issued local GETX, was owner, may need to INV";
120 IGMIOF, AccessPermission:Busy, desc="Blocked, issued local GETX, local owner, waiting for global acks, got Fwd_GETX";
121 IGMIOFS, AccessPermission:Busy, desc="Blocked, issued local GETX, local owner, waiting for global acks, got Fwd_GETS";
122 OGMIOF, AccessPermission:Busy, desc="Blocked, issued local GETX, was owner, waiting for global acks, got Fwd_GETX";
124 II, AccessPermission:Busy, desc="Blocked, handling invalidations";
125 MM, AccessPermission:Busy, desc="Blocked, was M satisfying local GETX";
126 SS, AccessPermission:Busy, desc="Blocked, was S satisfying local GETS";
127 OO, AccessPermission:Busy, desc="Blocked, was O satisfying local GETS";
128 OLSS, AccessPermission:Busy, desc="Blocked, satisfying local GETS";
129 OLSXS, AccessPermission:Busy, desc="Blocked, satisfying local GETS";
130 SLSS, AccessPermission:Busy, desc="Blocked, satisfying local GETS";
132 OI, AccessPermission:Busy, desc="Blocked, doing writeback, was O";
133 MI, AccessPermission:Busy, desc="Blocked, doing writeback, was M";
134 MII, AccessPermission:Busy, desc="Blocked, doing writeback, was M, got Fwd_GETX";
135 OLSI, AccessPermission:Busy, desc="Blocked, doing writeback, was OLS";
136 ILSI, AccessPermission:Busy, desc="Blocked, doing writeback, was OLS got Fwd_GETX";
138 // DMA blocking states
139 ILOSD, AccessPermission:Busy, desc="Blocked, waiting for DMA ack";
140 ILOSXD, AccessPermission:Busy, desc="Blocked, waiting for DMA ack";
141 ILOD, AccessPermission:Busy, desc="Blocked, waiting for DMA ack";
142 ILXD, AccessPermission:Busy, desc="Blocked, waiting for DMA ack";
143 ILOXD, AccessPermission:Busy, desc="Blocked, waiting for DMA ack";
147 enumeration(Event, desc="Cache events") {
150 L1_GETS, desc="local L1 GETS request";
151 L1_GETX, desc="local L1 GETX request";
152 L1_PUTO, desc="local owner wants to writeback";
153 L1_PUTX, desc="local exclusive wants to writeback";
154 L1_PUTS_only, desc="only local sharer wants to writeback";
155 L1_PUTS, desc="local sharer wants to writeback";
156 Fwd_GETX, desc="A GetX from another processor";
157 Fwd_GETS, desc="A GetS from another processor";
158 Fwd_DMA, desc="A request from DMA";
159 Own_GETX, desc="A GetX from this node";
160 Inv, desc="Invalidations from the directory";
163 IntAck, desc="Received an ack message";
164 ExtAck, desc="Received an ack message";
165 All_Acks, desc="Received all ack messages";
166 Data, desc="Received a data message, responder has a shared copy";
167 Data_Exclusive, desc="Received a data message";
168 L1_WBCLEANDATA, desc="Writeback from L1, with data";
169 L1_WBDIRTYDATA, desc="Writeback from L1, with data";
171 Writeback_Ack, desc="Writeback O.K. from directory";
172 Writeback_Nack, desc="Writeback not O.K. from directory";
174 Unblock, desc="Local L1 is telling L2 dir to unblock";
175 Exclusive_Unblock, desc="Local L1 is telling L2 dir to unblock";
177 DmaAck, desc="DMA ack from local L1";
178 // events initiated by this L2
179 L2_Replacement, desc="L2 Replacement", format="!r";
186 structure(Entry, desc="...", interface="AbstractCacheEntry") {
187 State CacheState, desc="cache state";
188 NetDest Sharers, desc="Set of the internal processors that want the block in shared state";
189 MachineID Owner, desc="ID of the L1 cache to forward the block to once we get a response";
190 bool OwnerValid, default="false", desc="true if Owner means something";
191 bool Dirty, desc="Is the data dirty (different than memory)?";
192 DataBlock DataBlk, desc="data for the block";
196 structure(DirEntry, desc="...", interface="AbstractEntry") {
197 NetDest Sharers, desc="Set of the internal processors that want the block in shared state";
198 MachineID Owner, desc="ID of the L1 cache to forward the block to once we get a response";
199 bool OwnerValid, default="false", desc="true if Owner means something";
200 State DirState, desc="directory state";
204 structure(TBE, desc="...") {
205 Addr addr, desc="Physical address for this TBE";
206 State TBEState, desc="Transient state";
207 Addr PC, desc="Program counter of request";
208 DataBlock DataBlk, desc="Buffer for the data block";
209 bool Dirty, desc="Is the data dirty (different than memory)?";
211 int NumExtPendingAcks, default="0", desc="Number of global acks/data messages waiting for";
212 int NumIntPendingAcks, default="0", desc="Number of global acks/data messages waiting for";
213 int Fwd_GETX_ExtAcks, default="0", desc="Number of acks that requestor will need";
214 int Local_GETX_IntAcks, default="0", desc="Number of acks that requestor will need";
216 NetDest L1_GetS_IDs, desc="Set of the internal processors that want the block in shared state";
217 MachineID L1_GetX_ID, desc="ID of the L1 cache to forward the block to once we get a response";
218 NetDest Fwd_GetS_IDs, desc="Set of the internal processors that want the block in shared state";
219 MachineID Fwd_GetX_ID, desc="ID of the L1 cache to forward the block to once we get a response";
222 structure(TBETable, external = "yes") {
225 void deallocate(Addr);
226 bool isPresent(Addr);
229 structure(PerfectCacheMemory, external = "yes") {
231 void deallocate(Addr);
232 DirEntry lookup(Addr);
233 bool isTagPresent(Addr);
236 TBETable TBEs, template="<L2Cache_TBE>", constructor="m_number_of_TBEs";
237 PerfectCacheMemory localDirectory, template="<L2Cache_DirEntry>";
240 Tick cyclesToTicks(Cycles c);
241 void set_cache_entry(AbstractCacheEntry b);
242 void unset_cache_entry();
245 MachineID mapAddressToMachine(Addr addr, MachineType mtype);
246 void wakeUpAllBuffers(Addr a);
248 // Latency for responses that fetch data from cache
249 Cycles cacheResponseLatency() {
250 if (L2cache.getTagLatency() > response_latency) {
251 return L2cache.getTagLatency();
254 return response_latency;
258 Entry getCacheEntry(Addr address), return_by_pointer="yes" {
259 return static_cast(Entry, "pointer", L2cache[address]);
262 bool isDirTagPresent(Addr addr) {
263 return (localDirectory.isTagPresent(addr) );
266 DirEntry getDirEntry(Addr address), return_by_pointer="yes" {
267 return localDirectory.lookup(address);
270 bool isOnlySharer(Entry cache_entry, Addr addr, MachineID shar_id) {
271 if (is_valid(cache_entry)) {
272 assert (localDirectory.isTagPresent(addr) == false);
273 if (cache_entry.Sharers.count() > 1) {
276 else if (cache_entry.Sharers.count() == 1) {
277 if (cache_entry.Sharers.isElement(shar_id)) {
281 return false; // something happened which should cause this PUTS to be nacked
289 else if (localDirectory.isTagPresent(addr)){
290 DirEntry dir_entry := getDirEntry(addr);
291 if (dir_entry.Sharers.count() > 1) {
294 else if (dir_entry.Sharers.count() == 1) {
295 if (dir_entry.Sharers.isElement(shar_id)) {
299 return false; // something happened which should cause this PUTS to be nacked
307 // shouldn't happen unless L1 issues PUTS before unblock received
312 void copyCacheStateToDir(Entry cache_entry, Addr addr) {
313 assert(localDirectory.isTagPresent(addr) == false);
314 assert(is_valid(cache_entry));
315 localDirectory.allocate(addr);
316 DirEntry dir_entry := getDirEntry(addr);
317 dir_entry.DirState := cache_entry.CacheState;
318 dir_entry.Sharers := cache_entry.Sharers;
319 dir_entry.Owner := cache_entry.Owner;
320 dir_entry.OwnerValid := cache_entry.OwnerValid;
324 void copyDirToCache(Entry cache_entry, Addr addr) {
325 assert(is_valid(cache_entry));
326 DirEntry dir_entry := getDirEntry(addr);
327 cache_entry.Sharers := dir_entry.Sharers;
328 cache_entry.Owner := dir_entry.Owner;
329 cache_entry.OwnerValid := dir_entry.OwnerValid;
333 void recordLocalSharerInDir(Entry cache_entry, Addr addr, MachineID shar_id) {
334 if (is_valid(cache_entry)) {
335 assert (localDirectory.isTagPresent(addr) == false);
336 cache_entry.Sharers.add(shar_id);
339 if (localDirectory.isTagPresent(addr) == false) {
340 localDirectory.allocate(addr);
341 DirEntry dir_entry := getDirEntry(addr);
342 dir_entry.Sharers.clear();
343 dir_entry.OwnerValid := false;
345 DirEntry dir_entry := getDirEntry(addr);
346 dir_entry.Sharers.add(shar_id);
350 void recordNewLocalExclusiveInDir(Entry cache_entry, Addr addr, MachineID exc_id) {
352 if (is_valid(cache_entry)) {
353 assert (localDirectory.isTagPresent(addr) == false);
354 cache_entry.Sharers.clear();
355 cache_entry.OwnerValid := true;
356 cache_entry.Owner := exc_id;
359 if (localDirectory.isTagPresent(addr) == false) {
360 localDirectory.allocate(addr);
362 DirEntry dir_entry := getDirEntry(addr);
363 dir_entry.Sharers.clear();
364 dir_entry.OwnerValid := true;
365 dir_entry.Owner := exc_id;
369 void removeAllLocalSharersFromDir(Entry cache_entry, Addr addr) {
370 if (is_valid(cache_entry)) {
371 assert (localDirectory.isTagPresent(addr) == false);
372 cache_entry.Sharers.clear();
373 cache_entry.OwnerValid := false;
376 DirEntry dir_entry := getDirEntry(addr);
377 dir_entry.Sharers.clear();
378 dir_entry.OwnerValid := false;
382 void removeSharerFromDir(Entry cache_entry, Addr addr, MachineID sender) {
383 if (is_valid(cache_entry)) {
384 assert (localDirectory.isTagPresent(addr) == false);
385 cache_entry.Sharers.remove(sender);
388 DirEntry dir_entry := getDirEntry(addr);
389 dir_entry.Sharers.remove(sender);
393 void removeOwnerFromDir(Entry cache_entry, Addr addr, MachineID sender) {
394 if (is_valid(cache_entry)) {
395 assert (localDirectory.isTagPresent(addr) == false);
396 cache_entry.OwnerValid := false;
399 DirEntry dir_entry := getDirEntry(addr);
400 dir_entry.OwnerValid := false;
404 bool isLocalSharer(Entry cache_entry, Addr addr, MachineID shar_id) {
405 if (is_valid(cache_entry)) {
406 assert (localDirectory.isTagPresent(addr) == false);
407 return cache_entry.Sharers.isElement(shar_id);
410 DirEntry dir_entry := getDirEntry(addr);
411 return dir_entry.Sharers.isElement(shar_id);
415 NetDest getLocalSharers(Entry cache_entry, Addr addr) {
416 if (is_valid(cache_entry)) {
417 assert (localDirectory.isTagPresent(addr) == false);
418 return cache_entry.Sharers;
421 DirEntry dir_entry := getDirEntry(addr);
422 return dir_entry.Sharers;
426 MachineID getLocalOwner(Entry cache_entry, Addr addr) {
427 if (is_valid(cache_entry)) {
428 assert (localDirectory.isTagPresent(addr) == false);
429 return cache_entry.Owner;
432 DirEntry dir_entry := getDirEntry(addr);
433 return dir_entry.Owner;
437 int countLocalSharers(Entry cache_entry, Addr addr) {
438 if (is_valid(cache_entry)) {
439 assert (localDirectory.isTagPresent(addr) == false);
440 return cache_entry.Sharers.count();
443 DirEntry dir_entry := getDirEntry(addr);
444 return dir_entry.Sharers.count();
448 bool isLocalOwnerValid(Entry cache_entry, Addr addr) {
449 if (is_valid(cache_entry)) {
450 assert (localDirectory.isTagPresent(addr) == false);
451 return cache_entry.OwnerValid;
454 DirEntry dir_entry := getDirEntry(addr);
455 return dir_entry.OwnerValid;
459 int countLocalSharersExceptRequestor(Entry cache_entry, Addr addr, MachineID requestor) {
460 if (is_valid(cache_entry)) {
461 assert (localDirectory.isTagPresent(addr) == false);
462 if (cache_entry.Sharers.isElement(requestor)) {
463 return ( cache_entry.Sharers.count() - 1 );
466 return cache_entry.Sharers.count();
470 DirEntry dir_entry := getDirEntry(addr);
471 if (dir_entry.Sharers.isElement(requestor)) {
472 return ( dir_entry.Sharers.count() - 1 );
475 return dir_entry.Sharers.count();
480 State getState(TBE tbe, Entry cache_entry, Addr addr) {
484 } else if (is_valid(cache_entry)) {
485 return cache_entry.CacheState;
486 } else if (isDirTagPresent(addr)) {
487 DirEntry dir_entry := getDirEntry(addr);
488 return dir_entry.DirState;
494 std::string getCoherenceRequestTypeStr(CoherenceRequestType type) {
495 return CoherenceRequestType_to_string(type);
498 void setState(TBE tbe, Entry cache_entry, Addr addr, State state) {
499 assert((localDirectory.isTagPresent(addr) && L2cache.isTagPresent(addr)) == false);
502 tbe.TBEState := state;
506 (state == State:M) ||
507 (state == State:O) ||
508 (state == State:S) ||
509 (state == State:OLS) ||
510 (state == State:SLS) ||
511 (state == State:OLSX) ||
514 assert(is_valid(cache_entry));
517 (state == State:ILS) ||
518 (state == State:ILX) ||
519 (state == State:ILO) ||
520 (state == State:ILOX) ||
521 (state == State:ILOS) ||
522 (state == State:ILOSX)
524 // assert(isCacheTagPresent(addr) == false);
527 if (is_valid(cache_entry)) {
528 if ( ((cache_entry.CacheState != State:M) && (state == State:M)) ||
529 ((cache_entry.CacheState != State:S) && (state == State:S)) ||
530 ((cache_entry.CacheState != State:O) && (state == State:O)) ) {
531 cache_entry.CacheState := state;
532 // disable Coherence Checker for now
533 // sequencer.checkCoherence(addr);
536 cache_entry.CacheState := state;
539 else if (localDirectory.isTagPresent(addr)) {
540 DirEntry dir_entry := getDirEntry(addr);
541 dir_entry.DirState := state;
545 AccessPermission getAccessPermission(Addr addr) {
546 TBE tbe := TBEs[addr];
548 DPRINTF(RubySlicc, "%s\n", L2Cache_State_to_permission(tbe.TBEState));
549 return L2Cache_State_to_permission(tbe.TBEState);
552 Entry cache_entry := getCacheEntry(addr);
553 if(is_valid(cache_entry)) {
554 DPRINTF(RubySlicc, "%s\n", L2Cache_State_to_permission(cache_entry.CacheState));
555 return L2Cache_State_to_permission(cache_entry.CacheState);
558 DPRINTF(RubySlicc, "AccessPermission_NotPresent\n");
559 return AccessPermission:NotPresent;
562 void setAccessPermission(Entry cache_entry, Addr addr, State state) {
563 if (is_valid(cache_entry)) {
564 cache_entry.changePermission(L2Cache_State_to_permission(state));
568 void functionalRead(Addr addr, Packet *pkt) {
569 TBE tbe := TBEs[addr];
571 testAndRead(addr, tbe.DataBlk, pkt);
573 testAndRead(addr, getCacheEntry(addr).DataBlk, pkt);
577 int functionalWrite(Addr addr, Packet *pkt) {
578 int num_functional_writes := 0;
580 TBE tbe := TBEs[addr];
582 num_functional_writes := num_functional_writes +
583 testAndWrite(addr, tbe.DataBlk, pkt);
584 return num_functional_writes;
587 num_functional_writes := num_functional_writes +
588 testAndWrite(addr, getCacheEntry(addr).DataBlk, pkt);
589 return num_functional_writes;
592 out_port(globalRequestNetwork_out, RequestMsg, GlobalRequestFromL2Cache);
593 out_port(localRequestNetwork_out, RequestMsg, L1RequestFromL2Cache);
594 out_port(responseNetwork_out, ResponseMsg, responseFromL2Cache);
596 out_port(triggerQueue_out, TriggerMsg, triggerQueue);
602 in_port(triggerQueue_in, TriggerMsg, triggerQueue, rank=3) {
603 if (triggerQueue_in.isReady(clockEdge())) {
604 peek(triggerQueue_in, TriggerMsg) {
605 if (in_msg.Type == TriggerType:ALL_ACKS) {
606 trigger(Event:All_Acks, in_msg.addr,
607 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
609 error("Unexpected message");
616 in_port(responseNetwork_in, ResponseMsg, responseToL2Cache, rank=2) {
617 if (responseNetwork_in.isReady(clockEdge())) {
618 peek(responseNetwork_in, ResponseMsg) {
619 assert(in_msg.Destination.isElement(machineID));
620 if (in_msg.Type == CoherenceResponseType:ACK) {
621 if (in_msg.SenderMachine == MachineType:L2Cache) {
622 trigger(Event:ExtAck, in_msg.addr,
623 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
626 trigger(Event:IntAck, in_msg.addr,
627 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
629 } else if (in_msg.Type == CoherenceResponseType:DATA) {
630 trigger(Event:Data, in_msg.addr,
631 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
632 } else if (in_msg.Type == CoherenceResponseType:DATA_EXCLUSIVE) {
633 trigger(Event:Data_Exclusive, in_msg.addr,
634 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
635 } else if (in_msg.Type == CoherenceResponseType:UNBLOCK) {
636 DPRINTF(RubySlicc, "Received Unblock from L1 addr: %x\n", in_msg.addr);
637 trigger(Event:Unblock, in_msg.addr,
638 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
639 } else if (in_msg.Type == CoherenceResponseType:UNBLOCK_EXCLUSIVE) {
640 trigger(Event:Exclusive_Unblock, in_msg.addr,
641 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
642 } else if (in_msg.Type == CoherenceResponseType:WB_ACK) {
643 trigger(Event:Writeback_Ack, in_msg.addr,
644 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
645 } else if (in_msg.Type == CoherenceResponseType:WB_NACK) {
646 trigger(Event:Writeback_Nack, in_msg.addr,
647 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
648 } else if (in_msg.Type == CoherenceResponseType:DMA_ACK) {
649 trigger(Event:DmaAck, in_msg.addr,
650 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
652 error("Unexpected message");
660 in_port(requestNetwork_in, RequestMsg, GlobalRequestToL2Cache, rank=1) {
661 if (requestNetwork_in.isReady(clockEdge())) {
662 peek(requestNetwork_in, RequestMsg) {
663 if (in_msg.Type == CoherenceRequestType:GETX || in_msg.Type == CoherenceRequestType:DMA_WRITE) {
664 if (in_msg.Requestor == machineID) {
665 trigger(Event:Own_GETX, in_msg.addr,
666 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
668 trigger(Event:Fwd_GETX, in_msg.addr,
669 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
671 } else if (in_msg.Type == CoherenceRequestType:GETS) {
672 trigger(Event:Fwd_GETS, in_msg.addr,
673 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
674 } else if(in_msg.Type == CoherenceRequestType:DMA_READ) {
675 trigger(Event:Fwd_DMA, in_msg.addr,
676 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
677 } else if (in_msg.Type == CoherenceRequestType:INV) {
678 trigger(Event:Inv, in_msg.addr,
679 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
681 error("Unexpected message");
687 in_port(L1requestNetwork_in, RequestMsg, L1RequestToL2Cache, rank=0) {
688 if (L1requestNetwork_in.isReady(clockEdge())) {
689 peek(L1requestNetwork_in, RequestMsg) {
690 assert(in_msg.Destination.isElement(machineID));
691 if (in_msg.Type == CoherenceRequestType:GETX) {
692 trigger(Event:L1_GETX, in_msg.addr,
693 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
694 } else if (in_msg.Type == CoherenceRequestType:GETS) {
695 trigger(Event:L1_GETS, in_msg.addr,
696 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
697 } else if (in_msg.Type == CoherenceRequestType:PUTO) {
698 trigger(Event:L1_PUTO, in_msg.addr,
699 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
700 } else if (in_msg.Type == CoherenceRequestType:PUTX) {
701 trigger(Event:L1_PUTX, in_msg.addr,
702 getCacheEntry(in_msg.addr), TBEs[in_msg.addr]);
703 } else if (in_msg.Type == CoherenceRequestType:PUTS) {
704 Entry cache_entry := getCacheEntry(in_msg.addr);
705 if (isOnlySharer(cache_entry, in_msg.addr, in_msg.Requestor)) {
706 trigger(Event:L1_PUTS_only, in_msg.addr,
707 cache_entry, TBEs[in_msg.addr]);
710 trigger(Event:L1_PUTS, in_msg.addr,
711 cache_entry, TBEs[in_msg.addr]);
713 } else if (in_msg.Type == CoherenceRequestType:WRITEBACK_DIRTY_DATA) {
714 Entry cache_entry := getCacheEntry(in_msg.addr);
715 if (is_invalid(cache_entry) &&
716 L2cache.cacheAvail(in_msg.addr) == false) {
717 trigger(Event:L2_Replacement, L2cache.cacheProbe(in_msg.addr),
718 getCacheEntry(L2cache.cacheProbe(in_msg.addr)),
719 TBEs[L2cache.cacheProbe(in_msg.addr)]);
722 trigger(Event:L1_WBDIRTYDATA, in_msg.addr,
723 cache_entry, TBEs[in_msg.addr]);
725 } else if (in_msg.Type == CoherenceRequestType:WRITEBACK_CLEAN_DATA) {
726 Entry cache_entry := getCacheEntry(in_msg.addr);
727 if (is_invalid(cache_entry) &&
728 L2cache.cacheAvail(in_msg.addr) == false) {
729 trigger(Event:L2_Replacement, L2cache.cacheProbe(in_msg.addr),
730 getCacheEntry(L2cache.cacheProbe(in_msg.addr)),
731 TBEs[L2cache.cacheProbe(in_msg.addr)]);
734 trigger(Event:L1_WBCLEANDATA, in_msg.addr,
735 cache_entry, TBEs[in_msg.addr]);
738 error("Unexpected message");
747 action(a_issueGETS, "a", desc="issue local request globally") {
748 peek(L1requestNetwork_in, RequestMsg) {
749 enqueue(globalRequestNetwork_out, RequestMsg, request_latency) {
750 out_msg.addr := address;
751 out_msg.Type := CoherenceRequestType:GETS;
752 out_msg.RequestorMachine := MachineType:L2Cache;
753 out_msg.Requestor := machineID;
754 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
755 out_msg.MessageSize := MessageSizeType:Request_Control;
760 action(a_issueGETX, "\a", desc="issue local request globally") {
761 peek(L1requestNetwork_in, RequestMsg) {
762 enqueue(globalRequestNetwork_out, RequestMsg, request_latency) {
763 out_msg.addr := address;
764 out_msg.Type := CoherenceRequestType:GETX;
765 out_msg.RequestorMachine := MachineType:L2Cache;
766 out_msg.Requestor := machineID;
767 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
768 out_msg.MessageSize := MessageSizeType:Request_Control;
773 action(b_issuePUTX, "b", desc="Issue PUTX") {
774 enqueue(globalRequestNetwork_out, RequestMsg, request_latency) {
775 out_msg.addr := address;
776 out_msg.Type := CoherenceRequestType:PUTX;
777 out_msg.RequestorMachine := MachineType:L2Cache;
778 out_msg.Requestor := machineID;
779 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
780 out_msg.MessageSize := MessageSizeType:Writeback_Control;
784 action(b_issuePUTO, "\b", desc="Issue PUTO") {
785 enqueue(globalRequestNetwork_out, RequestMsg, request_latency) {
786 out_msg.addr := address;
787 out_msg.Type := CoherenceRequestType:PUTO;
788 out_msg.Requestor := machineID;
789 out_msg.RequestorMachine := MachineType:L2Cache;
790 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
791 out_msg.MessageSize := MessageSizeType:Writeback_Control;
795 /* PUTO, but local sharers exist */
796 action(b_issuePUTO_ls, "\bb", desc="Issue PUTO") {
797 enqueue(globalRequestNetwork_out, RequestMsg, request_latency) {
798 out_msg.addr := address;
799 out_msg.Type := CoherenceRequestType:PUTO_SHARERS;
800 out_msg.Requestor := machineID;
801 out_msg.RequestorMachine := MachineType:L2Cache;
802 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
803 out_msg.MessageSize := MessageSizeType:Writeback_Control;
807 action(c_sendDataFromTBEToL1GETS, "c", desc="Send data from TBE to L1 requestors in TBE") {
808 assert(is_valid(tbe));
809 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
810 out_msg.addr := address;
811 out_msg.Type := CoherenceResponseType:DATA;
812 out_msg.Sender := machineID;
813 out_msg.SenderMachine := MachineType:L2Cache;
814 out_msg.Destination.addNetDest(tbe.L1_GetS_IDs);
815 out_msg.DataBlk := tbe.DataBlk;
816 // out_msg.Dirty := tbe.Dirty;
817 // shared data should be clean
818 out_msg.Dirty := false;
819 out_msg.MessageSize := MessageSizeType:Response_Data;
821 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
822 address, tbe.DataBlk);
825 action(c_sendDataFromTBEToL1GETX, "\c", desc="Send data from TBE to L1 requestors in TBE") {
826 assert(is_valid(tbe));
827 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
828 out_msg.addr := address;
829 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
830 out_msg.Sender := machineID;
831 out_msg.SenderMachine := MachineType:L2Cache;
832 out_msg.Destination.add(tbe.L1_GetX_ID);
833 out_msg.DataBlk := tbe.DataBlk;
834 out_msg.Dirty := tbe.Dirty;
835 out_msg.Acks := tbe.Local_GETX_IntAcks;
836 out_msg.MessageSize := MessageSizeType:Response_Data;
838 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
839 address, tbe.DataBlk);
842 action(c_sendExclusiveDataFromTBEToL1GETS, "\cc", desc="Send data from TBE to L1 requestors in TBE") {
843 assert(is_valid(tbe));
844 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
845 out_msg.addr := address;
846 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
847 out_msg.Sender := machineID;
848 out_msg.SenderMachine := MachineType:L2Cache;
849 out_msg.Destination.addNetDest(tbe.L1_GetS_IDs);
850 out_msg.DataBlk := tbe.DataBlk;
851 out_msg.Dirty := tbe.Dirty;
852 out_msg.MessageSize := MessageSizeType:Response_Data;
856 action(c_sendDataFromTBEToFwdGETX, "cc", desc="Send data from TBE to external GETX") {
857 assert(is_valid(tbe));
858 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
859 out_msg.addr := address;
860 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
861 out_msg.Sender := machineID;
862 out_msg.SenderMachine := MachineType:L2Cache;
863 out_msg.Destination.add(tbe.Fwd_GetX_ID);
864 out_msg.DataBlk := tbe.DataBlk;
865 out_msg.Dirty := tbe.Dirty;
866 out_msg.Acks := tbe.Fwd_GETX_ExtAcks;
867 out_msg.MessageSize := MessageSizeType:Response_Data;
871 action(cd_sendDataFromTBEToFwdDma, "cd", desc="Send data from TBE to external GETX") {
872 assert(is_valid(tbe));
873 peek(requestNetwork_in, RequestMsg) {
874 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
875 out_msg.addr := address;
876 out_msg.Type := CoherenceResponseType:DATA;
877 out_msg.Sender := machineID;
878 out_msg.SenderMachine := MachineType:L2Cache;
879 out_msg.Destination.add(in_msg.Requestor);
880 out_msg.DataBlk := tbe.DataBlk;
881 // out_msg.Dirty := tbe.Dirty;
882 // shared data should be clean
883 out_msg.Dirty := false;
884 out_msg.Acks := tbe.Fwd_GETX_ExtAcks;
885 out_msg.MessageSize := MessageSizeType:Response_Data;
888 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
889 address, tbe.DataBlk);
892 action(c_sendDataFromTBEToFwdGETS, "ccc", desc="Send data from TBE to external GETX") {
893 assert(is_valid(tbe));
894 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
895 out_msg.addr := address;
896 out_msg.Type := CoherenceResponseType:DATA;
897 out_msg.Sender := machineID;
898 out_msg.SenderMachine := MachineType:L2Cache;
899 out_msg.Destination.addNetDest(tbe.Fwd_GetS_IDs);
900 out_msg.DataBlk := tbe.DataBlk;
901 // out_msg.Dirty := tbe.Dirty;
902 // shared data should be clean
903 out_msg.Dirty := false;
904 out_msg.Acks := tbe.Fwd_GETX_ExtAcks;
905 out_msg.MessageSize := MessageSizeType:Response_Data;
907 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
908 address, tbe.DataBlk);
911 action(c_sendExclusiveDataFromTBEToFwdGETS, "\ccc", desc="Send data from TBE to external GETX") {
912 assert(is_valid(tbe));
913 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
914 out_msg.addr := address;
915 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
916 out_msg.Sender := machineID;
917 out_msg.SenderMachine := MachineType:L2Cache;
918 out_msg.Destination.addNetDest(tbe.Fwd_GetS_IDs);
919 out_msg.DataBlk := tbe.DataBlk;
920 out_msg.Dirty := tbe.Dirty;
921 out_msg.Acks := tbe.Fwd_GETX_ExtAcks;
922 out_msg.MessageSize := MessageSizeType:Response_Data;
924 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
925 address, tbe.DataBlk);
928 action(d_sendDataToL1GETS, "d", desc="Send data directly to L1 requestor") {
929 assert(is_valid(cache_entry));
930 peek(L1requestNetwork_in, RequestMsg) {
931 enqueue(responseNetwork_out, ResponseMsg, cacheResponseLatency()) {
932 out_msg.addr := address;
933 out_msg.Type := CoherenceResponseType:DATA;
934 out_msg.Sender := machineID;
935 out_msg.SenderMachine := MachineType:L2Cache;
936 out_msg.Destination.add(in_msg.Requestor);
937 out_msg.DataBlk := cache_entry.DataBlk;
938 // out_msg.Dirty := cache_entry.Dirty;
939 // shared data should be clean
940 out_msg.Dirty := false;
941 out_msg.MessageSize := MessageSizeType:ResponseL2hit_Data;
944 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
945 address, cache_entry.DataBlk);
948 action(d_sendDataToL1GETX, "\d", desc="Send data and a token from TBE to L1 requestor") {
949 assert(is_valid(cache_entry));
950 peek(L1requestNetwork_in, RequestMsg) {
951 enqueue(responseNetwork_out, ResponseMsg, cacheResponseLatency()) {
952 assert(is_valid(tbe));
953 out_msg.addr := address;
954 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
955 out_msg.Sender := machineID;
956 out_msg.SenderMachine := MachineType:L2Cache;
957 out_msg.Destination.add(in_msg.Requestor);
958 out_msg.DataBlk := cache_entry.DataBlk;
959 out_msg.Dirty := cache_entry.Dirty;
960 out_msg.MessageSize := MessageSizeType:ResponseL2hit_Data;
961 out_msg.Acks := tbe.Local_GETX_IntAcks;
964 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
965 address, cache_entry.DataBlk);
968 action(dd_sendDataToFwdGETX, "dd", desc="send data") {
969 assert(is_valid(cache_entry));
970 peek(requestNetwork_in, RequestMsg) {
971 enqueue(responseNetwork_out, ResponseMsg, cacheResponseLatency()) {
972 out_msg.addr := address;
973 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
974 out_msg.Sender := machineID;
975 out_msg.SenderMachine := MachineType:L2Cache;
976 out_msg.Destination.add(in_msg.Requestor);
977 out_msg.DataBlk := cache_entry.DataBlk;
978 out_msg.Dirty := cache_entry.Dirty;
979 out_msg.MessageSize := MessageSizeType:Response_Data;
980 out_msg.Acks := in_msg.Acks;
983 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
984 address, cache_entry.DataBlk);
988 action(dd_sendDataToFwdGETS, "\dd", desc="send data") {
989 assert(is_valid(cache_entry));
990 peek(requestNetwork_in, RequestMsg) {
991 enqueue(responseNetwork_out, ResponseMsg, cacheResponseLatency()) {
992 out_msg.addr := address;
993 out_msg.Type := CoherenceResponseType:DATA;
994 out_msg.Sender := machineID;
995 out_msg.SenderMachine := MachineType:L2Cache;
996 out_msg.Destination.add(in_msg.Requestor);
997 out_msg.DataBlk := cache_entry.DataBlk;
998 // out_msg.Dirty := cache_entry.Dirty;
999 // shared data should be clean
1000 out_msg.Dirty := false;
1001 out_msg.MessageSize := MessageSizeType:Response_Data;
1004 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
1005 address, cache_entry.DataBlk);
1008 action(dd_sendExclusiveDataToFwdGETS, "\d\d", desc="send data") {
1009 assert(is_valid(cache_entry));
1010 peek(requestNetwork_in, RequestMsg) {
1011 enqueue(responseNetwork_out, ResponseMsg, cacheResponseLatency()) {
1012 out_msg.addr := address;
1013 out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE;
1014 out_msg.Sender := machineID;
1015 out_msg.SenderMachine := MachineType:L2Cache;
1016 out_msg.Destination.add(in_msg.Requestor);
1017 out_msg.DataBlk := cache_entry.DataBlk;
1018 out_msg.Dirty := cache_entry.Dirty;
1019 out_msg.MessageSize := MessageSizeType:Response_Data;
1024 action(e_sendAck, "e", desc="Send ack with the tokens we've collected thus far.") {
1025 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1026 assert(is_valid(tbe));
1027 out_msg.addr := address;
1028 out_msg.Type := CoherenceResponseType:ACK;
1029 out_msg.Sender := machineID;
1030 out_msg.SenderMachine := MachineType:L2Cache;
1032 out_msg.Destination.add( tbe.Fwd_GetX_ID);
1033 out_msg.Acks := 0 - 1;
1034 out_msg.MessageSize := MessageSizeType:Response_Control;
1038 action(e_sendAckToL1Requestor, "\e", desc="Send ack with the tokens we've collected thus far.") {
1039 peek(L1requestNetwork_in, RequestMsg) {
1040 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1041 out_msg.addr := address;
1042 out_msg.Type := CoherenceResponseType:ACK;
1043 out_msg.Sender := machineID;
1044 out_msg.SenderMachine := MachineType:L2Cache;
1045 out_msg.Destination.add(in_msg.Requestor);
1046 out_msg.Acks := 0 - 1;
1047 out_msg.MessageSize := MessageSizeType:Response_Control;
1052 action(e_sendAckToL1RequestorFromTBE, "eee", desc="Send ack with the tokens we've collected thus far.") {
1053 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1054 assert(is_valid(tbe));
1055 out_msg.addr := address;
1056 out_msg.Type := CoherenceResponseType:ACK;
1057 out_msg.Sender := machineID;
1058 out_msg.SenderMachine := MachineType:L2Cache;
1059 out_msg.Destination.add(tbe.L1_GetX_ID);
1060 out_msg.Acks := 0 - 1;
1061 out_msg.MessageSize := MessageSizeType:Response_Control;
1065 action(ee_sendLocalInv, "\ee", desc="Send local invalidates") {
1066 assert(is_valid(tbe));
1067 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address);
1068 DPRINTF(RubySlicc, "Address: %#x, Local Sharers: %s, Pending Acks: %d\n",
1069 address, getLocalSharers(cache_entry, address),
1070 tbe.NumIntPendingAcks);
1071 if (isLocalOwnerValid(cache_entry, address)) {
1072 tbe.NumIntPendingAcks := tbe.NumIntPendingAcks + 1;
1073 DPRINTF(RubySlicc, "%s\n", getLocalOwner(cache_entry, address));
1076 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1077 out_msg.addr := address;
1078 out_msg.Type := CoherenceRequestType:INV;
1079 out_msg.Requestor := machineID;
1080 out_msg.RequestorMachine := MachineType:L2Cache;
1081 out_msg.Destination.addNetDest(getLocalSharers(cache_entry, address));
1082 if (isLocalOwnerValid(cache_entry, address))
1084 out_msg.Destination.add(getLocalOwner(cache_entry, address));
1086 out_msg.MessageSize := MessageSizeType:Invalidate_Control;
1090 action(ee_sendLocalInvSharersOnly, "\eee", desc="Send local invalidates to sharers if they exist") {
1092 // assert(countLocalSharers(address) > 0);
1093 assert(is_valid(tbe));
1094 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address);
1096 if (countLocalSharers(cache_entry, address) > 0) {
1097 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1098 out_msg.addr := address;
1099 out_msg.Type := CoherenceRequestType:INV;
1100 out_msg.Requestor := machineID;
1101 out_msg.RequestorMachine := MachineType:L2Cache;
1102 out_msg.Destination.addNetDest(getLocalSharers(cache_entry, address));
1103 out_msg.MessageSize := MessageSizeType:Invalidate_Control;
1108 action(ee_addLocalIntAck, "e\ee", desc="add a local ack to wait for") {
1109 assert(is_valid(tbe));
1110 tbe.NumIntPendingAcks := tbe.NumIntPendingAcks + 1;
1113 action(ee_issueLocalInvExceptL1Requestor, "\eeee", desc="Send local invalidates to sharers if they exist") {
1114 peek(L1requestNetwork_in, RequestMsg) {
1116 // assert(countLocalSharers(address) > 0);
1117 if (countLocalSharers(cache_entry, address) == 0) {
1118 tbe.NumIntPendingAcks := 0;
1122 if (isLocalSharer(cache_entry, address, in_msg.Requestor)) {
1123 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address) - 1;
1126 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address);
1129 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1130 out_msg.addr := address;
1131 out_msg.Type := CoherenceRequestType:INV;
1132 out_msg.Requestor := in_msg.Requestor;
1133 out_msg.RequestorMachine := MachineType:L1Cache;
1134 out_msg.Destination.addNetDest(getLocalSharers(cache_entry, address));
1135 out_msg.Destination.remove(in_msg.Requestor);
1136 out_msg.MessageSize := MessageSizeType:Invalidate_Control;
1142 action(ee_issueLocalInvExceptL1RequestorInTBE, "\eeeeee", desc="Send local invalidates to sharers if they exist") {
1143 assert(is_valid(tbe));
1144 if (countLocalSharers(cache_entry, address) == 0) {
1145 tbe.NumIntPendingAcks := 0;
1148 if (isLocalSharer(cache_entry, address, tbe.L1_GetX_ID)) {
1149 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address) - 1;
1152 tbe.NumIntPendingAcks := countLocalSharers(cache_entry, address);
1155 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1156 out_msg.addr := address;
1157 out_msg.Type := CoherenceRequestType:INV;
1158 out_msg.Requestor := tbe.L1_GetX_ID;
1159 out_msg.RequestorMachine := MachineType:L1Cache;
1160 out_msg.Destination.addNetDest(getLocalSharers(cache_entry, address));
1161 out_msg.Destination.remove(tbe.L1_GetX_ID);
1162 out_msg.MessageSize := MessageSizeType:Invalidate_Control;
1167 action(f_sendUnblock, "f", desc="Send unblock to global directory") {
1168 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1169 out_msg.addr := address;
1170 out_msg.Type := CoherenceResponseType:UNBLOCK;
1171 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
1172 out_msg.Sender := machineID;
1173 out_msg.SenderMachine := MachineType:L2Cache;
1174 out_msg.MessageSize := MessageSizeType:Unblock_Control;
1179 action(f_sendExclusiveUnblock, "\f", desc="Send unblock to global directory") {
1180 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1181 out_msg.addr := address;
1182 out_msg.Type := CoherenceResponseType:UNBLOCK_EXCLUSIVE;
1183 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
1184 out_msg.Sender := machineID;
1185 out_msg.SenderMachine := MachineType:L2Cache;
1186 out_msg.MessageSize := MessageSizeType:Unblock_Control;
1191 action(g_recordLocalSharer, "g", desc="Record new local sharer from unblock message") {
1192 peek(responseNetwork_in, ResponseMsg) {
1193 recordLocalSharerInDir(cache_entry, in_msg.addr, in_msg.Sender);
1197 action(g_recordLocalExclusive, "\g", desc="Record new local exclusive sharer from unblock message") {
1198 peek(responseNetwork_in, ResponseMsg) {
1199 recordNewLocalExclusiveInDir(cache_entry, address, in_msg.Sender);
1203 action(gg_clearLocalSharers, "gg", desc="Clear local sharers") {
1204 removeAllLocalSharersFromDir(cache_entry, address);
1207 action(gg_clearSharerFromL1Response, "\gg", desc="Clear sharer from L1 response queue") {
1208 peek(responseNetwork_in, ResponseMsg) {
1209 removeSharerFromDir(cache_entry, in_msg.addr, in_msg.Sender);
1213 action(gg_clearSharerFromL1Request, "clsl1r", desc="Clear sharer from L1 request queue") {
1214 peek(L1requestNetwork_in, RequestMsg) {
1215 removeSharerFromDir(cache_entry, in_msg.addr, in_msg.Requestor);
1219 action(gg_clearOwnerFromL1Request, "clol1r", desc="Clear owner from L1 request queue") {
1220 peek(L1requestNetwork_in, RequestMsg) {
1221 removeOwnerFromDir(cache_entry, in_msg.addr, in_msg.Requestor);
1225 action(h_countLocalSharersExceptRequestor, "h", desc="counts number of acks needed for L1 GETX") {
1226 peek(L1requestNetwork_in, RequestMsg) {
1227 assert(is_valid(tbe));
1228 tbe.Local_GETX_IntAcks := countLocalSharersExceptRequestor(cache_entry, address, in_msg.Requestor);
1232 action(h_clearIntAcks, "\h", desc="clear IntAcks") {
1233 assert(is_valid(tbe));
1234 tbe.Local_GETX_IntAcks := 0;
1237 action(hh_countLocalSharersExceptL1GETXRequestorInTBE, "hh", desc="counts number of acks needed for L1 GETX") {
1238 assert(is_valid(tbe));
1239 tbe.Local_GETX_IntAcks := countLocalSharersExceptRequestor(cache_entry, address, tbe.L1_GetX_ID);
1242 action(i_copyDataToTBE, "\i", desc="Copy data from response queue to TBE") {
1243 peek(responseNetwork_in, ResponseMsg) {
1244 assert(is_valid(tbe));
1245 tbe.DataBlk := in_msg.DataBlk;
1246 tbe.Dirty := in_msg.Dirty;
1247 APPEND_TRANSITION_COMMENT(in_msg.Sender);
1251 action(i_allocateTBE, "i", desc="Allocate TBE for internal/external request(isPrefetch=0, number of invalidates=0)") {
1252 check_allocate(TBEs);
1253 TBEs.allocate(address);
1254 set_tbe(TBEs[address]);
1255 if(is_valid(cache_entry)) {
1256 tbe.DataBlk := cache_entry.DataBlk;
1257 tbe.Dirty := cache_entry.Dirty;
1259 tbe.NumIntPendingAcks := 0; // default value
1260 tbe.NumExtPendingAcks := 0; // default value
1261 tbe.Fwd_GetS_IDs.clear();
1262 tbe.L1_GetS_IDs.clear();
1267 action(j_forwardGlobalRequestToLocalOwner, "j", desc="Forward external request to local owner") {
1268 peek(requestNetwork_in, RequestMsg) {
1269 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1270 out_msg.addr := in_msg.addr;
1271 out_msg.Type := in_msg.Type;
1272 out_msg.Requestor := machineID;
1273 out_msg.RequestorMachine := MachineType:L2Cache;
1274 out_msg.Destination.add(getLocalOwner(cache_entry, in_msg.addr));
1275 out_msg.Type := in_msg.Type;
1276 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1277 out_msg.Acks := 0 - 1;
1282 action(jd_forwardDmaRequestToLocalOwner, "jd", desc="Forward dma request to local owner") {
1283 peek(requestNetwork_in, RequestMsg) {
1284 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1285 out_msg.addr := in_msg.addr;
1286 out_msg.Type := in_msg.Type;
1287 out_msg.Requestor := in_msg.Requestor;
1288 out_msg.RequestorMachine := in_msg.RequestorMachine;
1289 out_msg.Destination.add(getLocalOwner(cache_entry, in_msg.addr));
1290 out_msg.Type := in_msg.Type;
1291 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1292 out_msg.Acks := 0 - 1;
1298 action(k_forwardLocalGETSToLocalSharer, "k", desc="Forward local request to local sharer/owner") {
1299 peek(L1requestNetwork_in, RequestMsg) {
1300 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1301 out_msg.addr := in_msg.addr;
1302 out_msg.Type := CoherenceRequestType:GETS;
1303 out_msg.Requestor := in_msg.Requestor;
1304 out_msg.RequestorMachine := MachineType:L1Cache;
1305 // should randomize this so one node doesn't get abused more than others
1306 DirEntry dir_entry := getDirEntry(in_msg.addr);
1307 out_msg.Destination.add(dir_entry.Sharers.smallestElement(MachineType:L1Cache));
1308 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1313 action(k_forwardLocalGETXToLocalOwner, "\k", desc="Forward local request to local owner") {
1314 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1315 assert(is_valid(tbe));
1316 out_msg.addr := address;
1317 out_msg.Type := CoherenceRequestType:GETX;
1318 out_msg.Requestor := tbe.L1_GetX_ID;
1319 out_msg.RequestorMachine := MachineType:L1Cache;
1320 DirEntry dir_entry := getDirEntry(address);
1321 out_msg.Destination.add(dir_entry.Owner);
1322 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1323 out_msg.Acks := 1 + tbe.Local_GETX_IntAcks;
1327 // same as previous except that it assumes to TBE is present to get number of acks
1328 action(kk_forwardLocalGETXToLocalExclusive, "kk", desc="Forward local request to local owner") {
1329 peek(L1requestNetwork_in, RequestMsg) {
1330 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1331 out_msg.addr := in_msg.addr;
1332 out_msg.Type := CoherenceRequestType:GETX;
1333 out_msg.Requestor := in_msg.Requestor;
1334 out_msg.RequestorMachine := MachineType:L1Cache;
1335 out_msg.Destination.add(getLocalOwner(cache_entry, in_msg.addr));
1336 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1342 action(kk_forwardLocalGETSToLocalOwner, "\kk", desc="Forward local request to local owner") {
1343 peek(L1requestNetwork_in, RequestMsg) {
1344 enqueue( localRequestNetwork_out, RequestMsg, response_latency ) {
1345 out_msg.addr := in_msg.addr;
1346 out_msg.Type := CoherenceRequestType:GETS;
1347 out_msg.Requestor := in_msg.Requestor;
1348 out_msg.RequestorMachine := MachineType:L1Cache;
1349 out_msg.Destination.add(getLocalOwner(cache_entry, in_msg.addr));
1350 out_msg.MessageSize := MessageSizeType:Forwarded_Control;
1356 action(l_writebackAckNeedData, "l", desc="Send writeback ack to L1 requesting data") {
1357 peek(L1requestNetwork_in, RequestMsg) {
1358 enqueue( responseNetwork_out, ResponseMsg, response_latency ) {
1359 out_msg.addr := in_msg.addr;
1360 out_msg.Type := CoherenceResponseType:WB_ACK_DATA;
1361 out_msg.Sender := machineID;
1362 out_msg.SenderMachine := MachineType:L2Cache;
1363 out_msg.Destination.add(in_msg.Requestor);
1364 out_msg.MessageSize := MessageSizeType:Writeback_Control;
1369 action(l_writebackAckDropData, "\l", desc="Send writeback ack to L1 indicating to drop data") {
1370 peek(L1requestNetwork_in, RequestMsg) {
1371 enqueue( responseNetwork_out, ResponseMsg, response_latency ) {
1372 out_msg.addr := in_msg.addr;
1373 out_msg.Type := CoherenceResponseType:WB_ACK;
1374 out_msg.Sender := machineID;
1375 out_msg.SenderMachine := MachineType:L2Cache;
1376 out_msg.Destination.add(in_msg.Requestor);
1377 out_msg.MessageSize := MessageSizeType:Writeback_Control;
1382 action(ll_writebackNack, "\ll", desc="Send writeback nack to L1") {
1383 peek(L1requestNetwork_in, RequestMsg) {
1384 enqueue( responseNetwork_out, ResponseMsg, response_latency ) {
1385 out_msg.addr := in_msg.addr;
1386 out_msg.Type := CoherenceResponseType:WB_NACK;
1387 out_msg.Sender := machineID;
1388 out_msg.SenderMachine := MachineType:L2Cache;
1389 out_msg.Destination.add(in_msg.Requestor);
1390 out_msg.MessageSize := MessageSizeType:Writeback_Control;
1395 action(m_popRequestQueue, "m", desc="Pop request queue.") {
1396 requestNetwork_in.dequeue(clockEdge());
1399 action(m_decrementNumberOfMessagesInt, "\m", desc="Decrement the number of messages for which we're waiting") {
1400 peek(responseNetwork_in, ResponseMsg) {
1401 assert(is_valid(tbe));
1402 tbe.NumIntPendingAcks := tbe.NumIntPendingAcks + in_msg.Acks;
1406 action(m_decrementNumberOfMessagesExt, "\mmm", desc="Decrement the number of messages for which we're waiting") {
1407 peek(responseNetwork_in, ResponseMsg) {
1408 assert(is_valid(tbe));
1409 tbe.NumExtPendingAcks := tbe.NumExtPendingAcks - in_msg.Acks;
1413 action(mm_decrementNumberOfMessagesExt, "\mm", desc="Decrement the number of messages for which we're waiting") {
1414 peek(requestNetwork_in, RequestMsg) {
1415 assert(is_valid(tbe));
1416 tbe.NumExtPendingAcks := tbe.NumExtPendingAcks - in_msg.Acks;
1420 action(n_popResponseQueue, "n", desc="Pop response queue") {
1421 responseNetwork_in.dequeue(clockEdge());
1424 action(n_popTriggerQueue, "\n", desc="Pop trigger queue.") {
1425 triggerQueue_in.dequeue(clockEdge());
1428 action(o_popL1RequestQueue, "o", desc="Pop L1 request queue.") {
1429 L1requestNetwork_in.dequeue(clockEdge());
1433 action(o_checkForIntCompletion, "\o", desc="Check if we have received all the messages required for completion") {
1434 assert(is_valid(tbe));
1435 if (tbe.NumIntPendingAcks == 0) {
1436 enqueue(triggerQueue_out, TriggerMsg) {
1437 out_msg.addr := address;
1438 out_msg.Type := TriggerType:ALL_ACKS;
1443 action(o_checkForExtCompletion, "\oo", desc="Check if we have received all the messages required for completion") {
1444 assert(is_valid(tbe));
1445 if (tbe.NumExtPendingAcks == 0) {
1446 enqueue(triggerQueue_out, TriggerMsg) {
1447 out_msg.addr := address;
1448 out_msg.Type := TriggerType:ALL_ACKS;
1454 action( qq_sendDataFromTBEToMemory, "qq", desc="Send data from TBE to directory") {
1455 enqueue(globalRequestNetwork_out, RequestMsg, response_latency) {
1456 assert(is_valid(tbe));
1457 out_msg.addr := address;
1458 out_msg.Requestor := machineID;
1459 out_msg.RequestorMachine := MachineType:L2Cache;
1460 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
1462 out_msg.Type := CoherenceRequestType:WRITEBACK_DIRTY_DATA;
1463 out_msg.DataBlk := tbe.DataBlk;
1464 out_msg.MessageSize := MessageSizeType:Writeback_Data;
1466 out_msg.Type := CoherenceRequestType:WRITEBACK_CLEAN_ACK;
1467 // NOTE: in a real system this would not send data. We send
1468 // data here only so we can check it at the memory
1469 out_msg.DataBlk := tbe.DataBlk;
1470 out_msg.MessageSize := MessageSizeType:Writeback_Control;
1475 action( r_setMRU, "\rrr", desc="manually set the MRU bit for cache line" ) {
1476 if(is_valid(cache_entry)) {
1477 L2cache.setMRU(address);
1481 action( s_recordGetXL1ID, "ss", desc="record local GETX requestor") {
1482 peek(L1requestNetwork_in, RequestMsg) {
1483 assert(is_valid(tbe));
1484 tbe.L1_GetX_ID := in_msg.Requestor;
1488 action(s_deallocateTBE, "s", desc="Deallocate external TBE") {
1489 TBEs.deallocate(address);
1493 action( s_recordGetSL1ID, "\ss", desc="record local GETS requestor") {
1494 peek(L1requestNetwork_in, RequestMsg) {
1495 assert(is_valid(tbe));
1496 tbe.L1_GetS_IDs.add(in_msg.Requestor);
1500 action(t_recordFwdXID, "t", desc="record global GETX requestor") {
1501 peek(requestNetwork_in, RequestMsg) {
1502 assert(is_valid(tbe));
1503 tbe.Fwd_GetX_ID := in_msg.Requestor;
1504 tbe.Fwd_GETX_ExtAcks := in_msg.Acks;
1508 action(t_recordFwdSID, "\t", desc="record global GETS requestor") {
1509 peek(requestNetwork_in, RequestMsg) {
1510 assert(is_valid(tbe));
1511 tbe.Fwd_GetS_IDs.clear();
1512 tbe.Fwd_GetS_IDs.add(in_msg.Requestor);
1517 action(u_writeCleanDataToCache, "wCd", desc="Write clean data to cache") {
1518 peek(L1requestNetwork_in, RequestMsg) {
1519 assert(is_valid(cache_entry));
1520 cache_entry.DataBlk := in_msg.DataBlk;
1521 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
1522 address, cache_entry.DataBlk);
1523 assert(cache_entry.Dirty == false);
1527 action(u_writeDirtyDataToCache, "wDd", desc="Write dirty data to cache") {
1528 peek(L1requestNetwork_in, RequestMsg) {
1529 assert(is_valid(cache_entry));
1530 cache_entry.DataBlk := in_msg.DataBlk;
1531 DPRINTF(RubySlicc, "Address: %#x, Data Block: %s\n",
1532 address, cache_entry.DataBlk);
1533 cache_entry.Dirty := true;
1537 action(vv_allocateL2CacheBlock, "\v", desc="Set L2 cache tag equal to tag of block B.") {
1538 set_cache_entry(L2cache.allocate(address, new Entry));
1541 action(rr_deallocateL2CacheBlock, "\r", desc="Deallocate L2 cache block. Sets the cache to not present, allowing a replacement in parallel with a fetch.") {
1542 L2cache.deallocate(address);
1543 unset_cache_entry();
1546 action(uu_profileMiss, "\um", desc="Profile the demand miss") {
1547 ++L2cache.demand_misses;
1550 action(uu_profileHit, "\uh", desc="Profile the demand hit") {
1551 ++L2cache.demand_hits;
1554 action(y_copyCacheStateToDir, "y", desc="Copy cache state to directory state") {
1555 copyCacheStateToDir(cache_entry, address);
1558 action(y_copyDirToCacheAndRemove, "/y", desc="Copy dir state to cache and remove") {
1559 copyDirToCache(cache_entry, address);
1560 localDirectory.deallocate(address);
1563 action(zz_recycleGlobalRequestQueue, "\zglb", desc="Send the head of the mandatory queue to the back of the queue.") {
1564 peek(requestNetwork_in, RequestMsg) {
1565 APPEND_TRANSITION_COMMENT(in_msg.Requestor);
1567 requestNetwork_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
1570 action(zz_recycleL1RequestQueue, "\zl1", desc="Send the head of the mandatory queue to the back of the queue.") {
1571 peek(L1requestNetwork_in, RequestMsg) {
1572 APPEND_TRANSITION_COMMENT(in_msg.Requestor);
1574 L1requestNetwork_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
1577 action(st_stallAndWaitL1RequestQueue, "st", desc="Stall and wait on the address") {
1578 stall_and_wait(L1requestNetwork_in, address);
1581 action(wa_wakeUpDependents, "wa", desc="Wake up any requests waiting for this address") {
1582 wakeUpAllBuffers(address);
1585 action(da_sendDmaAckUnblock, "da", desc="Send dma ack to global directory") {
1586 enqueue(responseNetwork_out, ResponseMsg, response_latency) {
1587 out_msg.addr := address;
1588 out_msg.Type := CoherenceResponseType:DMA_ACK;
1589 out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
1590 out_msg.Sender := machineID;
1591 out_msg.SenderMachine := MachineType:L2Cache;
1592 out_msg.MessageSize := MessageSizeType:Unblock_Control;
1598 //*****************************************************
1600 //*****************************************************
1602 transition({II, IFGX, IFGS, ISFGS, IFGXX, IFLXO, ILOW, ILOXW, ILOSW, ILOSXW, SLSW, OLSW, ILSW, IW, OW, SW, OXW, OLSXW, ILXW, IFLS, IFLO, IFLOX, IFLOXX, IFLOSX, OLSXS, IGS, IGM, IGMLS, IGMO, IGMIO, OGMIO, IGMIOF, OGMIOF, MM, SS, OO, OI, MI, MII, OLSI, ILSI, SLSS, OLSS, OLSF, IGMIOFS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, {L1_PUTO, L1_PUTS, L1_PUTS_only, L1_PUTX}) {
1603 st_stallAndWaitL1RequestQueue;
1606 transition({II, IFGX, IFGS, ISFGS, IFGXX, IFLXO, ILOW, ILOXW, ILOSW, ILOSXW, SLSW, OLSW, ILSW, IW, OW, SW, OXW, OLSXW, ILXW, IFLS, IFLO, IFLOX, IFLOXX, IFLOSX, OLSXS, IGS, IGM, IGMLS, IGMO, IGMIO, OGMIO, IGMIOF, OGMIOF, MM, SS, OO, OI, MI, MII, OLSI, ILSI, SLSS, OLSS, OLSF, IGMIOFS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, {L1_GETX, L1_GETS}) {
1607 st_stallAndWaitL1RequestQueue;
1610 transition({IFGX, IFGS, ISFGS, IFGXX, IFLXO, ILOW, ILOXW, ILOSW, ILOSXW, SLSW, OLSW, ILSW, IW, ILXW, OW, SW, OXW, OLSXW, IFLS, IFLO, IFLOX, IFLOXX, IFLOSX,OLSXS, IGS, IGM, IGMLS, IGMO, MM, SS, OO, OI, MI, MII, OLSI, ILSI, SLSS, OLSS, OLSF, IGMIOFS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, L2_Replacement) {
1611 zz_recycleL1RequestQueue;
1614 transition({IFGX, IFGS, ISFGS, IFGXX, IFLXO, ILOW, ILOXW, ILOSW, ILOSXW, SLSW, OLSW, ILSW, IW, OW, SW, OXW, OLSXW, ILXW, IFLS, IFLO, IFLOX, IFLOXX, IFLOSX,OLSXS, IGS, IGM, MM, SS, OO, SLSS, OLSS, OLSF, IGMIOFS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, {Fwd_GETX, Fwd_GETS, Fwd_DMA}) {
1615 zz_recycleGlobalRequestQueue;
1618 transition({OGMIO, IGMIO, IGMO}, Fwd_DMA) {
1619 zz_recycleGlobalRequestQueue;
1622 transition({IFGX, IFGS, ISFGS, IFGXX, IFLXO, ILOW, ILOXW, ILOSW, ILOSXW, SLSW, OLSW, ILSW, IW, OW, SW, OXW, OLSXW, ILXW, IFLS, IFLO, IFLOX, IFLOXX, IFLOSX,OLSXS, MM, SS, OO, SLSS, OLSS, OLSF, IGMIOFS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, {Inv}) {
1623 zz_recycleGlobalRequestQueue;
1626 transition({IGM, IGS, ILOSD, ILOSXD, ILOD, ILXD, ILOXD}, {Own_GETX}) {
1627 zz_recycleGlobalRequestQueue;
1630 // must happened because we forwarded GETX to local exclusive trying to do wb
1631 transition({I, M, O, ILS, ILOX, OLS, OLSX, SLS, S}, L1_PUTX) {
1633 o_popL1RequestQueue;
1636 transition({M}, {L1_PUTS, L1_PUTO} ) {
1638 o_popL1RequestQueue;
1641 transition({ILS, OLSX}, L1_PUTO){
1643 o_popL1RequestQueue;
1646 // happened if we forwarded GETS to exclusive who tried to do writeback
1647 // ?? should we just Nack these instead? Could be a bugs here
1648 transition(ILO, L1_PUTX, ILOW) {
1649 l_writebackAckNeedData;
1650 o_popL1RequestQueue;
1653 // this can happen if we forwarded a L1_GETX to exclusiver after it issued a PUTX
1654 transition(ILOS, L1_PUTX, ILOSW) {
1655 l_writebackAckNeedData;
1656 o_popL1RequestQueue;
1659 transition(ILOSX, L1_PUTX, ILOSXW) {
1660 l_writebackAckNeedData;
1661 o_popL1RequestQueue;
1664 // must happened because we got Inv when L1 attempted PUTS
1665 transition(I, L1_PUTS) {
1667 o_popL1RequestQueue;
1670 transition(I, L1_PUTO) {
1672 o_popL1RequestQueue;
1675 // FORWARDED REQUESTS
1677 transition({ILO, ILX, ILOX}, Fwd_GETS, IFGS) {
1680 j_forwardGlobalRequestToLocalOwner;
1684 transition({ILOS, ILOSX}, Fwd_GETS, ISFGS) {
1687 j_forwardGlobalRequestToLocalOwner;
1691 transition(ILOS, Fwd_DMA, ILOSD) {
1693 jd_forwardDmaRequestToLocalOwner;
1697 transition(ILOSD, DmaAck, ILOS) {
1699 da_sendDmaAckUnblock;
1701 wa_wakeUpDependents;
1704 transition(ILOSX, Fwd_DMA, ILOSXD) {
1707 jd_forwardDmaRequestToLocalOwner;
1711 transition(ILOSXD, DmaAck, ILOSX) {
1713 da_sendDmaAckUnblock;
1715 wa_wakeUpDependents;
1718 transition(ILO, Fwd_DMA, ILOD) {
1721 jd_forwardDmaRequestToLocalOwner;
1725 transition(ILOD, DmaAck, ILO) {
1727 da_sendDmaAckUnblock;
1729 wa_wakeUpDependents;
1732 transition(ILX, Fwd_DMA, ILXD) {
1735 jd_forwardDmaRequestToLocalOwner;
1739 transition(ILXD, DmaAck, ILX) {
1741 da_sendDmaAckUnblock;
1743 wa_wakeUpDependents;
1746 transition(ILOX, Fwd_DMA, ILOXD) {
1749 jd_forwardDmaRequestToLocalOwner;
1753 transition(ILOXD, DmaAck, ILOX) {
1755 da_sendDmaAckUnblock;
1757 wa_wakeUpDependents;
1760 transition({ILOS, ILOSX, ILO, ILX, ILOX, ILXW}, Data) {
1762 c_sendDataFromTBEToFwdGETS;
1767 transition(IFGS, Data, ILO) {
1769 c_sendDataFromTBEToFwdGETS;
1772 wa_wakeUpDependents;
1775 transition(ISFGS, Data, ILOS) {
1777 c_sendDataFromTBEToFwdGETS;
1780 wa_wakeUpDependents;
1783 transition(IFGS, Data_Exclusive, I) {
1785 c_sendExclusiveDataFromTBEToFwdGETS;
1786 gg_clearLocalSharers;
1789 wa_wakeUpDependents;
1793 transition({ILX, ILO, ILOX}, Fwd_GETX, IFGX) {
1796 j_forwardGlobalRequestToLocalOwner;
1800 transition(IFGX, {Data_Exclusive, Data}, I) {
1802 c_sendDataFromTBEToFwdGETX;
1803 gg_clearLocalSharers;
1806 wa_wakeUpDependents;
1809 transition({ILOSX, ILOS}, Fwd_GETX, IFGXX) {
1812 j_forwardGlobalRequestToLocalOwner;
1813 ee_sendLocalInvSharersOnly;
1819 transition(IFGXX, IntAck) {
1820 m_decrementNumberOfMessagesInt;
1821 o_checkForIntCompletion;
1825 transition(IFGXX, Data_Exclusive) {
1827 m_decrementNumberOfMessagesInt;
1828 o_checkForIntCompletion;
1832 transition(IFGXX, All_Acks, I) {
1833 c_sendDataFromTBEToFwdGETX;
1834 gg_clearLocalSharers;
1837 wa_wakeUpDependents;
1841 // transition({O, OX}, Fwd_GETX, I) {
1842 transition(O, Fwd_GETX, I) {
1843 dd_sendDataToFwdGETX;
1844 y_copyCacheStateToDir;
1845 rr_deallocateL2CacheBlock;
1849 transition({O, OLS}, Fwd_GETS) {
1850 dd_sendDataToFwdGETS;
1854 transition({O, OLS}, Fwd_DMA) {
1855 dd_sendDataToFwdGETS;
1856 da_sendDmaAckUnblock;
1860 // transition({OLSX, OX}, Fwd_GETS, O) {
1861 transition(OLSX, Fwd_GETS, OLS) {
1862 dd_sendDataToFwdGETS;
1866 transition(OLSX, Fwd_DMA) {
1867 dd_sendDataToFwdGETS;
1868 da_sendDmaAckUnblock;
1872 transition(M, Fwd_GETX, I) {
1873 dd_sendDataToFwdGETX;
1874 rr_deallocateL2CacheBlock;
1878 // MAKE THIS THE SAME POLICY FOR NOW
1880 // transition(M, Fwd_GETS, O) {
1881 // dd_sendDataToFwdGETS;
1882 // m_popRequestQueue;
1885 transition(M, Fwd_GETS, I) {
1886 dd_sendExclusiveDataToFwdGETS;
1887 rr_deallocateL2CacheBlock;
1891 transition(M, Fwd_DMA) {
1892 dd_sendExclusiveDataToFwdGETS;
1893 da_sendDmaAckUnblock;
1897 transition({OLS, OLSX}, Fwd_GETX, OLSF) {
1904 transition(OLSF, IntAck) {
1905 m_decrementNumberOfMessagesInt;
1906 o_checkForIntCompletion;
1910 transition(OLSF, All_Acks, I) {
1911 c_sendDataFromTBEToFwdGETX;
1912 gg_clearLocalSharers;
1914 rr_deallocateL2CacheBlock;
1916 wa_wakeUpDependents;
1921 // INVALIDATIONS FROM GLOBAL DIRECTORY
1923 transition({IGM, IGS}, Inv) {
1929 transition({I,NP}, Inv) {
1937 // NEED INV for S state
1939 transition({ILS, ILO, ILX}, Inv, II) {
1943 gg_clearLocalSharers;
1947 transition(SLS, Inv, II) {
1951 rr_deallocateL2CacheBlock;
1955 transition(II, IntAck) {
1956 m_decrementNumberOfMessagesInt;
1957 o_checkForIntCompletion;
1961 transition(II, All_Acks, I) {
1965 wa_wakeUpDependents;
1968 transition(S, Inv, I) {
1973 rr_deallocateL2CacheBlock;
1978 // LOCAL REQUESTS SATISFIED LOCALLY
1980 transition(OLSX, L1_GETX, IFLOX) {
1983 // count number of INVs needed that doesn't include requestor
1984 h_countLocalSharersExceptRequestor;
1985 // issue INVs to everyone except requestor
1986 ee_issueLocalInvExceptL1Requestor;
1988 y_copyCacheStateToDir;
1990 rr_deallocateL2CacheBlock;
1992 o_popL1RequestQueue;
1995 transition(IFLOX, Exclusive_Unblock, ILX) {
1996 g_recordLocalExclusive;
1999 wa_wakeUpDependents;
2002 transition(OLSX, L1_GETS, OLSXS) {
2006 o_popL1RequestQueue;
2009 transition(OLSXS, Unblock, OLSX) {
2010 g_recordLocalSharer;
2012 wa_wakeUpDependents;
2015 // after this, can't get Fwd_GETX
2016 transition(IGMO, Own_GETX) {
2017 mm_decrementNumberOfMessagesExt;
2018 o_checkForExtCompletion;
2024 transition(ILX, L1_GETS, IFLOXX) {
2025 kk_forwardLocalGETSToLocalOwner;
2027 o_popL1RequestQueue;
2030 transition(ILOSX, L1_GETS, IFLOSX) {
2031 kk_forwardLocalGETSToLocalOwner;
2033 o_popL1RequestQueue;
2036 transition({ILOS, ILO}, L1_GETS, IFLO) {
2037 kk_forwardLocalGETSToLocalOwner;
2039 o_popL1RequestQueue;
2042 transition(ILS, L1_GETS, IFLS) {
2043 k_forwardLocalGETSToLocalSharer;
2045 o_popL1RequestQueue;
2048 transition({ILX, ILOX}, L1_GETX, IFLOXX) {
2049 kk_forwardLocalGETXToLocalExclusive;
2050 e_sendAckToL1Requestor;
2052 o_popL1RequestQueue;
2055 transition(ILOX, L1_GETS, IFLOX) {
2056 kk_forwardLocalGETSToLocalOwner;
2058 o_popL1RequestQueue;
2061 transition(IFLOX, Unblock, ILOSX) {
2062 g_recordLocalSharer;
2064 wa_wakeUpDependents;
2067 transition(IFLS, Unblock, ILS) {
2068 g_recordLocalSharer;
2070 wa_wakeUpDependents;
2073 transition(IFLOXX, Unblock, ILOSX) {
2074 g_recordLocalSharer;
2076 wa_wakeUpDependents;
2079 transition(IFLOSX, Unblock, ILOSX) {
2080 g_recordLocalSharer;
2082 wa_wakeUpDependents;
2085 transition({IFLOSX, IFLOXX}, Exclusive_Unblock, ILX) {
2086 g_recordLocalExclusive;
2088 wa_wakeUpDependents;
2091 transition(IFLO, Unblock, ILOS) {
2092 g_recordLocalSharer;
2094 wa_wakeUpDependents;
2098 transition(ILOSX, L1_GETX, IFLXO) {
2101 h_countLocalSharersExceptRequestor;
2102 ee_issueLocalInvExceptL1Requestor;
2103 k_forwardLocalGETXToLocalOwner;
2104 e_sendAckToL1RequestorFromTBE;
2106 o_popL1RequestQueue;
2109 transition(IFLXO, Exclusive_Unblock, ILX) {
2110 g_recordLocalExclusive;
2113 wa_wakeUpDependents;
2116 // LOCAL REQUESTS THAT MUST ISSUE
2118 transition(NP, {L1_PUTS, L1_PUTX, L1_PUTO}) {
2120 o_popL1RequestQueue;
2123 transition({NP, I}, L1_GETS, IGS) {
2128 o_popL1RequestQueue;
2131 transition({NP, I}, L1_GETX, IGM) {
2136 o_popL1RequestQueue;
2139 transition(S, L1_GETX, IGM) {
2143 y_copyCacheStateToDir;
2145 rr_deallocateL2CacheBlock;
2147 o_popL1RequestQueue;
2150 transition(ILS, L1_GETX, IGMLS) {
2154 // count number of INVs (just sharers?) needed that doesn't include requestor
2155 h_countLocalSharersExceptRequestor;
2157 o_popL1RequestQueue;
2160 transition(IGMLS, Inv) {
2166 transition(IGMLS, IntAck) {
2167 m_decrementNumberOfMessagesInt;
2168 o_checkForIntCompletion;
2172 transition(IGMLS, All_Acks, IGM) {
2173 gg_clearLocalSharers;
2179 // transition(IGMLS, ExtAck, IGMO) {
2180 transition(IGMLS, ExtAck) {
2181 m_decrementNumberOfMessagesExt;
2182 o_checkForExtCompletion;
2186 transition(IGMLS, {Data, Data_Exclusive}, IGMO) {
2187 ee_issueLocalInvExceptL1RequestorInTBE;
2189 m_decrementNumberOfMessagesExt;
2190 o_checkForExtCompletion;
2195 transition(ILOS, L1_GETX, IGMIO) {
2200 o_popL1RequestQueue;
2203 // new exclusive happened while sharer attempted writeback
2204 transition(ILX, {L1_PUTS, L1_PUTS_only, L1_PUTO}) {
2206 o_popL1RequestQueue;
2209 transition(S, L1_PUTS) {
2211 o_popL1RequestQueue;
2214 transition(OLS, L1_GETX, OGMIO) {
2218 h_countLocalSharersExceptRequestor;
2219 // COPY DATA FROM CACHE TO TBE (happens during i_allocateTBE)
2220 y_copyCacheStateToDir;
2221 rr_deallocateL2CacheBlock;
2223 o_popL1RequestQueue;
2226 transition(OGMIO, Fwd_GETS) {
2228 c_sendDataFromTBEToFwdGETS;
2232 transition(ILO, L1_GETX, IGMIO) {
2236 // the following, of course, returns 0 sharers but do anyways for consistency
2237 h_countLocalSharersExceptRequestor;
2239 o_popL1RequestQueue;
2242 transition({ILO, ILOX}, L1_PUTS) {
2244 o_popL1RequestQueue;
2247 transition(IGMIO, Fwd_GETX, IGMIOF) {
2249 j_forwardGlobalRequestToLocalOwner;
2250 ee_sendLocalInvSharersOnly;
2255 transition(IGMIO, Fwd_GETS, IGMIOFS) {
2257 j_forwardGlobalRequestToLocalOwner;
2261 transition(IGMIOFS, Data, IGMIO) {
2263 c_sendDataFromTBEToFwdGETS;
2267 transition(OGMIO, Fwd_GETX, OGMIOF) {
2269 ee_sendLocalInvSharersOnly;
2273 transition(OGMIOF, IntAck) {
2274 m_decrementNumberOfMessagesInt;
2275 o_checkForIntCompletion;
2279 transition(OGMIOF, All_Acks, IGM) {
2280 gg_clearLocalSharers;
2281 hh_countLocalSharersExceptL1GETXRequestorInTBE;
2282 c_sendDataFromTBEToFwdGETX;
2286 transition(IGMIOF, IntAck) {
2287 m_decrementNumberOfMessagesInt;
2288 o_checkForIntCompletion;
2292 transition(IGMIOF, Data_Exclusive) {
2294 m_decrementNumberOfMessagesInt;
2295 o_checkForIntCompletion;
2299 transition(IGMIOF, All_Acks, IGM) {
2300 gg_clearLocalSharers;
2301 c_sendDataFromTBEToFwdGETX;
2305 transition(IGMIO, All_Acks, IGMO) {
2306 hh_countLocalSharersExceptL1GETXRequestorInTBE;
2307 ee_issueLocalInvExceptL1RequestorInTBE;
2308 k_forwardLocalGETXToLocalOwner;
2309 e_sendAckToL1RequestorFromTBE;
2313 transition(OGMIO, All_Acks, IGMO) {
2314 ee_issueLocalInvExceptL1RequestorInTBE;
2315 c_sendDataFromTBEToL1GETX;
2319 transition({IGMIO, OGMIO}, Own_GETX) {
2320 mm_decrementNumberOfMessagesExt;
2321 o_checkForExtCompletion;
2326 transition(IGM, {Data, Data_Exclusive}, IGMO) {
2328 m_decrementNumberOfMessagesExt;
2329 o_checkForExtCompletion;
2333 transition({IGM, IGMIO, OGMIO}, ExtAck) {
2334 m_decrementNumberOfMessagesExt;
2335 o_checkForExtCompletion;
2339 transition(IGMO, ExtAck) {
2340 m_decrementNumberOfMessagesExt;
2341 o_checkForExtCompletion;
2345 transition(IGS, Data) {
2347 m_decrementNumberOfMessagesExt;
2348 c_sendDataFromTBEToL1GETS;
2352 transition(IGS, Data_Exclusive) {
2354 m_decrementNumberOfMessagesExt;
2355 c_sendExclusiveDataFromTBEToL1GETS;
2359 transition(IGS, Unblock, ILS) {
2360 g_recordLocalSharer;
2364 wa_wakeUpDependents;
2367 transition(IGS, Exclusive_Unblock, ILX) {
2368 g_recordLocalExclusive;
2369 f_sendExclusiveUnblock;
2372 wa_wakeUpDependents;
2375 transition(IGMO, All_Acks) {
2376 c_sendDataFromTBEToL1GETX;
2380 transition(IGMO, Exclusive_Unblock, ILX) {
2381 g_recordLocalExclusive;
2382 f_sendExclusiveUnblock;
2385 wa_wakeUpDependents;
2389 transition(SLS, L1_GETX, IGMLS) {
2393 // count number of INVs needed that doesn't include requestor
2394 h_countLocalSharersExceptRequestor;
2395 // issue INVs to everyone except requestor
2396 y_copyCacheStateToDir;
2397 rr_deallocateL2CacheBlock;
2399 o_popL1RequestQueue;
2403 transition(SLS, L1_GETS, SLSS ) {
2407 o_popL1RequestQueue;
2410 transition(SLSS, Unblock, SLS) {
2411 g_recordLocalSharer;
2413 wa_wakeUpDependents;
2417 transition(O, L1_GETX, IGMO) {
2421 y_copyCacheStateToDir;
2422 rr_deallocateL2CacheBlock;
2424 o_popL1RequestQueue;
2427 transition(OLS, L1_GETS, OLSS) {
2431 o_popL1RequestQueue;
2434 transition(OLSS, Unblock, OLS) {
2435 g_recordLocalSharer;
2437 wa_wakeUpDependents;
2440 transition(IGMO, Fwd_GETX, IGM) {
2442 c_sendDataFromTBEToFwdGETX;
2447 transition(IGMO, Fwd_GETS) {
2449 c_sendDataFromTBEToFwdGETS;
2454 // LOCAL REQUESTS SATISFIED DIRECTLY BY L2
2456 transition(M, L1_GETX, MM) {
2458 // should count 0 of course
2459 h_countLocalSharersExceptRequestor;
2461 y_copyCacheStateToDir;
2462 rr_deallocateL2CacheBlock;
2465 o_popL1RequestQueue;
2468 transition(MM, Exclusive_Unblock, ILX) {
2469 g_recordLocalExclusive;
2471 wa_wakeUpDependents;
2474 transition(M, L1_GETS, OO) {
2476 // should count 0 of course
2477 h_countLocalSharersExceptRequestor;
2482 o_popL1RequestQueue;
2485 transition(S, L1_GETS, SS) {
2489 o_popL1RequestQueue;
2492 transition(SS, Unblock, SLS) {
2493 g_recordLocalSharer;
2495 wa_wakeUpDependents;
2498 transition(O, L1_GETS, OO) {
2502 o_popL1RequestQueue;
2505 transition(OO, Unblock, OLS) {
2506 g_recordLocalSharer;
2508 wa_wakeUpDependents;
2511 transition(OO, Exclusive_Unblock, ILX) {
2512 g_recordLocalExclusive
2513 y_copyCacheStateToDir;
2514 rr_deallocateL2CacheBlock;
2516 wa_wakeUpDependents;
2521 transition(ILO, L1_PUTO, ILOW) {
2522 l_writebackAckNeedData;
2523 o_popL1RequestQueue;
2526 transition(ILOX, L1_PUTO, ILOXW) {
2527 l_writebackAckNeedData;
2528 o_popL1RequestQueue;
2532 transition(ILOS, L1_PUTO, ILOSW) {
2533 l_writebackAckNeedData;
2534 o_popL1RequestQueue;
2537 transition(ILOSX, L1_PUTO, ILOSXW) {
2538 l_writebackAckNeedData;
2539 o_popL1RequestQueue;
2543 // hmmm...keep data or drop. Just drop for now
2544 transition(ILOS, L1_PUTS_only, ILOW) {
2545 l_writebackAckDropData;
2546 o_popL1RequestQueue;
2549 transition(ILSW, Unblock, ILS) {
2550 gg_clearSharerFromL1Response;
2552 wa_wakeUpDependents;
2555 transition(ILOW, Unblock, ILO) {
2556 gg_clearSharerFromL1Response;
2558 wa_wakeUpDependents;
2561 transition(ILOSX, L1_PUTS_only, ILOXW) {
2562 l_writebackAckDropData;
2563 o_popL1RequestQueue;
2566 transition(ILOXW, Unblock, ILOX) {
2567 gg_clearSharerFromL1Response;
2569 wa_wakeUpDependents;
2572 // hmmm...keep data or drop. Just drop for now
2573 transition(ILOS, L1_PUTS, ILOSW) {
2574 l_writebackAckDropData;
2575 o_popL1RequestQueue;
2578 transition(ILOSX, L1_PUTS, ILOSXW) {
2579 l_writebackAckDropData;
2580 o_popL1RequestQueue;
2583 transition(ILOSW, Unblock, ILOS) {
2584 gg_clearSharerFromL1Response;
2586 wa_wakeUpDependents;
2589 transition(ILOSXW, Unblock, ILOSX) {
2590 gg_clearSharerFromL1Response;
2592 wa_wakeUpDependents;
2595 transition(SLS, L1_PUTS, SLSW) {
2596 l_writebackAckDropData;
2597 o_popL1RequestQueue;
2600 transition(SLS, L1_PUTS_only, SW) {
2601 l_writebackAckDropData;
2602 o_popL1RequestQueue;
2605 transition(SW, {Unblock}, S) {
2606 gg_clearSharerFromL1Response;
2608 wa_wakeUpDependents;
2611 transition(OLS, L1_PUTS, OLSW) {
2612 l_writebackAckDropData;
2613 o_popL1RequestQueue;
2616 transition(ILS, L1_PUTS, ILSW) {
2617 l_writebackAckNeedData;
2618 o_popL1RequestQueue;
2621 transition(ILS, L1_PUTS_only, IW) {
2622 l_writebackAckNeedData;
2623 o_popL1RequestQueue;
2626 transition(OLS, L1_PUTS_only, OW) {
2627 l_writebackAckDropData;
2628 o_popL1RequestQueue;
2631 transition(OLSX, L1_PUTS_only, OXW) {
2632 l_writebackAckDropData;
2633 o_popL1RequestQueue;
2636 transition(OLSX, L1_PUTS, OLSXW) {
2637 l_writebackAckDropData;
2638 o_popL1RequestQueue;
2641 transition(OLSXW, {Unblock}, OLSX) {
2642 gg_clearSharerFromL1Response;
2644 wa_wakeUpDependents;
2647 transition(OW, {Unblock}, O) {
2648 gg_clearSharerFromL1Response;
2650 wa_wakeUpDependents;
2653 transition(OXW, {Unblock}, M) {
2654 gg_clearSharerFromL1Response;
2656 wa_wakeUpDependents;
2659 transition(ILX, L1_PUTX, ILXW ) {
2660 l_writebackAckNeedData;
2661 o_popL1RequestQueue;
2664 transition(ILXW, L1_WBDIRTYDATA, M) {
2665 gg_clearLocalSharers;
2666 vv_allocateL2CacheBlock;
2667 y_copyDirToCacheAndRemove;
2668 u_writeDirtyDataToCache;
2669 o_popL1RequestQueue;
2670 wa_wakeUpDependents;
2674 transition(ILXW, L1_WBCLEANDATA, M) {
2675 gg_clearLocalSharers;
2676 vv_allocateL2CacheBlock;
2677 y_copyDirToCacheAndRemove;
2678 u_writeCleanDataToCache;
2679 o_popL1RequestQueue;
2680 wa_wakeUpDependents;
2683 transition(ILXW, Unblock, ILX) {
2684 // writeback canceled because L1 invalidated
2686 wa_wakeUpDependents;
2689 transition(ILSW, L1_WBCLEANDATA, SLS) {
2690 vv_allocateL2CacheBlock;
2691 y_copyDirToCacheAndRemove;
2692 u_writeCleanDataToCache;
2693 gg_clearSharerFromL1Request;
2694 o_popL1RequestQueue;
2695 wa_wakeUpDependents;
2698 transition(IW, L1_WBCLEANDATA, S) {
2699 vv_allocateL2CacheBlock;
2700 y_copyDirToCacheAndRemove;
2701 u_writeCleanDataToCache;
2702 gg_clearSharerFromL1Request;
2703 o_popL1RequestQueue;
2704 wa_wakeUpDependents;
2707 // Owner can have dirty data
2708 transition(ILOW, L1_WBDIRTYDATA, O) {
2709 vv_allocateL2CacheBlock;
2710 y_copyDirToCacheAndRemove;
2711 gg_clearOwnerFromL1Request;
2712 u_writeDirtyDataToCache;
2713 o_popL1RequestQueue;
2714 wa_wakeUpDependents;
2717 transition(ILOW, L1_WBCLEANDATA, O) {
2718 vv_allocateL2CacheBlock;
2719 y_copyDirToCacheAndRemove;
2720 gg_clearOwnerFromL1Request;
2721 u_writeCleanDataToCache;
2722 o_popL1RequestQueue;
2723 wa_wakeUpDependents;
2726 transition(ILOXW, L1_WBDIRTYDATA, M) {
2727 vv_allocateL2CacheBlock;
2728 y_copyDirToCacheAndRemove;
2729 gg_clearOwnerFromL1Request;
2730 u_writeDirtyDataToCache;
2731 o_popL1RequestQueue;
2732 wa_wakeUpDependents;
2735 transition(ILOXW, L1_WBCLEANDATA, M) {
2736 vv_allocateL2CacheBlock;
2737 y_copyDirToCacheAndRemove;
2738 gg_clearOwnerFromL1Request;
2739 u_writeCleanDataToCache;
2740 o_popL1RequestQueue;
2741 wa_wakeUpDependents;
2744 transition(ILOSW, L1_WBDIRTYDATA, OLS) {
2745 vv_allocateL2CacheBlock;
2746 y_copyDirToCacheAndRemove;
2747 gg_clearOwnerFromL1Request;
2748 u_writeDirtyDataToCache;
2749 o_popL1RequestQueue;
2750 wa_wakeUpDependents;
2753 transition(ILOSW, L1_WBCLEANDATA, OLS) {
2754 vv_allocateL2CacheBlock;
2755 y_copyDirToCacheAndRemove;
2756 gg_clearOwnerFromL1Request;
2757 u_writeCleanDataToCache;
2758 o_popL1RequestQueue;
2759 wa_wakeUpDependents;
2762 transition(ILOSXW, L1_WBDIRTYDATA, OLSX) {
2763 vv_allocateL2CacheBlock;
2764 y_copyDirToCacheAndRemove;
2765 gg_clearOwnerFromL1Request;
2766 u_writeDirtyDataToCache;
2767 o_popL1RequestQueue;
2768 wa_wakeUpDependents;
2771 transition(ILOSXW, L1_WBCLEANDATA, OLSX) {
2772 vv_allocateL2CacheBlock;
2773 y_copyDirToCacheAndRemove;
2774 gg_clearOwnerFromL1Request;
2775 u_writeCleanDataToCache;
2776 o_popL1RequestQueue;
2777 wa_wakeUpDependents;
2780 transition(SLSW, {Unblock}, SLS) {
2781 gg_clearSharerFromL1Response;
2783 wa_wakeUpDependents;
2786 transition(OLSW, {Unblock}, OLS) {
2787 gg_clearSharerFromL1Response;
2789 wa_wakeUpDependents;
2794 transition({I, S}, L2_Replacement, I) {
2795 rr_deallocateL2CacheBlock;
2798 transition(ILS, L2_Replacement) {
2799 y_copyCacheStateToDir;
2800 rr_deallocateL2CacheBlock;
2803 transition(ILX, L2_Replacement ) {
2804 y_copyCacheStateToDir;
2805 rr_deallocateL2CacheBlock;
2808 transition({ILO, ILOS}, L2_Replacement ) {
2809 y_copyCacheStateToDir;
2810 rr_deallocateL2CacheBlock;
2813 transition(SLS, L2_Replacement, ILS) {
2814 y_copyCacheStateToDir;
2815 rr_deallocateL2CacheBlock;
2818 transition({OLS, OLSX}, L2_Replacement, OLSI) {
2819 y_copyCacheStateToDir;
2822 rr_deallocateL2CacheBlock;
2826 transition(O, L2_Replacement, OI) {
2829 rr_deallocateL2CacheBlock;
2832 transition(M, L2_Replacement, MI) {
2835 rr_deallocateL2CacheBlock;
2838 transition(OLSI, Fwd_GETX, ILSI) {
2844 transition(ILSI, IntAck) {
2845 m_decrementNumberOfMessagesInt;
2846 o_checkForIntCompletion;
2850 transition(ILSI, All_Acks, MII) {
2851 gg_clearLocalSharers;
2852 c_sendDataFromTBEToFwdGETX;
2856 transition(OLSI, Fwd_GETS) {
2858 c_sendDataFromTBEToFwdGETS;
2862 transition({MI, OI}, Fwd_GETS, OI) {
2864 c_sendDataFromTBEToFwdGETS;
2868 transition({MI, OI}, Fwd_DMA, OI) {
2869 cd_sendDataFromTBEToFwdDma;
2870 da_sendDmaAckUnblock;
2874 transition(OLSI, Fwd_DMA) {
2875 cd_sendDataFromTBEToFwdDma;
2876 da_sendDmaAckUnblock;
2880 transition({MI, OI}, Fwd_GETX, MII) {
2882 c_sendDataFromTBEToFwdGETX;
2886 transition({MI, OI}, Writeback_Ack, I) {
2887 qq_sendDataFromTBEToMemory;
2890 wa_wakeUpDependents;
2893 transition(MII, Writeback_Nack, I) {
2896 wa_wakeUpDependents;
2899 transition(OI, Writeback_Nack) {
2904 transition(OLSI, Writeback_Ack, ILS) {
2905 qq_sendDataFromTBEToMemory;
2908 wa_wakeUpDependents;
2911 transition(MII, Writeback_Ack, I) {
2915 wa_wakeUpDependents;
2918 transition(ILSI, Writeback_Ack, ILS) {
2922 wa_wakeUpDependents;