114184Sgabeblack@google.com/*
214184Sgabeblack@google.com * Copyright (c) 2010-2015 Advanced Micro Devices, Inc.
314184Sgabeblack@google.com * All rights reserved.
414184Sgabeblack@google.com *
514184Sgabeblack@google.com * For use for simulation and test purposes only
614184Sgabeblack@google.com *
714184Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without
814184Sgabeblack@google.com * modification, are permitted provided that the following conditions are met:
914184Sgabeblack@google.com *
1014184Sgabeblack@google.com * 1. Redistributions of source code must retain the above copyright notice,
1114184Sgabeblack@google.com * this list of conditions and the following disclaimer.
1214184Sgabeblack@google.com *
1314184Sgabeblack@google.com * 2. Redistributions in binary form must reproduce the above copyright notice,
1414184Sgabeblack@google.com * this list of conditions and the following disclaimer in the documentation
1514184Sgabeblack@google.com * and/or other materials provided with the distribution.
1614184Sgabeblack@google.com *
1714184Sgabeblack@google.com * 3. Neither the name of the copyright holder nor the names of its
1814184Sgabeblack@google.com * contributors may be used to endorse or promote products derived from this
1914184Sgabeblack@google.com * software without specific prior written permission.
2014184Sgabeblack@google.com *
2114184Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2214184Sgabeblack@google.com * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2314184Sgabeblack@google.com * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2414184Sgabeblack@google.com * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
2514184Sgabeblack@google.com * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2614184Sgabeblack@google.com * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2714184Sgabeblack@google.com * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2814184Sgabeblack@google.com * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2914184Sgabeblack@google.com * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3014184Sgabeblack@google.com * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3114184Sgabeblack@google.com * POSSIBILITY OF SUCH DAMAGE.
3214184Sgabeblack@google.com *
3314184Sgabeblack@google.com * Authors: Lisa Hsu
3414184Sgabeblack@google.com */
3514184Sgabeblack@google.com
3614184Sgabeblack@google.commachine(MachineType:L3Cache, "L3")
3714184Sgabeblack@google.com : CacheMemory * L3cache;
3814184Sgabeblack@google.com   WireBuffer * reqToDir;
3914184Sgabeblack@google.com   WireBuffer * respToDir;
4014184Sgabeblack@google.com   WireBuffer * l3UnblockToDir;
4114184Sgabeblack@google.com   WireBuffer * reqToL3;
4214184Sgabeblack@google.com   WireBuffer * probeToL3;
4314184Sgabeblack@google.com   WireBuffer * respToL3;
4414184Sgabeblack@google.com   Cycles l3_request_latency := 1;
4514184Sgabeblack@google.com   Cycles l3_response_latency := 35;
4614184Sgabeblack@google.com
4714184Sgabeblack@google.com  // To the general response network
4814184Sgabeblack@google.com  MessageBuffer * responseFromL3, network="To", virtual_network="2", ordered="false", vnet_type="response";
4914184Sgabeblack@google.com
5014184Sgabeblack@google.com  // From the general response network
5114184Sgabeblack@google.com  MessageBuffer * responseToL3, network="From", virtual_network="2", ordered="false", vnet_type="response";
5214184Sgabeblack@google.com
5314184Sgabeblack@google.com{
5414184Sgabeblack@google.com  // EVENTS
5514184Sgabeblack@google.com  enumeration(Event, desc="L3 Events") {
5614184Sgabeblack@google.com    // Requests coming from the Cores
5714184Sgabeblack@google.com    RdBlk,                  desc="CPU RdBlk event";
5814184Sgabeblack@google.com    RdBlkM,                 desc="CPU RdBlkM event";
5914184Sgabeblack@google.com    RdBlkS,                 desc="CPU RdBlkS event";
6014184Sgabeblack@google.com    CtoD,                   desc="Change to Dirty request";
6114184Sgabeblack@google.com    WrVicBlk,               desc="L2 Victim (dirty)";
6214184Sgabeblack@google.com    WrVicBlkShared,               desc="L2 Victim (dirty)";
6314184Sgabeblack@google.com    ClVicBlk,               desc="L2 Victim (clean)";
6414184Sgabeblack@google.com    ClVicBlkShared,               desc="L2 Victim (clean)";
6514184Sgabeblack@google.com
6614184Sgabeblack@google.com    CPUData,                      desc="WB data from CPU";
6714184Sgabeblack@google.com    CPUDataShared,                desc="WB data from CPU, NBReqShared 1";
6814184Sgabeblack@google.com    StaleWB,                desc="WB stale; no data";
6914184Sgabeblack@google.com
7014184Sgabeblack@google.com    L3_Repl,             desc="L3 Replacement";
7114184Sgabeblack@google.com
7214184Sgabeblack@google.com    // Probes
7314184Sgabeblack@google.com    PrbInvData,         desc="Invalidating probe, return dirty data";
7414184Sgabeblack@google.com    PrbInv,             desc="Invalidating probe, no need to return data";
7514184Sgabeblack@google.com    PrbShrData,         desc="Downgrading probe, return data";
7614184Sgabeblack@google.com
7714184Sgabeblack@google.com    // Coming from Memory Controller
7814184Sgabeblack@google.com    WBAck,                     desc="ack from memory";
7914184Sgabeblack@google.com
8014184Sgabeblack@google.com    CancelWB,                   desc="Cancel WB from L2";
8114184Sgabeblack@google.com  }
8214184Sgabeblack@google.com
8314184Sgabeblack@google.com  // STATES
8414184Sgabeblack@google.com  // Base States:
8514184Sgabeblack@google.com  state_declaration(State, desc="L3 State", default="L3Cache_State_I") {
8614184Sgabeblack@google.com    M, AccessPermission:Read_Write, desc="Modified";  // No other cache has copy, memory stale
8714184Sgabeblack@google.com    O, AccessPermission:Read_Only, desc="Owned";     // Correct most recent copy, others may exist in S
8814184Sgabeblack@google.com    E, AccessPermission:Read_Write, desc="Exclusive"; // Correct, most recent, and only copy (and == Memory)
8914184Sgabeblack@google.com    S, AccessPermission:Read_Only, desc="Shared";    // Correct, most recent. If no one in O, then == Memory
9014184Sgabeblack@google.com    I, AccessPermission:Invalid, desc="Invalid";
9114184Sgabeblack@google.com
9214184Sgabeblack@google.com    I_M, AccessPermission:Busy, desc="Invalid, received WrVicBlk, sent Ack, waiting for Data";
9314184Sgabeblack@google.com    I_O, AccessPermission:Busy, desc="Invalid, received WrVicBlk, sent Ack, waiting for Data";
9414184Sgabeblack@google.com    I_E, AccessPermission:Busy, desc="Invalid, receive ClVicBlk, sent Ack, waiting for Data";
9514184Sgabeblack@google.com    I_S, AccessPermission:Busy, desc="Invalid, receive ClVicBlk, sent Ack, waiting for Data";
9614184Sgabeblack@google.com    S_M, AccessPermission:Busy, desc="received WrVicBlk, sent Ack, waiting for Data, then go to M";
9714184Sgabeblack@google.com    S_O, AccessPermission:Busy, desc="received WrVicBlkShared, sent Ack, waiting for Data, then go to O";
9814184Sgabeblack@google.com    S_E, AccessPermission:Busy, desc="Shared, received ClVicBlk, sent Ack, waiting for Data, then go to E";
9914184Sgabeblack@google.com    S_S, AccessPermission:Busy, desc="Shared, received ClVicBlk, sent Ack, waiting for Data, then go to S";
10014184Sgabeblack@google.com    E_M, AccessPermission:Busy, desc="received WrVicBlk, sent Ack, waiting for Data, then go to O";
10114184Sgabeblack@google.com    E_O, AccessPermission:Busy, desc="received WrVicBlkShared, sent Ack, waiting for Data, then go to O";
10214184Sgabeblack@google.com    E_E, AccessPermission:Busy, desc="received WrVicBlk, sent Ack, waiting for Data, then go to O";
10314184Sgabeblack@google.com    E_S, AccessPermission:Busy, desc="Shared, received WrVicBlk, sent Ack, waiting for Data";
10414184Sgabeblack@google.com    O_M, AccessPermission:Busy, desc="...";
10514184Sgabeblack@google.com    O_O, AccessPermission:Busy, desc="...";
10614184Sgabeblack@google.com    O_E, AccessPermission:Busy, desc="...";
10714184Sgabeblack@google.com    O_S, AccessPermission:Busy, desc="...";
10814184Sgabeblack@google.com    M_M, AccessPermission:Busy, desc="...";
10914184Sgabeblack@google.com    M_O, AccessPermission:Busy, desc="...";
11014184Sgabeblack@google.com    M_E, AccessPermission:Busy, desc="...";
11114184Sgabeblack@google.com    M_S, AccessPermission:Busy, desc="...";
11214184Sgabeblack@google.com    D_I, AccessPermission:Invalid,  desc="drop WB data on the floor when receive";
11314184Sgabeblack@google.com    MOD_I, AccessPermission:Busy, desc="drop WB data on the floor, waiting for WBAck from Mem";
11414184Sgabeblack@google.com    MO_I, AccessPermission:Busy, desc="M or O, received L3_Repl, waiting for WBAck from Mem";
11514184Sgabeblack@google.com    I_I, AccessPermission:Busy, desc="I_MO received L3_Repl";
11614184Sgabeblack@google.com    I_CD, AccessPermission:Busy, desc="I_I received WBAck, now just waiting for CPUData";
11714184Sgabeblack@google.com    I_C, AccessPermission:Invalid, desc="sent cancel, just waiting to receive mem wb ack so nothing gets confused";
11814184Sgabeblack@google.com  }
11914184Sgabeblack@google.com
12014184Sgabeblack@google.com  enumeration(RequestType, desc="To communicate stats from transitions to recordStats") {
12114184Sgabeblack@google.com    DataArrayRead,    desc="Read the data array";
12214184Sgabeblack@google.com    DataArrayWrite,   desc="Write the data array";
12314184Sgabeblack@google.com    TagArrayRead,     desc="Read the data array";
12414184Sgabeblack@google.com    TagArrayWrite,    desc="Write the data array";
12514184Sgabeblack@google.com  }
12614184Sgabeblack@google.com
12714184Sgabeblack@google.com  // STRUCTURES
12814184Sgabeblack@google.com
12914184Sgabeblack@google.com  structure(Entry, desc="...", interface="AbstractCacheEntry") {
13014184Sgabeblack@google.com    State CacheState,           desc="cache state";
13114184Sgabeblack@google.com    bool Dirty,                 desc="Is the data dirty (diff from memory?)";
13214184Sgabeblack@google.com    DataBlock DataBlk,          desc="Data for the block";
13314184Sgabeblack@google.com  }
13414184Sgabeblack@google.com
13514184Sgabeblack@google.com  structure(TBE, desc="...") {
13614184Sgabeblack@google.com    State TBEState,     desc="Transient state";
13714184Sgabeblack@google.com    DataBlock DataBlk,  desc="data for the block";
13814184Sgabeblack@google.com    bool Dirty,         desc="Is the data dirty?";
13914184Sgabeblack@google.com    bool Shared,        desc="Victim hit by shared probe";
14014184Sgabeblack@google.com    MachineID From,     desc="Waiting for writeback from...";
14114184Sgabeblack@google.com  }
14214184Sgabeblack@google.com
14314184Sgabeblack@google.com  structure(TBETable, external="yes") {
14414184Sgabeblack@google.com    TBE lookup(Addr);
14514184Sgabeblack@google.com    void allocate(Addr);
14614184Sgabeblack@google.com    void deallocate(Addr);
14714184Sgabeblack@google.com    bool isPresent(Addr);
14814184Sgabeblack@google.com  }
14914184Sgabeblack@google.com
15014184Sgabeblack@google.com  TBETable TBEs, template="<L3Cache_TBE>", constructor="m_number_of_TBEs";
15114184Sgabeblack@google.com
15214184Sgabeblack@google.com  void set_cache_entry(AbstractCacheEntry b);
15314184Sgabeblack@google.com  void unset_cache_entry();
15414184Sgabeblack@google.com  void set_tbe(TBE b);
15514184Sgabeblack@google.com  void unset_tbe();
15614184Sgabeblack@google.com  void wakeUpAllBuffers();
15714184Sgabeblack@google.com  void wakeUpBuffers(Addr a);
15814184Sgabeblack@google.com  MachineID mapAddressToMachine(Addr addr, MachineType mtype);
15914184Sgabeblack@google.com
16014184Sgabeblack@google.com  // FUNCTION DEFINITIONS
16114184Sgabeblack@google.com  Tick clockEdge();
16214184Sgabeblack@google.com  Tick cyclesToTicks(Cycles c);
16314184Sgabeblack@google.com
16414184Sgabeblack@google.com  Entry getCacheEntry(Addr addr), return_by_pointer="yes" {
16514184Sgabeblack@google.com    return static_cast(Entry, "pointer", L3cache.lookup(addr));
16614184Sgabeblack@google.com  }
16714184Sgabeblack@google.com
16814184Sgabeblack@google.com  DataBlock getDataBlock(Addr addr), return_by_ref="yes" {
16914184Sgabeblack@google.com    return getCacheEntry(addr).DataBlk;
17014184Sgabeblack@google.com  }
17114184Sgabeblack@google.com
17214184Sgabeblack@google.com  bool presentOrAvail(Addr addr) {
17314184Sgabeblack@google.com    return L3cache.isTagPresent(addr) || L3cache.cacheAvail(addr);
17414184Sgabeblack@google.com  }
17514184Sgabeblack@google.com
17614184Sgabeblack@google.com  State getState(TBE tbe, Entry cache_entry, Addr addr) {
17714184Sgabeblack@google.com    if (is_valid(tbe)) {
17814184Sgabeblack@google.com      return tbe.TBEState;
17914184Sgabeblack@google.com    } else if (is_valid(cache_entry)) {
18014184Sgabeblack@google.com      return cache_entry.CacheState;
18114184Sgabeblack@google.com    }
18214184Sgabeblack@google.com    return State:I;
18314184Sgabeblack@google.com  }
18414184Sgabeblack@google.com
18514184Sgabeblack@google.com  void setState(TBE tbe, Entry cache_entry, Addr addr, State state) {
18614184Sgabeblack@google.com    if (is_valid(tbe)) {
18714184Sgabeblack@google.com        tbe.TBEState := state;
18814184Sgabeblack@google.com    }
18914184Sgabeblack@google.com
19014184Sgabeblack@google.com    if (is_valid(cache_entry)) {
19114184Sgabeblack@google.com        cache_entry.CacheState := state;
19214184Sgabeblack@google.com    }
19314184Sgabeblack@google.com  }
19414184Sgabeblack@google.com
19514184Sgabeblack@google.com  void functionalRead(Addr addr, Packet *pkt) {
19614184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
19714184Sgabeblack@google.com    if(is_valid(tbe)) {
19814184Sgabeblack@google.com      testAndRead(addr, tbe.DataBlk, pkt);
19914184Sgabeblack@google.com    } else {
20014184Sgabeblack@google.com      functionalMemoryRead(pkt);
20114184Sgabeblack@google.com    }
20214184Sgabeblack@google.com  }
20314184Sgabeblack@google.com
20414184Sgabeblack@google.com  int functionalWrite(Addr addr, Packet *pkt) {
20514184Sgabeblack@google.com    int num_functional_writes := 0;
20614184Sgabeblack@google.com
20714184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
20814184Sgabeblack@google.com    if(is_valid(tbe)) {
20914184Sgabeblack@google.com      num_functional_writes := num_functional_writes +
21014184Sgabeblack@google.com            testAndWrite(addr, tbe.DataBlk, pkt);
21114184Sgabeblack@google.com    }
21214184Sgabeblack@google.com
21314184Sgabeblack@google.com    num_functional_writes := num_functional_writes +
21414184Sgabeblack@google.com        functionalMemoryWrite(pkt);
21514184Sgabeblack@google.com    return num_functional_writes;
21614184Sgabeblack@google.com  }
21714184Sgabeblack@google.com
21814184Sgabeblack@google.com  AccessPermission getAccessPermission(Addr addr) {
21914184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
22014184Sgabeblack@google.com    if(is_valid(tbe)) {
22114184Sgabeblack@google.com      return L3Cache_State_to_permission(tbe.TBEState);
22214184Sgabeblack@google.com    }
22314184Sgabeblack@google.com
22414184Sgabeblack@google.com    Entry cache_entry := getCacheEntry(addr);
22514184Sgabeblack@google.com    if(is_valid(cache_entry)) {
22614184Sgabeblack@google.com      return L3Cache_State_to_permission(cache_entry.CacheState);
22714184Sgabeblack@google.com    }
22814184Sgabeblack@google.com
22914184Sgabeblack@google.com    return AccessPermission:NotPresent;
23014184Sgabeblack@google.com  }
23114184Sgabeblack@google.com
23214184Sgabeblack@google.com  void setAccessPermission(Entry cache_entry, Addr addr, State state) {
23314184Sgabeblack@google.com    if (is_valid(cache_entry)) {
23414184Sgabeblack@google.com      cache_entry.changePermission(L3Cache_State_to_permission(state));
23514184Sgabeblack@google.com    }
23614184Sgabeblack@google.com  }
23714184Sgabeblack@google.com
23814184Sgabeblack@google.com  void recordRequestType(RequestType request_type, Addr addr) {
23914184Sgabeblack@google.com
24014184Sgabeblack@google.com  }
24114184Sgabeblack@google.com
24214184Sgabeblack@google.com  bool checkResourceAvailable(RequestType request_type, Addr addr) {
24314184Sgabeblack@google.com    return true;
24414184Sgabeblack@google.com  }
24514184Sgabeblack@google.com
24614184Sgabeblack@google.com
24714184Sgabeblack@google.com  // OUT PORTS
24814184Sgabeblack@google.com  out_port(requestNetwork_out, CPURequestMsg, reqToDir);
24914184Sgabeblack@google.com  out_port(L3Resp_out, ResponseMsg, respToDir);
25014184Sgabeblack@google.com  out_port(responseNetwork_out, ResponseMsg, responseFromL3);
25114184Sgabeblack@google.com  out_port(unblockNetwork_out, UnblockMsg, l3UnblockToDir);
25214184Sgabeblack@google.com
25314184Sgabeblack@google.com  // IN PORTS
25414184Sgabeblack@google.com  in_port(NBResponse_in, ResponseMsg, respToL3) {
25514184Sgabeblack@google.com    if (NBResponse_in.isReady(clockEdge())) {
25614184Sgabeblack@google.com      peek(NBResponse_in, ResponseMsg) {
25714184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
25814184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
25914184Sgabeblack@google.com        if (in_msg.Type == CoherenceResponseType:NBSysWBAck) {
26014184Sgabeblack@google.com          trigger(Event:WBAck, in_msg.addr, cache_entry, tbe);
26114184Sgabeblack@google.com        } else {
26214184Sgabeblack@google.com          DPRINTF(RubySlicc, "%s\n", in_msg);
26314184Sgabeblack@google.com          error("Error on NBResponse Type");
26414184Sgabeblack@google.com        }
26514184Sgabeblack@google.com      }
26614184Sgabeblack@google.com    }
26714184Sgabeblack@google.com  }
26814184Sgabeblack@google.com
26914184Sgabeblack@google.com  // Response Network
27014184Sgabeblack@google.com  in_port(responseNetwork_in, ResponseMsg, responseToL3) {
27114184Sgabeblack@google.com    if (responseNetwork_in.isReady(clockEdge())) {
27214184Sgabeblack@google.com      peek(responseNetwork_in, ResponseMsg) {
27314184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
27414184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
27514184Sgabeblack@google.com        if (in_msg.Type == CoherenceResponseType:CPUData) {
27614184Sgabeblack@google.com          if (in_msg.NbReqShared) {
27714184Sgabeblack@google.com            trigger(Event:CPUDataShared, in_msg.addr, cache_entry, tbe);
27814184Sgabeblack@google.com          } else {
27914184Sgabeblack@google.com            trigger(Event:CPUData, in_msg.addr, cache_entry, tbe);
28014184Sgabeblack@google.com          }
28114184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceResponseType:StaleNotif) {
28214184Sgabeblack@google.com            trigger(Event:StaleWB, in_msg.addr, cache_entry, tbe);
28314184Sgabeblack@google.com        } else {
28414184Sgabeblack@google.com          DPRINTF(RubySlicc, "%s\n", in_msg);
28514184Sgabeblack@google.com          error("Error on NBResponse Type");
28614184Sgabeblack@google.com        }
28714184Sgabeblack@google.com      }
28814184Sgabeblack@google.com    }
28914184Sgabeblack@google.com  }
29014184Sgabeblack@google.com
29114184Sgabeblack@google.com  // probe network
29214184Sgabeblack@google.com  in_port(probeNetwork_in, NBProbeRequestMsg, probeToL3) {
29314184Sgabeblack@google.com    if (probeNetwork_in.isReady(clockEdge())) {
29414184Sgabeblack@google.com      peek(probeNetwork_in, NBProbeRequestMsg) {
29514184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
29614184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
29714184Sgabeblack@google.com        if (in_msg.Type == ProbeRequestType:PrbInv) {
29814184Sgabeblack@google.com          if (in_msg.ReturnData) {
29914184Sgabeblack@google.com            trigger(Event:PrbInvData, in_msg.addr, cache_entry, tbe);
30014184Sgabeblack@google.com          } else {
30114184Sgabeblack@google.com            trigger(Event:PrbInv, in_msg.addr, cache_entry, tbe);
30214184Sgabeblack@google.com          }
30314184Sgabeblack@google.com        } else if (in_msg.Type == ProbeRequestType:PrbDowngrade) {
30414184Sgabeblack@google.com          if (in_msg.ReturnData) {
30514184Sgabeblack@google.com            trigger(Event:PrbShrData, in_msg.addr, cache_entry, tbe);
30614184Sgabeblack@google.com          } else {
30714184Sgabeblack@google.com            error("Don't think I should get any of these");
30814184Sgabeblack@google.com          }
30914184Sgabeblack@google.com        }
31014184Sgabeblack@google.com      }
31114184Sgabeblack@google.com    }
31214184Sgabeblack@google.com  }
31314184Sgabeblack@google.com
31414184Sgabeblack@google.com  // Request Network
31514184Sgabeblack@google.com  in_port(requestNetwork_in, CPURequestMsg, reqToL3) {
31614184Sgabeblack@google.com    if (requestNetwork_in.isReady(clockEdge())) {
31714184Sgabeblack@google.com      peek(requestNetwork_in, CPURequestMsg) {
31814184Sgabeblack@google.com        assert(in_msg.Destination.isElement(machineID));
31914184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
32014184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
32114184Sgabeblack@google.com        if (in_msg.Type == CoherenceRequestType:RdBlk) {
32214184Sgabeblack@google.com          trigger(Event:RdBlk, in_msg.addr, cache_entry, tbe);
32314184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceRequestType:RdBlkS) {
32414184Sgabeblack@google.com          trigger(Event:RdBlkS, in_msg.addr, cache_entry, tbe);
32514184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceRequestType:RdBlkM) {
32614184Sgabeblack@google.com          trigger(Event:RdBlkM, in_msg.addr, cache_entry, tbe);
32714184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceRequestType:VicClean) {
32814184Sgabeblack@google.com          if (presentOrAvail(in_msg.addr)) {
32914184Sgabeblack@google.com            if (in_msg.Shared) {
33014184Sgabeblack@google.com              trigger(Event:ClVicBlkShared, in_msg.addr, cache_entry, tbe);
33114184Sgabeblack@google.com            } else {
33214184Sgabeblack@google.com              trigger(Event:ClVicBlk, in_msg.addr, cache_entry, tbe);
33314184Sgabeblack@google.com            }
33414184Sgabeblack@google.com          } else {
33514184Sgabeblack@google.com            Addr victim :=  L3cache.cacheProbe(in_msg.addr);
33614184Sgabeblack@google.com            trigger(Event:L3_Repl, victim, getCacheEntry(victim), TBEs.lookup(victim));
33714184Sgabeblack@google.com          }
33814184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceRequestType:VicDirty) {
33914184Sgabeblack@google.com          if (presentOrAvail(in_msg.addr)) {
34014184Sgabeblack@google.com            if (in_msg.Shared) {
34114184Sgabeblack@google.com              trigger(Event:WrVicBlkShared, in_msg.addr, cache_entry, tbe);
34214184Sgabeblack@google.com            } else {
34314184Sgabeblack@google.com              trigger(Event:WrVicBlk, in_msg.addr, cache_entry, tbe);
34414184Sgabeblack@google.com            }
34514184Sgabeblack@google.com          } else {
34614184Sgabeblack@google.com            Addr victim := L3cache.cacheProbe(in_msg.addr);
34714184Sgabeblack@google.com            trigger(Event:L3_Repl, victim, getCacheEntry(victim), TBEs.lookup(victim));
34814184Sgabeblack@google.com          }
34914184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceRequestType:WrCancel) {
35014184Sgabeblack@google.com          if (is_valid(tbe) && tbe.From == in_msg.Requestor) {
35114184Sgabeblack@google.com            trigger(Event:CancelWB, in_msg.addr, cache_entry, tbe);
35214184Sgabeblack@google.com          } else {
35314184Sgabeblack@google.com            requestNetwork_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
35414184Sgabeblack@google.com          }
35514184Sgabeblack@google.com        }
35614184Sgabeblack@google.com      }
35714184Sgabeblack@google.com    }
35814184Sgabeblack@google.com  }
35914184Sgabeblack@google.com
36014184Sgabeblack@google.com  // BEGIN ACTIONS
36114184Sgabeblack@google.com
36214184Sgabeblack@google.com  action(i_invL3, "i", desc="invalidate L3 cache block") {
36314184Sgabeblack@google.com    if (is_valid(cache_entry)) {
36414184Sgabeblack@google.com        L3cache.deallocate(address);
36514184Sgabeblack@google.com    }
36614184Sgabeblack@google.com    unset_cache_entry();
36714184Sgabeblack@google.com  }
36814184Sgabeblack@google.com
36914184Sgabeblack@google.com  action(rm_sendResponseM, "rm", desc="send Modified response") {
37014184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
37114184Sgabeblack@google.com      enqueue(responseNetwork_out, ResponseMsg, l3_response_latency) {
37214184Sgabeblack@google.com        out_msg.addr := address;
37314184Sgabeblack@google.com        out_msg.Type := CoherenceResponseType:NBSysResp;
37414184Sgabeblack@google.com        out_msg.Sender := machineID;
37514184Sgabeblack@google.com        out_msg.Destination.add(in_msg.Requestor);
37614184Sgabeblack@google.com        out_msg.DataBlk := cache_entry.DataBlk;
37714184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Response_Data;
37814184Sgabeblack@google.com        out_msg.Dirty := cache_entry.Dirty;
37914184Sgabeblack@google.com        out_msg.State := CoherenceState:Modified;
38014184Sgabeblack@google.com        DPRINTF(RubySlicc, "%s\n", out_msg);
38114184Sgabeblack@google.com      }
38214184Sgabeblack@google.com    }
38314184Sgabeblack@google.com  }
38414184Sgabeblack@google.com
38514184Sgabeblack@google.com  action(rs_sendResponseS, "rs", desc="send Shared response") {
38614184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
38714184Sgabeblack@google.com      enqueue(responseNetwork_out, ResponseMsg, l3_response_latency) {
38814184Sgabeblack@google.com        out_msg.addr := address;
38914184Sgabeblack@google.com        out_msg.Type := CoherenceResponseType:NBSysResp;
39014184Sgabeblack@google.com        out_msg.Sender := machineID;
39114184Sgabeblack@google.com        out_msg.Destination.add(in_msg.Requestor);
39214184Sgabeblack@google.com        out_msg.DataBlk := cache_entry.DataBlk;
39314184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Response_Data;
39414184Sgabeblack@google.com        out_msg.Dirty := cache_entry.Dirty;
39514184Sgabeblack@google.com        out_msg.State := CoherenceState:Shared;
39614184Sgabeblack@google.com        DPRINTF(RubySlicc, "%s\n", out_msg);
39714184Sgabeblack@google.com      }
39814184Sgabeblack@google.com    }
39914184Sgabeblack@google.com  }
40014184Sgabeblack@google.com
40114184Sgabeblack@google.com
40214184Sgabeblack@google.com  action(r_requestToMem, "r", desc="Miss in L3, pass on") {
40314184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
40414184Sgabeblack@google.com      enqueue(requestNetwork_out, CPURequestMsg, l3_request_latency) {
40514184Sgabeblack@google.com        out_msg.addr := address;
40614184Sgabeblack@google.com        out_msg.Type := in_msg.Type;
40714184Sgabeblack@google.com        out_msg.Requestor := in_msg.Requestor;
40814184Sgabeblack@google.com        out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
40914184Sgabeblack@google.com        out_msg.Shared := false; // unneeded for this request
41014184Sgabeblack@google.com        out_msg.MessageSize := in_msg.MessageSize;
41114184Sgabeblack@google.com        DPRINTF(RubySlicc, "%s\n", out_msg);
41214184Sgabeblack@google.com      }
41314184Sgabeblack@google.com    }
41414184Sgabeblack@google.com  }
41514184Sgabeblack@google.com
41614184Sgabeblack@google.com  action(t_allocateTBE, "t", desc="allocate TBE Entry") {
41714184Sgabeblack@google.com    TBEs.allocate(address);
41814184Sgabeblack@google.com    set_tbe(TBEs.lookup(address));
41914184Sgabeblack@google.com    if (is_valid(cache_entry)) {
42014184Sgabeblack@google.com      tbe.DataBlk := cache_entry.DataBlk; // Data only for WBs
42114184Sgabeblack@google.com      tbe.Dirty := cache_entry.Dirty;
42214184Sgabeblack@google.com    }
42314184Sgabeblack@google.com    tbe.From := machineID;
42414184Sgabeblack@google.com  }
42514184Sgabeblack@google.com
42614184Sgabeblack@google.com  action(dt_deallocateTBE, "dt", desc="deallocate TBE Entry") {
42714184Sgabeblack@google.com    TBEs.deallocate(address);
42814184Sgabeblack@google.com    unset_tbe();
42914184Sgabeblack@google.com  }
43014184Sgabeblack@google.com
43114184Sgabeblack@google.com  action(vd_vicDirty, "vd", desc="Victimize dirty L3 data") {
43214184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, l3_request_latency) {
43314184Sgabeblack@google.com      out_msg.addr := address;
43414184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:VicDirty;
43514184Sgabeblack@google.com      out_msg.Requestor := machineID;
43614184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
43714184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
43814184Sgabeblack@google.com    }
43914184Sgabeblack@google.com  }
44014184Sgabeblack@google.com
44114184Sgabeblack@google.com  action(w_sendResponseWBAck, "w", desc="send WB Ack") {
44214184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
44314184Sgabeblack@google.com      enqueue(responseNetwork_out, ResponseMsg, l3_response_latency) {
44414184Sgabeblack@google.com        out_msg.addr := address;
44514184Sgabeblack@google.com        out_msg.Type := CoherenceResponseType:NBSysWBAck;
44614184Sgabeblack@google.com        out_msg.Destination.add(in_msg.Requestor);
44714184Sgabeblack@google.com        out_msg.Sender := machineID;
44814184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Writeback_Control;
44914184Sgabeblack@google.com      }
45014184Sgabeblack@google.com    }
45114184Sgabeblack@google.com  }
45214184Sgabeblack@google.com
45314184Sgabeblack@google.com  action(pi_sendProbeResponseInv, "pi", desc="send probe ack inv, no data") {
45414184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
45514184Sgabeblack@google.com      out_msg.addr := address;
45614184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
45714184Sgabeblack@google.com      out_msg.Sender := machineID;
45814184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
45914184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
46014184Sgabeblack@google.com      out_msg.Dirty := false;
46114184Sgabeblack@google.com      out_msg.Hit := false;
46214184Sgabeblack@google.com      out_msg.Ntsl := true;
46314184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
46414184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
46514184Sgabeblack@google.com    }
46614184Sgabeblack@google.com  }
46714184Sgabeblack@google.com
46814184Sgabeblack@google.com  action(ph_sendProbeResponseHit, "ph", desc="send probe ack, no data") {
46914184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
47014184Sgabeblack@google.com      out_msg.addr := address;
47114184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
47214184Sgabeblack@google.com      out_msg.Sender := machineID;
47314184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
47414184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
47514184Sgabeblack@google.com      out_msg.Dirty := false;
47614184Sgabeblack@google.com      out_msg.Hit := true;
47714184Sgabeblack@google.com      out_msg.Ntsl := false;
47814184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
47914184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
48014184Sgabeblack@google.com    }
48114184Sgabeblack@google.com  }
48214184Sgabeblack@google.com
48314184Sgabeblack@google.com  action(pm_sendProbeResponseMiss, "pm", desc="send probe ack, no data") {
48414184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
48514184Sgabeblack@google.com      out_msg.addr := address;
48614184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
48714184Sgabeblack@google.com      out_msg.Sender := machineID;
48814184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
48914184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
49014184Sgabeblack@google.com      out_msg.Dirty := false;
49114184Sgabeblack@google.com      out_msg.Hit := false;
49214184Sgabeblack@google.com      out_msg.Ntsl := false;
49314184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
49414184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
49514184Sgabeblack@google.com    }
49614184Sgabeblack@google.com  }
49714184Sgabeblack@google.com
49814184Sgabeblack@google.com  action(pd_sendProbeResponseData, "pd", desc="send probe ack, with data") {
49914184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
50014184Sgabeblack@google.com      out_msg.addr := address;
50114184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
50214184Sgabeblack@google.com      out_msg.Sender := machineID;
50314184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
50414184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
50514184Sgabeblack@google.com      out_msg.DataBlk := cache_entry.DataBlk;
50614184Sgabeblack@google.com      assert(cache_entry.Dirty);
50714184Sgabeblack@google.com      out_msg.Dirty := true;
50814184Sgabeblack@google.com      out_msg.Hit := true;
50914184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
51014184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Data;
51114184Sgabeblack@google.com    }
51214184Sgabeblack@google.com  }
51314184Sgabeblack@google.com
51414184Sgabeblack@google.com  action(pdt_sendProbeResponseDataFromTBE, "pdt", desc="send probe ack with data") {
51514184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
51614184Sgabeblack@google.com      out_msg.addr := address;
51714184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;
51814184Sgabeblack@google.com      out_msg.Sender := machineID;
51914184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
52014184Sgabeblack@google.com      out_msg.DataBlk := tbe.DataBlk;
52114184Sgabeblack@google.com      assert(tbe.Dirty);
52214184Sgabeblack@google.com      out_msg.Dirty := true;
52314184Sgabeblack@google.com      out_msg.Hit := true;
52414184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Data;
52514184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
52614184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
52714184Sgabeblack@google.com    }
52814184Sgabeblack@google.com  }
52914184Sgabeblack@google.com
53014184Sgabeblack@google.com  action(mc_cancelMemWriteback, "mc", desc="send writeback cancel to memory") {
53114184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, l3_request_latency) {
53214184Sgabeblack@google.com      out_msg.addr := address;
53314184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:WrCancel;
53414184Sgabeblack@google.com      out_msg.Requestor := machineID;
53514184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
53614184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
53714184Sgabeblack@google.com    }
53814184Sgabeblack@google.com  }
53914184Sgabeblack@google.com
54014184Sgabeblack@google.com  action(a_allocateBlock, "a", desc="allocate L3 block") {
54114184Sgabeblack@google.com    if (is_invalid(cache_entry)) {
54214184Sgabeblack@google.com      set_cache_entry(L3cache.allocate(address, new Entry));
54314184Sgabeblack@google.com    }
54414184Sgabeblack@google.com  }
54514184Sgabeblack@google.com
54614184Sgabeblack@google.com  action(d_writeData, "d", desc="write data to L3") {
54714184Sgabeblack@google.com    peek(responseNetwork_in, ResponseMsg) {
54814184Sgabeblack@google.com      if (in_msg.Dirty) {
54914184Sgabeblack@google.com        cache_entry.Dirty := in_msg.Dirty;
55014184Sgabeblack@google.com      }
55114184Sgabeblack@google.com      cache_entry.DataBlk := in_msg.DataBlk;
55214184Sgabeblack@google.com      DPRINTF(RubySlicc, "Writing to L3: %s\n", in_msg);
55314184Sgabeblack@google.com    }
55414184Sgabeblack@google.com  }
55514184Sgabeblack@google.com
55614184Sgabeblack@google.com  action(rd_copyDataFromRequest, "rd", desc="write data to L3") {
55714184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
55814184Sgabeblack@google.com      cache_entry.DataBlk := in_msg.DataBlk;
55914184Sgabeblack@google.com      cache_entry.Dirty := true;
56014184Sgabeblack@google.com    }
56114184Sgabeblack@google.com  }
56214184Sgabeblack@google.com
56314184Sgabeblack@google.com  action(f_setFrom, "f", desc="set who WB is expected to come from") {
56414184Sgabeblack@google.com    peek(requestNetwork_in, CPURequestMsg) {
56514184Sgabeblack@google.com      tbe.From := in_msg.Requestor;
56614184Sgabeblack@google.com    }
56714184Sgabeblack@google.com  }
56814184Sgabeblack@google.com
56914184Sgabeblack@google.com  action(rf_resetFrom, "rf", desc="reset From") {
57014184Sgabeblack@google.com    tbe.From := machineID;
57114184Sgabeblack@google.com  }
57214184Sgabeblack@google.com
57314184Sgabeblack@google.com  action(wb_data, "wb", desc="write back data") {
57414184Sgabeblack@google.com    enqueue(L3Resp_out, ResponseMsg, l3_request_latency) {
57514184Sgabeblack@google.com      out_msg.addr := address;
57614184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUData;
57714184Sgabeblack@google.com      out_msg.Sender := machineID;
57814184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
57914184Sgabeblack@google.com      out_msg.DataBlk := tbe.DataBlk;
58014184Sgabeblack@google.com      out_msg.Dirty := tbe.Dirty;
58114184Sgabeblack@google.com      if (tbe.Shared) {
58214184Sgabeblack@google.com        out_msg.NbReqShared := true;
58314184Sgabeblack@google.com      } else {
58414184Sgabeblack@google.com        out_msg.NbReqShared := false;
58514184Sgabeblack@google.com      }
58614184Sgabeblack@google.com      out_msg.State := CoherenceState:Shared; // faux info
58714184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Writeback_Data;
58814184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
58914184Sgabeblack@google.com    }
59014184Sgabeblack@google.com  }
59114184Sgabeblack@google.com
59214184Sgabeblack@google.com  action(wt_writeDataToTBE, "wt", desc="write WB data to TBE") {
59314184Sgabeblack@google.com    peek(responseNetwork_in, ResponseMsg) {
59414184Sgabeblack@google.com      tbe.DataBlk := in_msg.DataBlk;
59514184Sgabeblack@google.com      tbe.Dirty := in_msg.Dirty;
59614184Sgabeblack@google.com    }
59714184Sgabeblack@google.com  }
59814184Sgabeblack@google.com
59914184Sgabeblack@google.com  action(uu_sendUnblock, "uu", desc="state changed, unblock") {
60014184Sgabeblack@google.com    enqueue(unblockNetwork_out, UnblockMsg, l3_request_latency) {
60114184Sgabeblack@google.com      out_msg.addr := address;
60214184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
60314184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Unblock_Control;
60414184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
60514184Sgabeblack@google.com    }
60614184Sgabeblack@google.com  }
60714184Sgabeblack@google.com
60814184Sgabeblack@google.com  action(ut_updateTag, "ut", desc="update Tag (i.e. set MRU)") {
60914184Sgabeblack@google.com    L3cache.setMRU(address);
61014184Sgabeblack@google.com  }
61114184Sgabeblack@google.com
61214184Sgabeblack@google.com  action(p_popRequestQueue, "p", desc="pop request queue") {
61314184Sgabeblack@google.com    requestNetwork_in.dequeue(clockEdge());
61414184Sgabeblack@google.com  }
61514184Sgabeblack@google.com
61614184Sgabeblack@google.com  action(pr_popResponseQueue, "pr", desc="pop response queue") {
61714184Sgabeblack@google.com    responseNetwork_in.dequeue(clockEdge());
61814184Sgabeblack@google.com  }
61914184Sgabeblack@google.com
62014184Sgabeblack@google.com  action(pn_popNBResponseQueue, "pn", desc="pop NB response queue") {
62114184Sgabeblack@google.com    NBResponse_in.dequeue(clockEdge());
62214184Sgabeblack@google.com  }
62314184Sgabeblack@google.com
62414184Sgabeblack@google.com  action(pp_popProbeQueue, "pp", desc="pop probe queue") {
62514184Sgabeblack@google.com    probeNetwork_in.dequeue(clockEdge());
62614184Sgabeblack@google.com  }
62714184Sgabeblack@google.com
62814184Sgabeblack@google.com  action(zz_recycleRequestQueue, "\z", desc="recycle request queue") {
62914184Sgabeblack@google.com    requestNetwork_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
63014184Sgabeblack@google.com  }
63114184Sgabeblack@google.com
63214184Sgabeblack@google.com
63314184Sgabeblack@google.com  // END ACTIONS
63414184Sgabeblack@google.com
63514184Sgabeblack@google.com  // BEGIN TRANSITIONS
63614184Sgabeblack@google.com
63714184Sgabeblack@google.com  // transitions from base
63814184Sgabeblack@google.com
63914184Sgabeblack@google.com  transition({I, I_C}, {RdBlk, RdBlkS, RdBlkM, CtoD}) {TagArrayRead} {
64014184Sgabeblack@google.com    r_requestToMem;
64114184Sgabeblack@google.com    p_popRequestQueue;
64214184Sgabeblack@google.com  }
64314184Sgabeblack@google.com
64414184Sgabeblack@google.com  transition(O, RdBlk ) {TagArrayRead, DataArrayRead} {
64514184Sgabeblack@google.com    rs_sendResponseS;
64614184Sgabeblack@google.com    ut_updateTag;
64714184Sgabeblack@google.com    p_popRequestQueue;
64814184Sgabeblack@google.com  }
64914184Sgabeblack@google.com  transition(M, RdBlk, O) {TagArrayRead, DataArrayRead, TagArrayWrite} {
65014184Sgabeblack@google.com    rs_sendResponseS;
65114184Sgabeblack@google.com    ut_updateTag;
65214184Sgabeblack@google.com    p_popRequestQueue;
65314184Sgabeblack@google.com  }
65414184Sgabeblack@google.com
65514184Sgabeblack@google.com  transition(S, RdBlk) {TagArrayRead, DataArrayRead} {
65614184Sgabeblack@google.com    rs_sendResponseS;
65714184Sgabeblack@google.com    ut_updateTag;
65814184Sgabeblack@google.com    p_popRequestQueue;
65914184Sgabeblack@google.com  }
66014184Sgabeblack@google.com  transition(E, RdBlk, S) {TagArrayRead, DataArrayRead, TagArrayWrite} {
66114184Sgabeblack@google.com    rs_sendResponseS;
66214184Sgabeblack@google.com    ut_updateTag;
66314184Sgabeblack@google.com    p_popRequestQueue;
66414184Sgabeblack@google.com  }
66514184Sgabeblack@google.com
66614184Sgabeblack@google.com  transition({M, O}, RdBlkS, O) {TagArrayRead, DataArrayRead, TagArrayWrite} {
66714184Sgabeblack@google.com    rs_sendResponseS;
66814184Sgabeblack@google.com    ut_updateTag;
66914184Sgabeblack@google.com    p_popRequestQueue;
67014184Sgabeblack@google.com  }
67114184Sgabeblack@google.com
67214184Sgabeblack@google.com  transition({E, S}, RdBlkS, S) {TagArrayRead, DataArrayRead, TagArrayWrite} {
67314184Sgabeblack@google.com    rs_sendResponseS;
67414184Sgabeblack@google.com    ut_updateTag;
67514184Sgabeblack@google.com    p_popRequestQueue;
67614184Sgabeblack@google.com  }
67714184Sgabeblack@google.com
67814184Sgabeblack@google.com  transition(M, RdBlkM, I) {TagArrayRead, TagArrayWrite, DataArrayRead} {
67914184Sgabeblack@google.com    rm_sendResponseM;
68014184Sgabeblack@google.com    i_invL3;
68114184Sgabeblack@google.com    p_popRequestQueue;
68214184Sgabeblack@google.com  }
68314184Sgabeblack@google.com
68414184Sgabeblack@google.com  transition({O, S}, {RdBlkM, CtoD}) {TagArrayRead} {
68514184Sgabeblack@google.com    r_requestToMem;  // can't handle this, just forward
68614184Sgabeblack@google.com    p_popRequestQueue;
68714184Sgabeblack@google.com  }
68814184Sgabeblack@google.com
68914184Sgabeblack@google.com  transition(E, RdBlkM, I) {TagArrayRead, TagArrayWrite, DataArrayRead} {
69014184Sgabeblack@google.com    rm_sendResponseM;
69114184Sgabeblack@google.com    i_invL3;
69214184Sgabeblack@google.com    p_popRequestQueue;
69314184Sgabeblack@google.com  }
69414184Sgabeblack@google.com
69514184Sgabeblack@google.com  transition({I}, WrVicBlk, I_M) {TagArrayRead, TagArrayWrite} {
69614184Sgabeblack@google.com    a_allocateBlock;
69714184Sgabeblack@google.com    t_allocateTBE;
69814184Sgabeblack@google.com    f_setFrom;
69914184Sgabeblack@google.com//    rd_copyDataFromRequest;
70014184Sgabeblack@google.com    w_sendResponseWBAck;
70114184Sgabeblack@google.com    p_popRequestQueue;
70214184Sgabeblack@google.com  }
70314184Sgabeblack@google.com
70414184Sgabeblack@google.com  transition(I_C, {WrVicBlk, WrVicBlkShared, ClVicBlk, ClVicBlkShared}) {} {
70514184Sgabeblack@google.com    zz_recycleRequestQueue;
70614184Sgabeblack@google.com  }
70714184Sgabeblack@google.com
70814184Sgabeblack@google.com  transition({I}, WrVicBlkShared, I_O) {TagArrayRead, TagArrayWrite} {
70914184Sgabeblack@google.com    a_allocateBlock;
71014184Sgabeblack@google.com    t_allocateTBE;
71114184Sgabeblack@google.com    f_setFrom;
71214184Sgabeblack@google.com//    rd_copyDataFromRequest;
71314184Sgabeblack@google.com    w_sendResponseWBAck;
71414184Sgabeblack@google.com    p_popRequestQueue;
71514184Sgabeblack@google.com  }
71614184Sgabeblack@google.com
71714184Sgabeblack@google.com  transition(S, WrVicBlkShared, S_O) {TagArrayRead, TagArrayWrite} {
71814184Sgabeblack@google.com//    rd_copyDataFromRequest;
71914184Sgabeblack@google.com    t_allocateTBE;
72014184Sgabeblack@google.com    f_setFrom;
72114184Sgabeblack@google.com    w_sendResponseWBAck;
72214184Sgabeblack@google.com    p_popRequestQueue;
72314184Sgabeblack@google.com  }
72414184Sgabeblack@google.com
72514184Sgabeblack@google.com  transition(S, WrVicBlk, S_M) {TagArrayRead, TagArrayWrite} { // should be technically not possible, but assume the data comes back with shared bit flipped
72614184Sgabeblack@google.com//    rd_copyDataFromRequest;
72714184Sgabeblack@google.com    t_allocateTBE;
72814184Sgabeblack@google.com    f_setFrom;
72914184Sgabeblack@google.com    w_sendResponseWBAck;
73014184Sgabeblack@google.com    p_popRequestQueue;
73114184Sgabeblack@google.com  }
73214184Sgabeblack@google.com
73314184Sgabeblack@google.com  transition(E, WrVicBlk, E_M) {TagArrayRead, TagArrayWrite}  {
73414184Sgabeblack@google.com    t_allocateTBE;
73514184Sgabeblack@google.com    f_setFrom;
73614184Sgabeblack@google.com    w_sendResponseWBAck;
73714184Sgabeblack@google.com    p_popRequestQueue;
73814184Sgabeblack@google.com  }
73914184Sgabeblack@google.com
74014184Sgabeblack@google.com  transition(E, WrVicBlkShared, E_O) {TagArrayRead, TagArrayWrite} {
74114184Sgabeblack@google.com    t_allocateTBE;
74214184Sgabeblack@google.com    f_setFrom;
74314184Sgabeblack@google.com    w_sendResponseWBAck;
74414184Sgabeblack@google.com    p_popRequestQueue;
74514184Sgabeblack@google.com  }
74614184Sgabeblack@google.com
74714184Sgabeblack@google.com  transition(O, WrVicBlk, O_M) {TagArrayRead, TagArrayWrite} {
74814184Sgabeblack@google.com    t_allocateTBE;
74914184Sgabeblack@google.com    f_setFrom;
75014184Sgabeblack@google.com    w_sendResponseWBAck;
75114184Sgabeblack@google.com    p_popRequestQueue;
75214184Sgabeblack@google.com  }
75314184Sgabeblack@google.com
75414184Sgabeblack@google.com  transition(O, WrVicBlkShared, O_O) {TagArrayRead, TagArrayWrite} {
75514184Sgabeblack@google.com    t_allocateTBE;
75614184Sgabeblack@google.com    f_setFrom;
75714184Sgabeblack@google.com    w_sendResponseWBAck;
75814184Sgabeblack@google.com    p_popRequestQueue;
75914184Sgabeblack@google.com  }
76014184Sgabeblack@google.com
76114184Sgabeblack@google.com  transition(M, WrVicBlk, M_M) {TagArrayRead, TagArrayWrite} {
76214184Sgabeblack@google.com    t_allocateTBE;
76314184Sgabeblack@google.com    f_setFrom;
76414184Sgabeblack@google.com    w_sendResponseWBAck;
76514184Sgabeblack@google.com    p_popRequestQueue;
76614184Sgabeblack@google.com  }
76714184Sgabeblack@google.com
76814184Sgabeblack@google.com  transition(M, WrVicBlkShared, M_O) {TagArrayRead, TagArrayWrite} {
76914184Sgabeblack@google.com    t_allocateTBE;
77014184Sgabeblack@google.com    f_setFrom;
77114184Sgabeblack@google.com    w_sendResponseWBAck;
77214184Sgabeblack@google.com    p_popRequestQueue;
77314184Sgabeblack@google.com  }
77414184Sgabeblack@google.com
77514184Sgabeblack@google.com  transition({I}, ClVicBlk, I_E) {TagArrayRead, TagArrayWrite} {
77614184Sgabeblack@google.com    t_allocateTBE;
77714184Sgabeblack@google.com    f_setFrom;
77814184Sgabeblack@google.com    a_allocateBlock;
77914184Sgabeblack@google.com    w_sendResponseWBAck;
78014184Sgabeblack@google.com    p_popRequestQueue;
78114184Sgabeblack@google.com  }
78214184Sgabeblack@google.com
78314184Sgabeblack@google.com  transition({I}, ClVicBlkShared, I_S) {TagArrayRead, TagArrayWrite} {
78414184Sgabeblack@google.com    t_allocateTBE;
78514184Sgabeblack@google.com    f_setFrom;
78614184Sgabeblack@google.com    a_allocateBlock;
78714184Sgabeblack@google.com    w_sendResponseWBAck;
78814184Sgabeblack@google.com    p_popRequestQueue;
78914184Sgabeblack@google.com  }
79014184Sgabeblack@google.com
79114184Sgabeblack@google.com  transition(S, ClVicBlk, S_E) {TagArrayRead, TagArrayWrite} { // technically impossible, assume data comes back with shared bit flipped
79214184Sgabeblack@google.com    t_allocateTBE;
79314184Sgabeblack@google.com    f_setFrom;
79414184Sgabeblack@google.com    w_sendResponseWBAck;
79514184Sgabeblack@google.com    p_popRequestQueue;
79614184Sgabeblack@google.com  }
79714184Sgabeblack@google.com
79814184Sgabeblack@google.com  transition(S, ClVicBlkShared, S_S) {TagArrayRead, TagArrayWrite} {
79914184Sgabeblack@google.com    t_allocateTBE;
80014184Sgabeblack@google.com    f_setFrom;
80114184Sgabeblack@google.com    w_sendResponseWBAck;
80214184Sgabeblack@google.com    p_popRequestQueue;
80314184Sgabeblack@google.com  }
80414184Sgabeblack@google.com
80514184Sgabeblack@google.com  transition(E, ClVicBlk, E_E) {TagArrayRead, TagArrayWrite} {
80614184Sgabeblack@google.com    t_allocateTBE;
80714184Sgabeblack@google.com    f_setFrom;
80814184Sgabeblack@google.com    w_sendResponseWBAck;
80914184Sgabeblack@google.com    p_popRequestQueue;
81014184Sgabeblack@google.com  }
81114184Sgabeblack@google.com
81214184Sgabeblack@google.com  transition(E, ClVicBlkShared, E_S) {TagArrayRead, TagArrayWrite} {
81314184Sgabeblack@google.com    t_allocateTBE;
81414184Sgabeblack@google.com    f_setFrom;
81514184Sgabeblack@google.com    w_sendResponseWBAck;
81614184Sgabeblack@google.com    p_popRequestQueue;
81714184Sgabeblack@google.com  }
81814184Sgabeblack@google.com
81914184Sgabeblack@google.com  transition(O, ClVicBlk, O_E) {TagArrayRead, TagArrayWrite} { // technically impossible, but assume data comes back with shared bit flipped
82014184Sgabeblack@google.com    t_allocateTBE;
82114184Sgabeblack@google.com    f_setFrom;
82214184Sgabeblack@google.com    w_sendResponseWBAck;
82314184Sgabeblack@google.com    p_popRequestQueue;
82414184Sgabeblack@google.com  }
82514184Sgabeblack@google.com
82614184Sgabeblack@google.com  transition(O, ClVicBlkShared, O_S) {TagArrayRead, TagArrayWrite} {
82714184Sgabeblack@google.com    t_allocateTBE;
82814184Sgabeblack@google.com    f_setFrom;
82914184Sgabeblack@google.com    w_sendResponseWBAck;
83014184Sgabeblack@google.com    p_popRequestQueue;
83114184Sgabeblack@google.com  }
83214184Sgabeblack@google.com
83314184Sgabeblack@google.com  transition(M, ClVicBlk, M_E) {TagArrayRead, TagArrayWrite}  {
83414184Sgabeblack@google.com    t_allocateTBE;
83514184Sgabeblack@google.com    f_setFrom;
83614184Sgabeblack@google.com    w_sendResponseWBAck;
83714184Sgabeblack@google.com    p_popRequestQueue;
83814184Sgabeblack@google.com  }
83914184Sgabeblack@google.com
84014184Sgabeblack@google.com  transition(M, ClVicBlkShared, M_S) {TagArrayRead, TagArrayWrite} {
84114184Sgabeblack@google.com    t_allocateTBE;
84214184Sgabeblack@google.com    f_setFrom;
84314184Sgabeblack@google.com    w_sendResponseWBAck;
84414184Sgabeblack@google.com    p_popRequestQueue;
84514184Sgabeblack@google.com  }
84614184Sgabeblack@google.com
84714184Sgabeblack@google.com  transition({MO_I}, {RdBlk, RdBlkS, RdBlkM, CtoD}) {} {
84814184Sgabeblack@google.com    r_requestToMem;
84914184Sgabeblack@google.com    p_popRequestQueue;
85014184Sgabeblack@google.com  }
85114184Sgabeblack@google.com
85214184Sgabeblack@google.com  transition(MO_I, {WrVicBlkShared, WrVicBlk, ClVicBlk, ClVicBlkShared}, MOD_I) {TagArrayWrite} {
85314184Sgabeblack@google.com    f_setFrom;
85414184Sgabeblack@google.com    w_sendResponseWBAck;
85514184Sgabeblack@google.com    p_popRequestQueue;
85614184Sgabeblack@google.com  }
85714184Sgabeblack@google.com
85814184Sgabeblack@google.com  transition(I_M, CPUData, M) {DataArrayWrite, TagArrayWrite} {
85914184Sgabeblack@google.com    uu_sendUnblock;
86014184Sgabeblack@google.com    dt_deallocateTBE;
86114184Sgabeblack@google.com    d_writeData;
86214184Sgabeblack@google.com    pr_popResponseQueue;
86314184Sgabeblack@google.com  }
86414184Sgabeblack@google.com
86514184Sgabeblack@google.com  transition(I_M, CPUDataShared, O) {DataArrayWrite, TagArrayWrite} {
86614184Sgabeblack@google.com    uu_sendUnblock;
86714184Sgabeblack@google.com    dt_deallocateTBE;
86814184Sgabeblack@google.com    d_writeData;
86914184Sgabeblack@google.com    pr_popResponseQueue;
87014184Sgabeblack@google.com  }
87114184Sgabeblack@google.com
87214184Sgabeblack@google.com  transition(I_O, {CPUData, CPUDataShared}, O) {DataArrayWrite, TagArrayWrite} {
87314184Sgabeblack@google.com    uu_sendUnblock;
87414184Sgabeblack@google.com    dt_deallocateTBE;
87514184Sgabeblack@google.com    d_writeData;
87614184Sgabeblack@google.com    pr_popResponseQueue;
87714184Sgabeblack@google.com  }
87814184Sgabeblack@google.com
87914184Sgabeblack@google.com  transition(I_E, CPUData, E) {DataArrayWrite, TagArrayWrite} {
88014184Sgabeblack@google.com    uu_sendUnblock;
88114184Sgabeblack@google.com    dt_deallocateTBE;
88214184Sgabeblack@google.com    d_writeData;
88314184Sgabeblack@google.com    pr_popResponseQueue;
88414184Sgabeblack@google.com  }
88514184Sgabeblack@google.com
88614184Sgabeblack@google.com  transition(I_E, CPUDataShared, S) {DataArrayWrite, TagArrayWrite} {
88714184Sgabeblack@google.com    uu_sendUnblock;
88814184Sgabeblack@google.com    dt_deallocateTBE;
88914184Sgabeblack@google.com    d_writeData;
89014184Sgabeblack@google.com    pr_popResponseQueue;
89114184Sgabeblack@google.com  }
89214184Sgabeblack@google.com
89314184Sgabeblack@google.com  transition(I_S, {CPUData, CPUDataShared}, S) {DataArrayWrite, TagArrayWrite} {
89414184Sgabeblack@google.com    uu_sendUnblock;
89514184Sgabeblack@google.com    dt_deallocateTBE;
89614184Sgabeblack@google.com    d_writeData;
89714184Sgabeblack@google.com    pr_popResponseQueue;
89814184Sgabeblack@google.com  }
89914184Sgabeblack@google.com
90014184Sgabeblack@google.com  transition(S_M, CPUDataShared, O) {DataArrayWrite, TagArrayWrite} {
90114184Sgabeblack@google.com    uu_sendUnblock;
90214184Sgabeblack@google.com    dt_deallocateTBE;
90314184Sgabeblack@google.com    d_writeData;
90414184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
90514184Sgabeblack@google.com    pr_popResponseQueue;
90614184Sgabeblack@google.com  }
90714184Sgabeblack@google.com
90814184Sgabeblack@google.com  transition(S_O, {CPUData, CPUDataShared}, O) {DataArrayWrite, TagArrayWrite} {
90914184Sgabeblack@google.com    uu_sendUnblock;
91014184Sgabeblack@google.com    dt_deallocateTBE;
91114184Sgabeblack@google.com    d_writeData;
91214184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
91314184Sgabeblack@google.com    pr_popResponseQueue;
91414184Sgabeblack@google.com  }
91514184Sgabeblack@google.com
91614184Sgabeblack@google.com  transition(S_E, CPUDataShared, S) {DataArrayWrite, TagArrayWrite} {
91714184Sgabeblack@google.com    uu_sendUnblock;
91814184Sgabeblack@google.com    dt_deallocateTBE;
91914184Sgabeblack@google.com    d_writeData;
92014184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
92114184Sgabeblack@google.com    pr_popResponseQueue;
92214184Sgabeblack@google.com  }
92314184Sgabeblack@google.com
92414184Sgabeblack@google.com  transition(S_S, {CPUData, CPUDataShared}, S) {DataArrayWrite, TagArrayWrite} {
92514184Sgabeblack@google.com    uu_sendUnblock;
92614184Sgabeblack@google.com    dt_deallocateTBE;
92714184Sgabeblack@google.com    d_writeData;
92814184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
92914184Sgabeblack@google.com    pr_popResponseQueue;
93014184Sgabeblack@google.com  }
93114184Sgabeblack@google.com
93214184Sgabeblack@google.com  transition(O_E, CPUDataShared, O) {DataArrayWrite, TagArrayWrite} {
93314184Sgabeblack@google.com    uu_sendUnblock;
93414184Sgabeblack@google.com    dt_deallocateTBE;
93514184Sgabeblack@google.com    d_writeData;
93614184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
93714184Sgabeblack@google.com    pr_popResponseQueue;
93814184Sgabeblack@google.com  }
93914184Sgabeblack@google.com
94014184Sgabeblack@google.com  transition(O_S, {CPUData, CPUDataShared}, O) {DataArrayWrite, TagArrayWrite} {
94114184Sgabeblack@google.com    uu_sendUnblock;
94214184Sgabeblack@google.com    dt_deallocateTBE;
94314184Sgabeblack@google.com    d_writeData;
94414184Sgabeblack@google.com    ut_updateTag;  // update tag on writeback hits.
94514184Sgabeblack@google.com    pr_popResponseQueue;
94614184Sgabeblack@google.com  }
94714184Sgabeblack@google.com
94814184Sgabeblack@google.com  transition({D_I}, {CPUData, CPUDataShared}, I) {TagArrayWrite} {
94914184Sgabeblack@google.com    uu_sendUnblock;
95014184Sgabeblack@google.com    dt_deallocateTBE;
95114184Sgabeblack@google.com    pr_popResponseQueue;
95214184Sgabeblack@google.com  }
95314184Sgabeblack@google.com
95414184Sgabeblack@google.com  transition(MOD_I, {CPUData, CPUDataShared}, MO_I) {TagArrayWrite} {
95514184Sgabeblack@google.com    uu_sendUnblock;
95614184Sgabeblack@google.com    rf_resetFrom;
95714184Sgabeblack@google.com    pr_popResponseQueue;
95814184Sgabeblack@google.com  }
95914184Sgabeblack@google.com
96014184Sgabeblack@google.com  transition(I_I, {CPUData, CPUDataShared}, MO_I) {TagArrayWrite, DataArrayRead} {
96114184Sgabeblack@google.com    uu_sendUnblock;
96214184Sgabeblack@google.com    wt_writeDataToTBE;
96314184Sgabeblack@google.com    rf_resetFrom;
96414184Sgabeblack@google.com    pr_popResponseQueue;
96514184Sgabeblack@google.com  }
96614184Sgabeblack@google.com
96714184Sgabeblack@google.com  transition(I_CD, {CPUData, CPUDataShared}, I) {DataArrayRead, TagArrayWrite} {
96814184Sgabeblack@google.com    uu_sendUnblock;
96914184Sgabeblack@google.com    wt_writeDataToTBE;
97014184Sgabeblack@google.com    wb_data;
97114184Sgabeblack@google.com    dt_deallocateTBE;
97214184Sgabeblack@google.com    pr_popResponseQueue;
97314184Sgabeblack@google.com  }
97414184Sgabeblack@google.com
97514184Sgabeblack@google.com  transition({M, O}, L3_Repl, MO_I) {TagArrayRead, TagArrayWrite} {
97614184Sgabeblack@google.com    t_allocateTBE;
97714184Sgabeblack@google.com    vd_vicDirty;
97814184Sgabeblack@google.com    i_invL3;
97914184Sgabeblack@google.com  }
98014184Sgabeblack@google.com
98114184Sgabeblack@google.com  transition({E, S,}, L3_Repl, I) {TagArrayRead, TagArrayWrite} {
98214184Sgabeblack@google.com    i_invL3;
98314184Sgabeblack@google.com  }
98414184Sgabeblack@google.com
98514184Sgabeblack@google.com  transition({I_M, I_O, S_M, S_O, E_M, E_O}, L3_Repl) {} {
98614184Sgabeblack@google.com    zz_recycleRequestQueue;
98714184Sgabeblack@google.com  }
98814184Sgabeblack@google.com
98914184Sgabeblack@google.com  transition({O_M, O_O, O_E, O_S, M_M, M_O, M_E, M_S}, L3_Repl) {} {
99014184Sgabeblack@google.com    zz_recycleRequestQueue;
99114184Sgabeblack@google.com  }
99214184Sgabeblack@google.com
99314184Sgabeblack@google.com  transition({I_E, I_S, S_E, S_S, E_E, E_S}, L3_Repl) {} {
99414184Sgabeblack@google.com    zz_recycleRequestQueue;
99514184Sgabeblack@google.com  }
99614184Sgabeblack@google.com
99714184Sgabeblack@google.com  transition({M, O}, PrbInvData, I) {TagArrayRead, TagArrayWrite, DataArrayRead} {
99814184Sgabeblack@google.com    pd_sendProbeResponseData;
99914184Sgabeblack@google.com    i_invL3;
100014184Sgabeblack@google.com    pp_popProbeQueue;
100114184Sgabeblack@google.com  }
100214184Sgabeblack@google.com
100314184Sgabeblack@google.com  transition({E, S, I}, PrbInvData, I) {TagArrayRead, TagArrayWrite} {
100414184Sgabeblack@google.com    pi_sendProbeResponseInv;
100514184Sgabeblack@google.com    i_invL3;  // nothing will happen in I
100614184Sgabeblack@google.com    pp_popProbeQueue;
100714184Sgabeblack@google.com  }
100814184Sgabeblack@google.com
100914184Sgabeblack@google.com  transition({M, O, E, S, I}, PrbInv, I) {TagArrayRead, TagArrayWrite} {
101014184Sgabeblack@google.com    pi_sendProbeResponseInv;
101114184Sgabeblack@google.com    i_invL3; // nothing will happen in I
101214184Sgabeblack@google.com    pp_popProbeQueue;
101314184Sgabeblack@google.com  }
101414184Sgabeblack@google.com
101514184Sgabeblack@google.com  transition({M, O}, PrbShrData, O) {TagArrayRead, DataArrayRead, TagArrayWrite} {
101614184Sgabeblack@google.com    pd_sendProbeResponseData;
101714184Sgabeblack@google.com    pp_popProbeQueue;
101814184Sgabeblack@google.com  }
101914184Sgabeblack@google.com
102014184Sgabeblack@google.com  transition({E, S}, PrbShrData, S) {TagArrayRead, TagArrayWrite} {
102114184Sgabeblack@google.com    ph_sendProbeResponseHit;
102214184Sgabeblack@google.com    pp_popProbeQueue;
102314184Sgabeblack@google.com  }
102414184Sgabeblack@google.com
102514184Sgabeblack@google.com  transition(I, PrbShrData) {TagArrayRead} {
102614184Sgabeblack@google.com    pm_sendProbeResponseMiss;
102714184Sgabeblack@google.com    pp_popProbeQueue;
102814184Sgabeblack@google.com  }
102914184Sgabeblack@google.com
103014184Sgabeblack@google.com  transition(MO_I, PrbInvData, I_C) {TagArrayWrite, DataArrayRead} {
103114184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
103214184Sgabeblack@google.com    mc_cancelMemWriteback;
103314184Sgabeblack@google.com    pp_popProbeQueue;
103414184Sgabeblack@google.com  }
103514184Sgabeblack@google.com
103614184Sgabeblack@google.com  transition(MO_I, PrbInv, I_C) {TagArrayWrite} {
103714184Sgabeblack@google.com    pi_sendProbeResponseInv;
103814184Sgabeblack@google.com    mc_cancelMemWriteback;
103914184Sgabeblack@google.com    pp_popProbeQueue;
104014184Sgabeblack@google.com  }
104114184Sgabeblack@google.com
104214184Sgabeblack@google.com  transition(MO_I, PrbShrData) {DataArrayRead} {
104314184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
104414184Sgabeblack@google.com    pp_popProbeQueue;
104514184Sgabeblack@google.com  }
104614184Sgabeblack@google.com
104714184Sgabeblack@google.com  transition(I_C, {PrbInvData, PrbInv}) {} {
104814184Sgabeblack@google.com    pi_sendProbeResponseInv;
104914184Sgabeblack@google.com    pp_popProbeQueue;
105014184Sgabeblack@google.com  }
105114184Sgabeblack@google.com
105214184Sgabeblack@google.com  transition(I_C, PrbShrData) {} {
105314184Sgabeblack@google.com    pm_sendProbeResponseMiss;
105414184Sgabeblack@google.com    pp_popProbeQueue;
105514184Sgabeblack@google.com  }
105614184Sgabeblack@google.com
105714184Sgabeblack@google.com  transition(I_I, {WBAck}, I_CD) {TagArrayWrite} {
105814184Sgabeblack@google.com    pn_popNBResponseQueue;
105914184Sgabeblack@google.com  }
106014184Sgabeblack@google.com
106114184Sgabeblack@google.com  transition(MOD_I, WBAck, D_I) {DataArrayRead} {
106214184Sgabeblack@google.com    wb_data;
106314184Sgabeblack@google.com    pn_popNBResponseQueue;
106414184Sgabeblack@google.com  }
106514184Sgabeblack@google.com
106614184Sgabeblack@google.com  transition(MO_I, WBAck, I) {DataArrayRead, TagArrayWrite} {
106714184Sgabeblack@google.com    wb_data;
106814184Sgabeblack@google.com    dt_deallocateTBE;
106914184Sgabeblack@google.com    pn_popNBResponseQueue;
107014184Sgabeblack@google.com  }
107114184Sgabeblack@google.com
107214184Sgabeblack@google.com  transition(I_C, {WBAck}, I) {TagArrayWrite} {
107314184Sgabeblack@google.com    dt_deallocateTBE;
107414184Sgabeblack@google.com    pn_popNBResponseQueue;
107514184Sgabeblack@google.com  }
107614184Sgabeblack@google.com
107714184Sgabeblack@google.com  transition({I_M, I_O, I_E, I_S}, CancelWB, I) {TagArrayWrite} {
107814184Sgabeblack@google.com    uu_sendUnblock;
107914184Sgabeblack@google.com    dt_deallocateTBE;
108014184Sgabeblack@google.com    i_invL3;
108114184Sgabeblack@google.com    p_popRequestQueue;
108214184Sgabeblack@google.com  }
108314184Sgabeblack@google.com
108414184Sgabeblack@google.com  transition({S_S, S_O, S_M, S_E}, CancelWB, S) {TagArrayWrite} {
108514184Sgabeblack@google.com    uu_sendUnblock;
108614184Sgabeblack@google.com    dt_deallocateTBE;
108714184Sgabeblack@google.com    p_popRequestQueue;
108814184Sgabeblack@google.com  }
108914184Sgabeblack@google.com
109014184Sgabeblack@google.com  transition({E_M, E_O, E_E, E_S}, CancelWB, E) {TagArrayWrite} {
109114184Sgabeblack@google.com    uu_sendUnblock;
109214184Sgabeblack@google.com    dt_deallocateTBE;
109314184Sgabeblack@google.com    p_popRequestQueue;
109414184Sgabeblack@google.com  }
109514184Sgabeblack@google.com
109614184Sgabeblack@google.com  transition({O_M, O_O, O_E, O_S}, CancelWB, O) {TagArrayWrite} {
109714184Sgabeblack@google.com    uu_sendUnblock;
109814184Sgabeblack@google.com    dt_deallocateTBE;
109914184Sgabeblack@google.com    p_popRequestQueue;
110014184Sgabeblack@google.com  }
110114184Sgabeblack@google.com
110214184Sgabeblack@google.com  transition({M_M, M_O, M_E, M_S}, CancelWB, M) {TagArrayWrite} {
110314184Sgabeblack@google.com    uu_sendUnblock;
110414184Sgabeblack@google.com    dt_deallocateTBE;
110514184Sgabeblack@google.com    p_popRequestQueue;
110614184Sgabeblack@google.com  }
110714184Sgabeblack@google.com
110814184Sgabeblack@google.com  transition(D_I, CancelWB, I) {TagArrayWrite} {
110914184Sgabeblack@google.com    uu_sendUnblock;
111014184Sgabeblack@google.com    dt_deallocateTBE;
111114184Sgabeblack@google.com    p_popRequestQueue;
111214184Sgabeblack@google.com  }
111314184Sgabeblack@google.com
111414184Sgabeblack@google.com  transition(MOD_I, CancelWB, MO_I) {TagArrayWrite} {
111514184Sgabeblack@google.com    uu_sendUnblock;
111614184Sgabeblack@google.com    rf_resetFrom;
111714184Sgabeblack@google.com    p_popRequestQueue;
111814184Sgabeblack@google.com  }
111914184Sgabeblack@google.com
112014184Sgabeblack@google.com  transition(I_I, CancelWB, I_C) {TagArrayWrite} {
112114184Sgabeblack@google.com    uu_sendUnblock;
112214184Sgabeblack@google.com    rf_resetFrom;
112314184Sgabeblack@google.com    mc_cancelMemWriteback;
112414184Sgabeblack@google.com    p_popRequestQueue;
112514184Sgabeblack@google.com  }
112614184Sgabeblack@google.com
112714184Sgabeblack@google.com  transition(I_CD, CancelWB, I) {TagArrayWrite} {
112814184Sgabeblack@google.com    uu_sendUnblock;
112914184Sgabeblack@google.com    dt_deallocateTBE;
113014184Sgabeblack@google.com    mc_cancelMemWriteback;
113114184Sgabeblack@google.com    p_popRequestQueue;
113214184Sgabeblack@google.com  }
113314184Sgabeblack@google.com
113414184Sgabeblack@google.com}
1135