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:CorePair, "CP-like Core Coherence")
3714184Sgabeblack@google.com : Sequencer * sequencer;
3814184Sgabeblack@google.com   Sequencer * sequencer1;
3914184Sgabeblack@google.com   CacheMemory * L1Icache;
4014184Sgabeblack@google.com   CacheMemory * L1D0cache;
4114184Sgabeblack@google.com   CacheMemory * L1D1cache;
4214184Sgabeblack@google.com   CacheMemory * L2cache;
4314184Sgabeblack@google.com   int regionBufferNum;
4414184Sgabeblack@google.com   bool send_evictions := "False";
4514184Sgabeblack@google.com   Cycles issue_latency := 5;
4614184Sgabeblack@google.com   Cycles l2_hit_latency := 18;
4714184Sgabeblack@google.com
4814184Sgabeblack@google.com  // BEGIN Core Buffers
4914184Sgabeblack@google.com
5014184Sgabeblack@google.com  // To the Network
5114184Sgabeblack@google.com  MessageBuffer * requestFromCore, network="To", virtual_network="0", ordered="true", vnet_type="request";
5214184Sgabeblack@google.com  MessageBuffer * responseFromCore, network="To", virtual_network="2", ordered="false", vnet_type="response";
5314184Sgabeblack@google.com  MessageBuffer * unblockFromCore, network="To", virtual_network="4", ordered="false", vnet_type="unblock";
5414184Sgabeblack@google.com
5514184Sgabeblack@google.com  // From the Network
5614184Sgabeblack@google.com  MessageBuffer * probeToCore, network="From", virtual_network="0", ordered="false", vnet_type="request";
5714184Sgabeblack@google.com  MessageBuffer * responseToCore, network="From", virtual_network="2", ordered="false", vnet_type="response";
5814184Sgabeblack@google.com
5914184Sgabeblack@google.com  MessageBuffer * mandatoryQueue, ordered="false";
6014184Sgabeblack@google.com  MessageBuffer * triggerQueue, ordered="true";
6114184Sgabeblack@google.com
6214184Sgabeblack@google.com  // END Core Buffers
6314184Sgabeblack@google.com
6414184Sgabeblack@google.com{
6514184Sgabeblack@google.com  // BEGIN STATES
6614184Sgabeblack@google.com  state_declaration(State, desc="Cache states", default="CorePair_State_I") {
6714184Sgabeblack@google.com
6814184Sgabeblack@google.com    I, AccessPermission:Invalid, desc="Invalid";
6914184Sgabeblack@google.com    S, AccessPermission:Read_Only, desc="Shared";
7014184Sgabeblack@google.com    E0, AccessPermission:Read_Write, desc="Exclusive with Cluster 0 ownership";
7114184Sgabeblack@google.com    E1, AccessPermission:Read_Write, desc="Exclusive with Cluster 1 ownership";
7214184Sgabeblack@google.com    Es, AccessPermission:Read_Write, desc="Exclusive in core";
7314184Sgabeblack@google.com    O, AccessPermission:Read_Only, desc="Owner state in core, both clusters and other cores may be sharing line";
7414184Sgabeblack@google.com    Ms, AccessPermission:Read_Write, desc="Modified in core, both clusters may be sharing line";
7514184Sgabeblack@google.com    M0, AccessPermission:Read_Write, desc="Modified with cluster ownership";
7614184Sgabeblack@google.com    M1, AccessPermission:Read_Write, desc="Modified with cluster ownership";
7714184Sgabeblack@google.com
7814184Sgabeblack@google.com    // Transient States
7914184Sgabeblack@google.com    I_M0, AccessPermission:Busy, desc="Invalid, issued RdBlkM, have not seen response yet";
8014184Sgabeblack@google.com    I_M1, AccessPermission:Busy, desc="Invalid, issued RdBlkM, have not seen response yet";
8114184Sgabeblack@google.com    I_M0M1, AccessPermission:Busy, desc="Was in I_M0, got a store request from other cluster as well";
8214184Sgabeblack@google.com    I_M1M0, AccessPermission:Busy, desc="Was in I_M1, got a store request from other cluster as well";
8314184Sgabeblack@google.com    I_M0Ms, AccessPermission:Busy, desc="Was in I_M0, got a load request from other cluster as well";
8414184Sgabeblack@google.com    I_M1Ms, AccessPermission:Busy, desc="Was in I_M1, got a load request from other cluster as well";
8514184Sgabeblack@google.com    I_E0S, AccessPermission:Busy, desc="Invalid, issued RdBlk, have not seen response yet";
8614184Sgabeblack@google.com    I_E1S, AccessPermission:Busy, desc="Invalid, issued RdBlk, have not seen response yet";
8714184Sgabeblack@google.com    I_ES, AccessPermission:Busy, desc="S_F got hit by invalidating probe, RdBlk response needs to go to both clusters";
8814184Sgabeblack@google.com
8914184Sgabeblack@google.com    IF_E0S, AccessPermission:Busy, desc="something got hit with Probe Invalidate, now just I_E0S but expecting a L2_to_L1D0 trigger, just drop when receive";
9014184Sgabeblack@google.com    IF_E1S, AccessPermission:Busy, desc="something got hit with Probe Invalidate, now just I_E1S but expecting a L2_to_L1D1 trigger, just drop when receive";
9114184Sgabeblack@google.com    IF_ES, AccessPermission:Busy, desc="same, but waiting for two fills";
9214184Sgabeblack@google.com    IF0_ES, AccessPermission:Busy, desc="same, but waiting for two fills, got one";
9314184Sgabeblack@google.com    IF1_ES, AccessPermission:Busy, desc="same, but waiting for two fills, got one";
9414184Sgabeblack@google.com    F_S0, AccessPermission:Busy, desc="same, but going to S0 when trigger received";
9514184Sgabeblack@google.com    F_S1, AccessPermission:Busy, desc="same, but going to S1 when trigger received";
9614184Sgabeblack@google.com
9714184Sgabeblack@google.com    ES_I, AccessPermission:Read_Only, desc="L2 replacement, waiting for clean writeback ack";
9814184Sgabeblack@google.com    MO_I, AccessPermission:Read_Only, desc="L2 replacement, waiting for dirty writeback ack";
9914184Sgabeblack@google.com    MO_S0, AccessPermission:Read_Only, desc="M/O got Ifetch Miss, must write back first, then send RdBlkS";
10014184Sgabeblack@google.com    MO_S1, AccessPermission:Read_Only, desc="M/O got Ifetch Miss, must write back first, then send RdBlkS";
10114184Sgabeblack@google.com    S_F0, AccessPermission:Read_Only,  desc="Shared, filling L1";
10214184Sgabeblack@google.com    S_F1, AccessPermission:Read_Only,  desc="Shared, filling L1";
10314184Sgabeblack@google.com    S_F, AccessPermission:Read_Only,   desc="Shared, filling L1";
10414184Sgabeblack@google.com    O_F0, AccessPermission:Read_Only,  desc="Owned, filling L1";
10514184Sgabeblack@google.com    O_F1, AccessPermission:Read_Only,  desc="Owned, filling L1";
10614184Sgabeblack@google.com    O_F,  AccessPermission:Read_Only,  desc="Owned, filling L1";
10714184Sgabeblack@google.com    Si_F0, AccessPermission:Read_Only, desc="Shared, filling icache";
10814184Sgabeblack@google.com    Si_F1, AccessPermission:Read_Only, desc="Shared, filling icache";
10914184Sgabeblack@google.com    S_M0, AccessPermission:Read_Only, desc="Shared, issued CtoD, have not seen response yet";
11014184Sgabeblack@google.com    S_M1, AccessPermission:Read_Only, desc="Shared, issued CtoD, have not seen response yet";
11114184Sgabeblack@google.com    O_M0, AccessPermission:Read_Only, desc="Shared, issued CtoD, have not seen response yet";
11214184Sgabeblack@google.com    O_M1, AccessPermission:Read_Only, desc="Shared, issued CtoD, have not seen response yet";
11314184Sgabeblack@google.com    S0, AccessPermission:Busy, desc="RdBlkS on behalf of cluster 0, waiting for response";
11414184Sgabeblack@google.com    S1, AccessPermission:Busy, desc="RdBlkS on behalf of cluster 1, waiting for response";
11514184Sgabeblack@google.com
11614184Sgabeblack@google.com    Es_F0, AccessPermission:Read_Write, desc="Es, Cluster read, filling";
11714184Sgabeblack@google.com    Es_F1, AccessPermission:Read_Write, desc="Es, Cluster read, filling";
11814184Sgabeblack@google.com    Es_F, AccessPermission:Read_Write,  desc="Es, other cluster read, filling";
11914184Sgabeblack@google.com    E0_F, AccessPermission:Read_Write, desc="E0, cluster read, filling";
12014184Sgabeblack@google.com    E1_F, AccessPermission:Read_Write, desc="...";
12114184Sgabeblack@google.com    E0_Es, AccessPermission:Read_Write, desc="...";
12214184Sgabeblack@google.com    E1_Es, AccessPermission:Read_Write, desc="...";
12314184Sgabeblack@google.com    Ms_F0, AccessPermission:Read_Write, desc="...";
12414184Sgabeblack@google.com    Ms_F1, AccessPermission:Read_Write, desc="...";
12514184Sgabeblack@google.com    Ms_F, AccessPermission:Read_Write,  desc="...";
12614184Sgabeblack@google.com    M0_F, AccessPermission:Read_Write, desc="...";
12714184Sgabeblack@google.com    M0_Ms, AccessPermission:Read_Write, desc="...";
12814184Sgabeblack@google.com    M1_F, AccessPermission:Read_Write, desc="...";
12914184Sgabeblack@google.com    M1_Ms, AccessPermission:Read_Write, desc="...";
13014184Sgabeblack@google.com
13114184Sgabeblack@google.com    I_C, AccessPermission:Invalid, desc="Invalid, but waiting for WBAck from NB from canceled writeback";
13214184Sgabeblack@google.com    S0_C, AccessPermission:Busy, desc="MO_S0 hit by invalidating probe, waiting for WBAck form NB for canceled WB";
13314184Sgabeblack@google.com    S1_C, AccessPermission:Busy, desc="MO_S1 hit by invalidating probe, waiting for WBAck form NB for canceled WB";
13414184Sgabeblack@google.com    S_C, AccessPermission:Busy, desc="S*_C got NB_AckS, still waiting for WBAck";
13514184Sgabeblack@google.com
13614184Sgabeblack@google.com  } // END STATES
13714184Sgabeblack@google.com
13814184Sgabeblack@google.com  // BEGIN EVENTS
13914184Sgabeblack@google.com  enumeration(Event, desc="CP Events") {
14014184Sgabeblack@google.com    // CP Initiated events
14114184Sgabeblack@google.com    C0_Load_L1miss,            desc="Cluster 0 load, L1 missed";
14214184Sgabeblack@google.com    C0_Load_L1hit,             desc="Cluster 0 load, L1 hit";
14314184Sgabeblack@google.com    C1_Load_L1miss,            desc="Cluster 1 load L1 missed";
14414184Sgabeblack@google.com    C1_Load_L1hit,             desc="Cluster 1 load L1 hit";
14514184Sgabeblack@google.com    Ifetch0_L1hit,             desc="Instruction fetch, hit in the L1";
14614184Sgabeblack@google.com    Ifetch1_L1hit,             desc="Instruction fetch, hit in the L1";
14714184Sgabeblack@google.com    Ifetch0_L1miss,            desc="Instruction fetch, missed in the L1";
14814184Sgabeblack@google.com    Ifetch1_L1miss,            desc="Instruction fetch, missed in the L1";
14914184Sgabeblack@google.com    C0_Store_L1miss,           desc="Cluster 0 store missed in L1";
15014184Sgabeblack@google.com    C0_Store_L1hit,            desc="Cluster 0 store hit in L1";
15114184Sgabeblack@google.com    C1_Store_L1miss,           desc="Cluster 1 store missed in L1";
15214184Sgabeblack@google.com    C1_Store_L1hit,            desc="Cluster 1 store hit in L1";
15314184Sgabeblack@google.com    // NB Initiated events
15414184Sgabeblack@google.com    NB_AckS,             desc="NB Ack to Core Request";
15514184Sgabeblack@google.com    NB_AckM,             desc="NB Ack to Core Request";
15614184Sgabeblack@google.com    NB_AckE,             desc="NB Ack to Core Request";
15714184Sgabeblack@google.com
15814184Sgabeblack@google.com    NB_AckWB,            desc="NB Ack for writeback";
15914184Sgabeblack@google.com
16014184Sgabeblack@google.com    // Memory System initiatied events
16114184Sgabeblack@google.com    L1I_Repl,           desc="Replace address from L1I"; // Presumed clean
16214184Sgabeblack@google.com    L1D0_Repl,           desc="Replace address from L1D0"; // Presumed clean
16314184Sgabeblack@google.com    L1D1_Repl,           desc="Replace address from L1D1"; // Presumed clean
16414184Sgabeblack@google.com    L2_Repl,            desc="Replace address from L2";
16514184Sgabeblack@google.com
16614184Sgabeblack@google.com    L2_to_L1D0,           desc="L1 fill from L2";
16714184Sgabeblack@google.com    L2_to_L1D1,           desc="L1 fill from L2";
16814184Sgabeblack@google.com    L2_to_L1I,           desc="L1 fill from L2";
16914184Sgabeblack@google.com
17014184Sgabeblack@google.com    // Probe Events
17114184Sgabeblack@google.com    PrbInvData,         desc="probe, return O or M data";
17214184Sgabeblack@google.com    PrbInvDataDemand,     desc="probe, return O or M data. Demand request";
17314184Sgabeblack@google.com    PrbInv,             desc="probe, no need for data";
17414184Sgabeblack@google.com    PrbShrData,         desc="probe downgrade, return O or M data";
17514184Sgabeblack@google.com    PrbShrDataDemand,     desc="probe downgrade, return O or M data. Demand request";
17614184Sgabeblack@google.com    ForceRepl,          desc="probe from r-buf. Act as though a repl";
17714184Sgabeblack@google.com    ForceDowngrade,     desc="probe from r-buf. Act as though a repl";
17814184Sgabeblack@google.com
17914184Sgabeblack@google.com  }  // END EVENTS
18014184Sgabeblack@google.com
18114184Sgabeblack@google.com  enumeration(RequestType, desc="To communicate stats from transitions to recordStats") {
18214184Sgabeblack@google.com    L1D0DataArrayRead,    desc="Read the data array";
18314184Sgabeblack@google.com    L1D0DataArrayWrite,   desc="Write the data array";
18414184Sgabeblack@google.com    L1D0TagArrayRead,     desc="Read the data array";
18514184Sgabeblack@google.com    L1D0TagArrayWrite,    desc="Write the data array";
18614184Sgabeblack@google.com    L1D1DataArrayRead,    desc="Read the data array";
18714184Sgabeblack@google.com    L1D1DataArrayWrite,   desc="Write the data array";
18814184Sgabeblack@google.com    L1D1TagArrayRead,     desc="Read the data array";
18914184Sgabeblack@google.com    L1D1TagArrayWrite,    desc="Write the data array";
19014184Sgabeblack@google.com    L1IDataArrayRead,     desc="Read the data array";
19114184Sgabeblack@google.com    L1IDataArrayWrite,    desc="Write the data array";
19214184Sgabeblack@google.com    L1ITagArrayRead,      desc="Read the data array";
19314184Sgabeblack@google.com    L1ITagArrayWrite,     desc="Write the data array";
19414184Sgabeblack@google.com    L2DataArrayRead,      desc="Read the data array";
19514184Sgabeblack@google.com    L2DataArrayWrite,     desc="Write the data array";
19614184Sgabeblack@google.com    L2TagArrayRead,       desc="Read the data array";
19714184Sgabeblack@google.com    L2TagArrayWrite,      desc="Write the data array";
19814184Sgabeblack@google.com  }
19914184Sgabeblack@google.com
20014184Sgabeblack@google.com
20114184Sgabeblack@google.com  // BEGIN STRUCTURE DEFINITIONS
20214184Sgabeblack@google.com
20314184Sgabeblack@google.com
20414184Sgabeblack@google.com  // Cache Entry
20514184Sgabeblack@google.com  structure(Entry, desc="...", interface="AbstractCacheEntry") {
20614184Sgabeblack@google.com    State CacheState,           desc="cache state";
20714184Sgabeblack@google.com    bool Dirty,                 desc="Is the data dirty (diff than memory)?";
20814184Sgabeblack@google.com    DataBlock DataBlk,          desc="data for the block";
20914184Sgabeblack@google.com    bool FromL2, default="false", desc="block just moved from L2";
21014184Sgabeblack@google.com  }
21114184Sgabeblack@google.com
21214184Sgabeblack@google.com  structure(TBE, desc="...") {
21314184Sgabeblack@google.com    State TBEState,             desc="Transient state";
21414184Sgabeblack@google.com    DataBlock DataBlk,       desc="data for the block, required for concurrent writebacks";
21514184Sgabeblack@google.com    bool Dirty,              desc="Is the data dirty (different than memory)?";
21614184Sgabeblack@google.com    int NumPendingMsgs,      desc="Number of acks/data messages that this processor is waiting for";
21714184Sgabeblack@google.com    bool Shared,             desc="Victim hit by shared probe";
21814184Sgabeblack@google.com    bool AckNeeded,          desc="True if need to ack r-dir";
21914184Sgabeblack@google.com   }
22014184Sgabeblack@google.com
22114184Sgabeblack@google.com  structure(TBETable, external="yes") {
22214184Sgabeblack@google.com    TBE lookup(Addr);
22314184Sgabeblack@google.com    void allocate(Addr);
22414184Sgabeblack@google.com    void deallocate(Addr);
22514184Sgabeblack@google.com    bool isPresent(Addr);
22614184Sgabeblack@google.com  }
22714184Sgabeblack@google.com
22814184Sgabeblack@google.com  TBETable TBEs, template="<CorePair_TBE>", constructor="m_number_of_TBEs";
22914184Sgabeblack@google.com
23014184Sgabeblack@google.com  Tick clockEdge();
23114184Sgabeblack@google.com  Tick cyclesToTicks(Cycles c);
23214184Sgabeblack@google.com
23314184Sgabeblack@google.com  void set_cache_entry(AbstractCacheEntry b);
23414184Sgabeblack@google.com  void unset_cache_entry();
23514184Sgabeblack@google.com  void set_tbe(TBE b);
23614184Sgabeblack@google.com  void unset_tbe();
23714184Sgabeblack@google.com  void wakeUpAllBuffers();
23814184Sgabeblack@google.com  void wakeUpBuffers(Addr a);
23914184Sgabeblack@google.com  Cycles curCycle();
24014184Sgabeblack@google.com  MachineID mapAddressToMachine(Addr addr, MachineType mtype);
24114184Sgabeblack@google.com
24214184Sgabeblack@google.com  // END STRUCTURE DEFINITIONS
24314184Sgabeblack@google.com
24414184Sgabeblack@google.com  // BEGIN INTERNAL FUNCTIONS
24514184Sgabeblack@google.com
24614184Sgabeblack@google.com  MachineID getPeer(MachineID mach) {
24714184Sgabeblack@google.com    return createMachineID(MachineType:RegionBuffer, intToID(regionBufferNum));
24814184Sgabeblack@google.com  }
24914184Sgabeblack@google.com
25014184Sgabeblack@google.com  bool addressInCore(Addr addr) {
25114184Sgabeblack@google.com    return (L2cache.isTagPresent(addr) || L1Icache.isTagPresent(addr) || L1D0cache.isTagPresent(addr) || L1D1cache.isTagPresent(addr));
25214184Sgabeblack@google.com  }
25314184Sgabeblack@google.com
25414184Sgabeblack@google.com  Entry getCacheEntry(Addr address), return_by_pointer="yes" {
25514184Sgabeblack@google.com    Entry L2cache_entry := static_cast(Entry, "pointer", L2cache.lookup(address));
25614184Sgabeblack@google.com    return L2cache_entry;
25714184Sgabeblack@google.com  }
25814184Sgabeblack@google.com
25914184Sgabeblack@google.com  DataBlock getDataBlock(Addr addr), return_by_ref="yes" {
26014184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
26114184Sgabeblack@google.com    if(is_valid(tbe)) {
26214184Sgabeblack@google.com      return tbe.DataBlk;
26314184Sgabeblack@google.com    } else {
26414184Sgabeblack@google.com      return getCacheEntry(addr).DataBlk;
26514184Sgabeblack@google.com    }
26614184Sgabeblack@google.com  }
26714184Sgabeblack@google.com
26814184Sgabeblack@google.com  Entry getL1CacheEntry(Addr addr, int cluster), return_by_pointer="yes" {
26914184Sgabeblack@google.com    if (cluster == 0) {
27014184Sgabeblack@google.com      Entry L1D0_entry := static_cast(Entry, "pointer", L1D0cache.lookup(addr));
27114184Sgabeblack@google.com      return L1D0_entry;
27214184Sgabeblack@google.com    } else {
27314184Sgabeblack@google.com      Entry L1D1_entry := static_cast(Entry, "pointer", L1D1cache.lookup(addr));
27414184Sgabeblack@google.com      return L1D1_entry;
27514184Sgabeblack@google.com    }
27614184Sgabeblack@google.com  }
27714184Sgabeblack@google.com
27814184Sgabeblack@google.com  Entry getICacheEntry(Addr addr), return_by_pointer="yes" {
27914184Sgabeblack@google.com    Entry c_entry := static_cast(Entry, "pointer", L1Icache.lookup(addr));
28014184Sgabeblack@google.com    return c_entry;
28114184Sgabeblack@google.com  }
28214184Sgabeblack@google.com
28314184Sgabeblack@google.com  bool presentOrAvail2(Addr addr) {
28414184Sgabeblack@google.com    return L2cache.isTagPresent(addr) || L2cache.cacheAvail(addr);
28514184Sgabeblack@google.com  }
28614184Sgabeblack@google.com
28714184Sgabeblack@google.com  bool presentOrAvailI(Addr addr) {
28814184Sgabeblack@google.com    return L1Icache.isTagPresent(addr) || L1Icache.cacheAvail(addr);
28914184Sgabeblack@google.com  }
29014184Sgabeblack@google.com
29114184Sgabeblack@google.com  bool presentOrAvailD0(Addr addr) {
29214184Sgabeblack@google.com    return L1D0cache.isTagPresent(addr) || L1D0cache.cacheAvail(addr);
29314184Sgabeblack@google.com  }
29414184Sgabeblack@google.com
29514184Sgabeblack@google.com  bool presentOrAvailD1(Addr addr) {
29614184Sgabeblack@google.com    return L1D1cache.isTagPresent(addr) || L1D1cache.cacheAvail(addr);
29714184Sgabeblack@google.com  }
29814184Sgabeblack@google.com
29914184Sgabeblack@google.com  State getState(TBE tbe, Entry cache_entry, Addr addr) {
30014184Sgabeblack@google.com    if(is_valid(tbe)) {
30114184Sgabeblack@google.com      return tbe.TBEState;
30214184Sgabeblack@google.com    } else if (is_valid(cache_entry)) {
30314184Sgabeblack@google.com      return cache_entry.CacheState;
30414184Sgabeblack@google.com    }
30514184Sgabeblack@google.com    return State:I;
30614184Sgabeblack@google.com  }
30714184Sgabeblack@google.com
30814184Sgabeblack@google.com  void setState(TBE tbe, Entry cache_entry, Addr addr, State state) {
30914184Sgabeblack@google.com    if (is_valid(tbe)) {
31014184Sgabeblack@google.com      tbe.TBEState := state;
31114184Sgabeblack@google.com    }
31214184Sgabeblack@google.com
31314184Sgabeblack@google.com    if (is_valid(cache_entry)) {
31414184Sgabeblack@google.com      cache_entry.CacheState := state;
31514184Sgabeblack@google.com    }
31614184Sgabeblack@google.com  }
31714184Sgabeblack@google.com
31814184Sgabeblack@google.com  AccessPermission getAccessPermission(Addr addr) {
31914184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
32014184Sgabeblack@google.com    if(is_valid(tbe)) {
32114184Sgabeblack@google.com      return CorePair_State_to_permission(tbe.TBEState);
32214184Sgabeblack@google.com    }
32314184Sgabeblack@google.com
32414184Sgabeblack@google.com    Entry cache_entry := getCacheEntry(addr);
32514184Sgabeblack@google.com    if(is_valid(cache_entry)) {
32614184Sgabeblack@google.com      return CorePair_State_to_permission(cache_entry.CacheState);
32714184Sgabeblack@google.com    }
32814184Sgabeblack@google.com
32914184Sgabeblack@google.com    return AccessPermission:NotPresent;
33014184Sgabeblack@google.com  }
33114184Sgabeblack@google.com
33214184Sgabeblack@google.com  void functionalRead(Addr addr, Packet *pkt) {
33314184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
33414184Sgabeblack@google.com    if(is_valid(tbe)) {
33514184Sgabeblack@google.com      testAndRead(addr, tbe.DataBlk, pkt);
33614184Sgabeblack@google.com    } else {
33714184Sgabeblack@google.com      functionalMemoryRead(pkt);
33814184Sgabeblack@google.com    }
33914184Sgabeblack@google.com  }
34014184Sgabeblack@google.com
34114184Sgabeblack@google.com  int functionalWrite(Addr addr, Packet *pkt) {
34214184Sgabeblack@google.com    int num_functional_writes := 0;
34314184Sgabeblack@google.com
34414184Sgabeblack@google.com    TBE tbe := TBEs.lookup(addr);
34514184Sgabeblack@google.com    if(is_valid(tbe)) {
34614184Sgabeblack@google.com      num_functional_writes := num_functional_writes +
34714184Sgabeblack@google.com            testAndWrite(addr, tbe.DataBlk, pkt);
34814184Sgabeblack@google.com    }
34914184Sgabeblack@google.com
35014184Sgabeblack@google.com    num_functional_writes := num_functional_writes + functionalMemoryWrite(pkt);
35114184Sgabeblack@google.com    return num_functional_writes;
35214184Sgabeblack@google.com  }
35314184Sgabeblack@google.com
35414184Sgabeblack@google.com  bool isValid(Addr addr) {
35514184Sgabeblack@google.com      AccessPermission perm := getAccessPermission(addr);
35614184Sgabeblack@google.com      if (perm == AccessPermission:NotPresent ||
35714184Sgabeblack@google.com          perm == AccessPermission:Invalid ||
35814184Sgabeblack@google.com          perm == AccessPermission:Busy) {
35914184Sgabeblack@google.com          return false;
36014184Sgabeblack@google.com      } else {
36114184Sgabeblack@google.com          return true;
36214184Sgabeblack@google.com      }
36314184Sgabeblack@google.com  }
36414184Sgabeblack@google.com
36514184Sgabeblack@google.com  void setAccessPermission(Entry cache_entry, Addr addr, State state) {
36614184Sgabeblack@google.com    if (is_valid(cache_entry)) {
36714184Sgabeblack@google.com      cache_entry.changePermission(CorePair_State_to_permission(state));
36814184Sgabeblack@google.com    }
36914184Sgabeblack@google.com  }
37014184Sgabeblack@google.com
37114184Sgabeblack@google.com  MachineType testAndClearLocalHit(Entry cache_entry) {
37214184Sgabeblack@google.com    assert(is_valid(cache_entry));
37314184Sgabeblack@google.com    if (cache_entry.FromL2) {
37414184Sgabeblack@google.com      cache_entry.FromL2 := false;
37514184Sgabeblack@google.com      return MachineType:L2Cache;
37614184Sgabeblack@google.com    } else {
37714184Sgabeblack@google.com      return MachineType:L1Cache;
37814184Sgabeblack@google.com    }
37914184Sgabeblack@google.com  }
38014184Sgabeblack@google.com
38114184Sgabeblack@google.com  void recordRequestType(RequestType request_type, Addr addr) {
38214184Sgabeblack@google.com    if (request_type == RequestType:L1D0DataArrayRead) {
38314184Sgabeblack@google.com      L1D0cache.recordRequestType(CacheRequestType:DataArrayRead, addr);
38414184Sgabeblack@google.com    } else if (request_type == RequestType:L1D0DataArrayWrite) {
38514184Sgabeblack@google.com      L1D0cache.recordRequestType(CacheRequestType:DataArrayWrite, addr);
38614184Sgabeblack@google.com    } else if (request_type == RequestType:L1D0TagArrayRead) {
38714184Sgabeblack@google.com      L1D0cache.recordRequestType(CacheRequestType:TagArrayRead, addr);
38814184Sgabeblack@google.com    } else if (request_type == RequestType:L1D0TagArrayWrite) {
38914184Sgabeblack@google.com      L1D0cache.recordRequestType(CacheRequestType:TagArrayWrite, addr);
39014184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1DataArrayRead) {
39114184Sgabeblack@google.com      L1D1cache.recordRequestType(CacheRequestType:DataArrayRead, addr);
39214184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1DataArrayWrite) {
39314184Sgabeblack@google.com      L1D1cache.recordRequestType(CacheRequestType:DataArrayWrite, addr);
39414184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1TagArrayRead) {
39514184Sgabeblack@google.com      L1D1cache.recordRequestType(CacheRequestType:TagArrayRead, addr);
39614184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1TagArrayWrite) {
39714184Sgabeblack@google.com      L1D1cache.recordRequestType(CacheRequestType:TagArrayWrite, addr);
39814184Sgabeblack@google.com    } else if (request_type == RequestType:L1IDataArrayRead) {
39914184Sgabeblack@google.com      L1Icache.recordRequestType(CacheRequestType:DataArrayRead, addr);
40014184Sgabeblack@google.com    } else if (request_type == RequestType:L1IDataArrayWrite) {
40114184Sgabeblack@google.com      L1Icache.recordRequestType(CacheRequestType:DataArrayWrite, addr);
40214184Sgabeblack@google.com    } else if (request_type == RequestType:L1ITagArrayRead) {
40314184Sgabeblack@google.com      L1Icache.recordRequestType(CacheRequestType:TagArrayRead, addr);
40414184Sgabeblack@google.com    } else if (request_type == RequestType:L1ITagArrayWrite) {
40514184Sgabeblack@google.com      L1Icache.recordRequestType(CacheRequestType:TagArrayWrite, addr);
40614184Sgabeblack@google.com    } else if (request_type == RequestType:L2DataArrayRead) {
40714184Sgabeblack@google.com      L2cache.recordRequestType(CacheRequestType:DataArrayRead, addr);
40814184Sgabeblack@google.com    } else if (request_type == RequestType:L2DataArrayWrite) {
40914184Sgabeblack@google.com      L2cache.recordRequestType(CacheRequestType:DataArrayWrite, addr);
41014184Sgabeblack@google.com    } else if (request_type == RequestType:L2TagArrayRead) {
41114184Sgabeblack@google.com      L2cache.recordRequestType(CacheRequestType:TagArrayRead, addr);
41214184Sgabeblack@google.com    } else if (request_type == RequestType:L2TagArrayWrite) {
41314184Sgabeblack@google.com      L2cache.recordRequestType(CacheRequestType:TagArrayWrite, addr);
41414184Sgabeblack@google.com    }
41514184Sgabeblack@google.com  }
41614184Sgabeblack@google.com
41714184Sgabeblack@google.com  bool checkResourceAvailable(RequestType request_type, Addr addr) {
41814184Sgabeblack@google.com    if (request_type == RequestType:L2DataArrayRead) {
41914184Sgabeblack@google.com      return L2cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
42014184Sgabeblack@google.com    } else if (request_type == RequestType:L2DataArrayWrite) {
42114184Sgabeblack@google.com      return L2cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
42214184Sgabeblack@google.com    } else if (request_type == RequestType:L2TagArrayRead) {
42314184Sgabeblack@google.com      return L2cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
42414184Sgabeblack@google.com    } else if (request_type == RequestType:L2TagArrayWrite) {
42514184Sgabeblack@google.com      return L2cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
42614184Sgabeblack@google.com    } else if  (request_type == RequestType:L1D0DataArrayRead) {
42714184Sgabeblack@google.com      return L1D0cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
42814184Sgabeblack@google.com    } else if  (request_type == RequestType:L1D0DataArrayWrite) {
42914184Sgabeblack@google.com      return L1D0cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
43014184Sgabeblack@google.com    } else if (request_type == RequestType:L1D0TagArrayRead) {
43114184Sgabeblack@google.com      return L1D0cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
43214184Sgabeblack@google.com    } else if (request_type == RequestType:L1D0TagArrayWrite) {
43314184Sgabeblack@google.com      return L1D0cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
43414184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1DataArrayRead) {
43514184Sgabeblack@google.com      return L1D1cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
43614184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1DataArrayWrite) {
43714184Sgabeblack@google.com      return L1D1cache.checkResourceAvailable(CacheResourceType:DataArray, addr);
43814184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1TagArrayRead) {
43914184Sgabeblack@google.com      return L1D1cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
44014184Sgabeblack@google.com    } else if (request_type == RequestType:L1D1TagArrayWrite) {
44114184Sgabeblack@google.com      return L1D1cache.checkResourceAvailable(CacheResourceType:TagArray, addr);
44214184Sgabeblack@google.com    } else if (request_type == RequestType:L1IDataArrayRead) {
44314184Sgabeblack@google.com      return L1Icache.checkResourceAvailable(CacheResourceType:DataArray, addr);
44414184Sgabeblack@google.com    } else if (request_type == RequestType:L1IDataArrayWrite) {
44514184Sgabeblack@google.com      return L1Icache.checkResourceAvailable(CacheResourceType:DataArray, addr);
44614184Sgabeblack@google.com    } else if (request_type == RequestType:L1ITagArrayRead) {
44714184Sgabeblack@google.com      return L1Icache.checkResourceAvailable(CacheResourceType:TagArray, addr);
44814184Sgabeblack@google.com    } else if (request_type == RequestType:L1ITagArrayWrite) {
44914184Sgabeblack@google.com      return L1Icache.checkResourceAvailable(CacheResourceType:TagArray, addr);
45014184Sgabeblack@google.com    } else {
45114184Sgabeblack@google.com      return true;
45214184Sgabeblack@google.com    }
45314184Sgabeblack@google.com  }
45414184Sgabeblack@google.com
45514184Sgabeblack@google.com  // END INTERNAL FUNCTIONS
45614184Sgabeblack@google.com
45714184Sgabeblack@google.com  // ** OUT_PORTS **
45814184Sgabeblack@google.com
45914184Sgabeblack@google.com  out_port(requestNetwork_out, CPURequestMsg, requestFromCore);
46014184Sgabeblack@google.com  out_port(responseNetwork_out, ResponseMsg, responseFromCore);
46114184Sgabeblack@google.com  out_port(triggerQueue_out, TriggerMsg, triggerQueue);
46214184Sgabeblack@google.com  out_port(unblockNetwork_out, UnblockMsg, unblockFromCore);
46314184Sgabeblack@google.com
46414184Sgabeblack@google.com  // ** IN_PORTS **
46514184Sgabeblack@google.com
46614184Sgabeblack@google.com  in_port(triggerQueue_in, TriggerMsg, triggerQueue, block_on="addr") {
46714184Sgabeblack@google.com    if (triggerQueue_in.isReady(clockEdge())) {
46814184Sgabeblack@google.com      peek(triggerQueue_in, TriggerMsg) {
46914184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
47014184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
47114184Sgabeblack@google.com
47214184Sgabeblack@google.com        if (in_msg.Type == TriggerType:L2_to_L1) {
47314184Sgabeblack@google.com          if (in_msg.Dest == CacheId:L1I) {
47414184Sgabeblack@google.com            trigger(Event:L2_to_L1I, in_msg.addr, cache_entry, tbe);
47514184Sgabeblack@google.com          } else if (in_msg.Dest == CacheId:L1D0) {
47614184Sgabeblack@google.com            trigger(Event:L2_to_L1D0, in_msg.addr, cache_entry, tbe);
47714184Sgabeblack@google.com          } else if (in_msg.Dest == CacheId:L1D1) {
47814184Sgabeblack@google.com            trigger(Event:L2_to_L1D1, in_msg.addr, cache_entry, tbe);
47914184Sgabeblack@google.com          } else {
48014184Sgabeblack@google.com            error("unexpected trigger dest");
48114184Sgabeblack@google.com          }
48214184Sgabeblack@google.com        }
48314184Sgabeblack@google.com      }
48414184Sgabeblack@google.com    }
48514184Sgabeblack@google.com  }
48614184Sgabeblack@google.com
48714184Sgabeblack@google.com
48814184Sgabeblack@google.com  in_port(probeNetwork_in, NBProbeRequestMsg, probeToCore) {
48914184Sgabeblack@google.com    if (probeNetwork_in.isReady(clockEdge())) {
49014184Sgabeblack@google.com      peek(probeNetwork_in, NBProbeRequestMsg, block_on="addr") {
49114184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
49214184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
49314184Sgabeblack@google.com
49414184Sgabeblack@google.com        if (in_msg.Type == ProbeRequestType:PrbInv) {
49514184Sgabeblack@google.com          if (in_msg.DemandRequest) {
49614184Sgabeblack@google.com            trigger(Event:PrbInvDataDemand, in_msg.addr, cache_entry, tbe);
49714184Sgabeblack@google.com          } else if (in_msg.ReturnData) {
49814184Sgabeblack@google.com            trigger(Event:PrbInvData, in_msg.addr, cache_entry, tbe);
49914184Sgabeblack@google.com          } else {
50014184Sgabeblack@google.com            trigger(Event:PrbInv, in_msg.addr, cache_entry, tbe);
50114184Sgabeblack@google.com          }
50214184Sgabeblack@google.com        } else if (in_msg.Type == ProbeRequestType:PrbDowngrade) {
50314184Sgabeblack@google.com          if (in_msg.DemandRequest) {
50414184Sgabeblack@google.com               trigger(Event:PrbShrDataDemand, in_msg.addr, cache_entry, tbe);
50514184Sgabeblack@google.com          } else {
50614184Sgabeblack@google.com               assert(in_msg.ReturnData);
50714184Sgabeblack@google.com               trigger(Event:PrbShrData, in_msg.addr, cache_entry, tbe);
50814184Sgabeblack@google.com          }
50914184Sgabeblack@google.com        } else if (in_msg.Type == ProbeRequestType:PrbRepl) {
51014184Sgabeblack@google.com          trigger(Event:ForceRepl, in_msg.addr, cache_entry, tbe);
51114184Sgabeblack@google.com        } else if (in_msg.Type == ProbeRequestType:PrbRegDowngrade) {
51214184Sgabeblack@google.com          trigger(Event:ForceDowngrade, in_msg.addr, cache_entry, tbe);
51314184Sgabeblack@google.com        } else {
51414184Sgabeblack@google.com          error("Unknown probe request");
51514184Sgabeblack@google.com        }
51614184Sgabeblack@google.com      }
51714184Sgabeblack@google.com    }
51814184Sgabeblack@google.com  }
51914184Sgabeblack@google.com
52014184Sgabeblack@google.com
52114184Sgabeblack@google.com  // ResponseNetwork
52214184Sgabeblack@google.com  in_port(responseToCore_in, ResponseMsg, responseToCore) {
52314184Sgabeblack@google.com    if (responseToCore_in.isReady(clockEdge())) {
52414184Sgabeblack@google.com      peek(responseToCore_in, ResponseMsg, block_on="addr") {
52514184Sgabeblack@google.com
52614184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.addr);
52714184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.addr);
52814184Sgabeblack@google.com
52914184Sgabeblack@google.com        if (in_msg.Type == CoherenceResponseType:NBSysResp) {
53014184Sgabeblack@google.com          if (in_msg.State == CoherenceState:Modified) {
53114184Sgabeblack@google.com              trigger(Event:NB_AckM, in_msg.addr, cache_entry, tbe);
53214184Sgabeblack@google.com          } else if (in_msg.State == CoherenceState:Shared) {
53314184Sgabeblack@google.com            trigger(Event:NB_AckS, in_msg.addr, cache_entry, tbe);
53414184Sgabeblack@google.com          } else if (in_msg.State == CoherenceState:Exclusive) {
53514184Sgabeblack@google.com            trigger(Event:NB_AckE, in_msg.addr, cache_entry, tbe);
53614184Sgabeblack@google.com          }
53714184Sgabeblack@google.com        } else if (in_msg.Type == CoherenceResponseType:NBSysWBAck) {
53814184Sgabeblack@google.com          trigger(Event:NB_AckWB, in_msg.addr, cache_entry, tbe);
53914184Sgabeblack@google.com        } else {
54014184Sgabeblack@google.com          error("Unexpected Response Message to Core");
54114184Sgabeblack@google.com        }
54214184Sgabeblack@google.com      }
54314184Sgabeblack@google.com    }
54414184Sgabeblack@google.com  }
54514184Sgabeblack@google.com
54614184Sgabeblack@google.com  // Nothing from the Unblock Network
54714184Sgabeblack@google.com
54814184Sgabeblack@google.com  // Mandatory Queue
54914184Sgabeblack@google.com  in_port(mandatoryQueue_in, RubyRequest, mandatoryQueue, desc="...") {
55014184Sgabeblack@google.com    if (mandatoryQueue_in.isReady(clockEdge())) {
55114184Sgabeblack@google.com      peek(mandatoryQueue_in, RubyRequest, block_on="LineAddress") {
55214184Sgabeblack@google.com
55314184Sgabeblack@google.com        Entry cache_entry := getCacheEntry(in_msg.LineAddress);
55414184Sgabeblack@google.com        TBE tbe := TBEs.lookup(in_msg.LineAddress);
55514184Sgabeblack@google.com
55614184Sgabeblack@google.com        if (in_msg.Type == RubyRequestType:IFETCH) {
55714184Sgabeblack@google.com          // FETCH ACCESS
55814184Sgabeblack@google.com
55914184Sgabeblack@google.com          if (L1Icache.isTagPresent(in_msg.LineAddress)) {
56014184Sgabeblack@google.com            if (mod(in_msg.contextId, 2) == 0) {
56114184Sgabeblack@google.com              trigger(Event:Ifetch0_L1hit, in_msg.LineAddress, cache_entry, tbe);
56214184Sgabeblack@google.com            } else {
56314184Sgabeblack@google.com              trigger(Event:Ifetch1_L1hit, in_msg.LineAddress, cache_entry, tbe);
56414184Sgabeblack@google.com            }
56514184Sgabeblack@google.com          } else {
56614184Sgabeblack@google.com            if (presentOrAvail2(in_msg.LineAddress)) {
56714184Sgabeblack@google.com              if (presentOrAvailI(in_msg.LineAddress)) {
56814184Sgabeblack@google.com                if (mod(in_msg.contextId, 2) == 0) {
56914184Sgabeblack@google.com                  trigger(Event:Ifetch0_L1miss, in_msg.LineAddress, cache_entry,
57014184Sgabeblack@google.com                          tbe);
57114184Sgabeblack@google.com                } else {
57214184Sgabeblack@google.com                  trigger(Event:Ifetch1_L1miss, in_msg.LineAddress, cache_entry,
57314184Sgabeblack@google.com                          tbe);
57414184Sgabeblack@google.com                }
57514184Sgabeblack@google.com              } else {
57614184Sgabeblack@google.com                Addr victim := L1Icache.cacheProbe(in_msg.LineAddress);
57714184Sgabeblack@google.com                trigger(Event:L1I_Repl, victim,
57814184Sgabeblack@google.com                        getCacheEntry(victim), TBEs.lookup(victim));
57914184Sgabeblack@google.com              }
58014184Sgabeblack@google.com            } else { // Not present or avail in L2
58114184Sgabeblack@google.com              Addr victim := L2cache.cacheProbe(in_msg.LineAddress);
58214184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L2_Repl(0) is %s\n", in_msg.LineAddress, victim);
58314184Sgabeblack@google.com              trigger(Event:L2_Repl, victim, getCacheEntry(victim),
58414184Sgabeblack@google.com                      TBEs.lookup(victim));
58514184Sgabeblack@google.com            }
58614184Sgabeblack@google.com          }
58714184Sgabeblack@google.com        } else {
58814184Sgabeblack@google.com          // DATA ACCESS
58914184Sgabeblack@google.com          if (mod(in_msg.contextId, 2) == 1) {
59014184Sgabeblack@google.com            if (L1D1cache.isTagPresent(in_msg.LineAddress)) {
59114184Sgabeblack@google.com              if (in_msg.Type == RubyRequestType:LD) {
59214184Sgabeblack@google.com                trigger(Event:C1_Load_L1hit, in_msg.LineAddress, cache_entry,
59314184Sgabeblack@google.com                        tbe);
59414184Sgabeblack@google.com              } else {
59514184Sgabeblack@google.com                // Stores must write through, make sure L2 avail.
59614184Sgabeblack@google.com                if (presentOrAvail2(in_msg.LineAddress)) {
59714184Sgabeblack@google.com                  trigger(Event:C1_Store_L1hit, in_msg.LineAddress, cache_entry,
59814184Sgabeblack@google.com                          tbe);
59914184Sgabeblack@google.com                } else {
60014184Sgabeblack@google.com                  Addr victim := L2cache.cacheProbe(in_msg.LineAddress);
60114184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L2_Repl(1) is %s\n", in_msg.LineAddress, victim);
60214184Sgabeblack@google.com                  trigger(Event:L2_Repl, victim, getCacheEntry(victim),
60314184Sgabeblack@google.com                          TBEs.lookup(victim));
60414184Sgabeblack@google.com                }
60514184Sgabeblack@google.com              }
60614184Sgabeblack@google.com            } else {
60714184Sgabeblack@google.com              if (presentOrAvail2(in_msg.LineAddress)) {
60814184Sgabeblack@google.com                if (presentOrAvailD1(in_msg.LineAddress)) {
60914184Sgabeblack@google.com                  if (in_msg.Type == RubyRequestType:LD) {
61014184Sgabeblack@google.com                    trigger(Event:C1_Load_L1miss, in_msg.LineAddress,
61114184Sgabeblack@google.com                            cache_entry, tbe);
61214184Sgabeblack@google.com                  } else {
61314184Sgabeblack@google.com                    trigger(Event:C1_Store_L1miss, in_msg.LineAddress,
61414184Sgabeblack@google.com                            cache_entry, tbe);
61514184Sgabeblack@google.com                  }
61614184Sgabeblack@google.com                } else {
61714184Sgabeblack@google.com                  Addr victim := L1D1cache.cacheProbe(in_msg.LineAddress);
61814184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L1D1_Repl is %s\n", in_msg.LineAddress, victim);
61914184Sgabeblack@google.com                  trigger(Event:L1D1_Repl, victim,
62014184Sgabeblack@google.com                          getCacheEntry(victim), TBEs.lookup(victim));
62114184Sgabeblack@google.com                }
62214184Sgabeblack@google.com              } else { // not present or avail in L2
62314184Sgabeblack@google.com                Addr victim := L2cache.cacheProbe(in_msg.LineAddress);
62414184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L2_Repl(2) is %s\n", in_msg.LineAddress, victim);
62514184Sgabeblack@google.com                trigger(Event:L2_Repl, victim, getCacheEntry(victim), TBEs.lookup(victim));
62614184Sgabeblack@google.com              }
62714184Sgabeblack@google.com            }
62814184Sgabeblack@google.com          } else {
62914184Sgabeblack@google.com            Entry L1D0cache_entry := getL1CacheEntry(in_msg.LineAddress, 0);
63014184Sgabeblack@google.com            if (is_valid(L1D0cache_entry)) {
63114184Sgabeblack@google.com              if (in_msg.Type == RubyRequestType:LD) {
63214184Sgabeblack@google.com                trigger(Event:C0_Load_L1hit, in_msg.LineAddress, cache_entry,
63314184Sgabeblack@google.com                    tbe);
63414184Sgabeblack@google.com              } else {
63514184Sgabeblack@google.com                if (presentOrAvail2(in_msg.LineAddress)) {
63614184Sgabeblack@google.com                  trigger(Event:C0_Store_L1hit, in_msg.LineAddress, cache_entry,
63714184Sgabeblack@google.com                      tbe);
63814184Sgabeblack@google.com                } else {
63914184Sgabeblack@google.com                  Addr victim := L2cache.cacheProbe(in_msg.LineAddress);
64014184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L2_Repl(3) is %s\n", in_msg.LineAddress, victim);
64114184Sgabeblack@google.com                  trigger(Event:L2_Repl, victim, getCacheEntry(victim),
64214184Sgabeblack@google.com                      TBEs.lookup(victim));
64314184Sgabeblack@google.com                }
64414184Sgabeblack@google.com              }
64514184Sgabeblack@google.com            } else {
64614184Sgabeblack@google.com              if (presentOrAvail2(in_msg.LineAddress)) {
64714184Sgabeblack@google.com                if (presentOrAvailD0(in_msg.LineAddress)) {
64814184Sgabeblack@google.com                  if (in_msg.Type == RubyRequestType:LD) {
64914184Sgabeblack@google.com                    trigger(Event:C0_Load_L1miss, in_msg.LineAddress,
65014184Sgabeblack@google.com                        cache_entry, tbe);
65114184Sgabeblack@google.com                  } else {
65214184Sgabeblack@google.com                    trigger(Event:C0_Store_L1miss, in_msg.LineAddress,
65314184Sgabeblack@google.com                            cache_entry, tbe);
65414184Sgabeblack@google.com                  }
65514184Sgabeblack@google.com                } else {
65614184Sgabeblack@google.com                  Addr victim := L1D0cache.cacheProbe(in_msg.LineAddress);
65714184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L1D0_Repl is %s\n", in_msg.LineAddress, victim);
65814184Sgabeblack@google.com                  trigger(Event:L1D0_Repl, victim, getCacheEntry(victim),
65914184Sgabeblack@google.com                          TBEs.lookup(victim));
66014184Sgabeblack@google.com                }
66114184Sgabeblack@google.com              } else {
66214184Sgabeblack@google.com                Addr victim := L2cache.cacheProbe(in_msg.LineAddress);
66314184Sgabeblack@google.com              DPRINTF(RubySlicc, "Victim for %s L2_Repl(4) is %s\n", in_msg.LineAddress, victim);
66414184Sgabeblack@google.com                trigger(Event:L2_Repl, victim, getCacheEntry(victim),
66514184Sgabeblack@google.com                        TBEs.lookup(victim));
66614184Sgabeblack@google.com              }
66714184Sgabeblack@google.com            }
66814184Sgabeblack@google.com          }
66914184Sgabeblack@google.com        }
67014184Sgabeblack@google.com      }
67114184Sgabeblack@google.com    }
67214184Sgabeblack@google.com  }
67314184Sgabeblack@google.com
67414184Sgabeblack@google.com
67514184Sgabeblack@google.com  // ACTIONS
67614184Sgabeblack@google.com  action(ii_invIcache, "ii", desc="invalidate iCache") {
67714184Sgabeblack@google.com    if (L1Icache.isTagPresent(address)) {
67814184Sgabeblack@google.com      L1Icache.deallocate(address);
67914184Sgabeblack@google.com    }
68014184Sgabeblack@google.com  }
68114184Sgabeblack@google.com
68214184Sgabeblack@google.com  action(i0_invCluster, "i0", desc="invalidate cluster 0") {
68314184Sgabeblack@google.com    if (L1D0cache.isTagPresent(address)) {
68414184Sgabeblack@google.com      L1D0cache.deallocate(address);
68514184Sgabeblack@google.com    }
68614184Sgabeblack@google.com  }
68714184Sgabeblack@google.com
68814184Sgabeblack@google.com  action(i1_invCluster, "i1", desc="invalidate cluster 1") {
68914184Sgabeblack@google.com    if (L1D1cache.isTagPresent(address)) {
69014184Sgabeblack@google.com      L1D1cache.deallocate(address);
69114184Sgabeblack@google.com    }
69214184Sgabeblack@google.com  }
69314184Sgabeblack@google.com
69414184Sgabeblack@google.com  action(ib_invBothClusters, "ib", desc="invalidate both clusters") {
69514184Sgabeblack@google.com    if (L1D0cache.isTagPresent(address)) {
69614184Sgabeblack@google.com      L1D0cache.deallocate(address);
69714184Sgabeblack@google.com    }
69814184Sgabeblack@google.com    if (L1D1cache.isTagPresent(address)) {
69914184Sgabeblack@google.com      L1D1cache.deallocate(address);
70014184Sgabeblack@google.com    }
70114184Sgabeblack@google.com  }
70214184Sgabeblack@google.com
70314184Sgabeblack@google.com  action(i2_invL2, "i2", desc="invalidate L2") {
70414184Sgabeblack@google.com    if(is_valid(cache_entry)) {
70514184Sgabeblack@google.com        L2cache.deallocate(address);
70614184Sgabeblack@google.com    }
70714184Sgabeblack@google.com    unset_cache_entry();
70814184Sgabeblack@google.com  }
70914184Sgabeblack@google.com
71014184Sgabeblack@google.com  action(n_issueRdBlk, "n", desc="Issue RdBlk") {
71114184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
71214184Sgabeblack@google.com      out_msg.addr := address;
71314184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:RdBlk;
71414184Sgabeblack@google.com      out_msg.Requestor := machineID;
71514184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
71614184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
71714184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
71814184Sgabeblack@google.com    }
71914184Sgabeblack@google.com  }
72014184Sgabeblack@google.com
72114184Sgabeblack@google.com  action(nM_issueRdBlkM, "nM", desc="Issue RdBlkM") {
72214184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
72314184Sgabeblack@google.com      out_msg.addr := address;
72414184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:RdBlkM;
72514184Sgabeblack@google.com      out_msg.Requestor := machineID;
72614184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
72714184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
72814184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
72914184Sgabeblack@google.com    }
73014184Sgabeblack@google.com  }
73114184Sgabeblack@google.com
73214184Sgabeblack@google.com  action(nMs_issueRdBlkMSinked, "nMs", desc="Issue RdBlkM with CtoDSinked") {
73314184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
73414184Sgabeblack@google.com      out_msg.addr := address;
73514184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:RdBlkM;
73614184Sgabeblack@google.com      out_msg.Requestor := machineID;
73714184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
73814184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
73914184Sgabeblack@google.com      out_msg.CtoDSinked := true;
74014184Sgabeblack@google.com    }
74114184Sgabeblack@google.com  }
74214184Sgabeblack@google.com
74314184Sgabeblack@google.com  action(nS_issueRdBlkS, "nS", desc="Issue RdBlkS") {
74414184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
74514184Sgabeblack@google.com      out_msg.addr := address;
74614184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:RdBlkS;
74714184Sgabeblack@google.com      out_msg.Requestor := machineID;
74814184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
74914184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
75014184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
75114184Sgabeblack@google.com    }
75214184Sgabeblack@google.com  }
75314184Sgabeblack@google.com
75414184Sgabeblack@google.com  action(nSs_issueRdBlkSSinked, "nSs", desc="Issue RdBlkS with CtoDSinked") {
75514184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
75614184Sgabeblack@google.com      out_msg.addr := address;
75714184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:RdBlkS;
75814184Sgabeblack@google.com      out_msg.Requestor := machineID;
75914184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
76014184Sgabeblack@google.com      out_msg.CtoDSinked := true;
76114184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
76214184Sgabeblack@google.com    }
76314184Sgabeblack@google.com  }
76414184Sgabeblack@google.com
76514184Sgabeblack@google.com  action(vd_victim, "vd", desc="Victimize M/O L2 Data") {
76614184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
76714184Sgabeblack@google.com      out_msg.addr := address;
76814184Sgabeblack@google.com      out_msg.Requestor := machineID;
76914184Sgabeblack@google.com      assert(is_valid(cache_entry));
77014184Sgabeblack@google.com      out_msg.DataBlk := cache_entry.DataBlk;
77114184Sgabeblack@google.com      assert(cache_entry.Dirty);
77214184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
77314184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
77414184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:VicDirty;
77514184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
77614184Sgabeblack@google.com      if (cache_entry.CacheState == State:O) {
77714184Sgabeblack@google.com        out_msg.Shared := true;
77814184Sgabeblack@google.com      } else {
77914184Sgabeblack@google.com        out_msg.Shared := false;
78014184Sgabeblack@google.com      }
78114184Sgabeblack@google.com    }
78214184Sgabeblack@google.com  }
78314184Sgabeblack@google.com
78414184Sgabeblack@google.com  action(vc_victim, "vc", desc="Victimize E/S L2 Data") {
78514184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
78614184Sgabeblack@google.com      out_msg.addr := address;
78714184Sgabeblack@google.com      out_msg.Requestor := machineID;
78814184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
78914184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
79014184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:VicClean;
79114184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
79214184Sgabeblack@google.com      if (cache_entry.CacheState == State:S) {
79314184Sgabeblack@google.com        out_msg.Shared := true;
79414184Sgabeblack@google.com      } else {
79514184Sgabeblack@google.com        out_msg.Shared := false;
79614184Sgabeblack@google.com      }
79714184Sgabeblack@google.com    }
79814184Sgabeblack@google.com  }
79914184Sgabeblack@google.com
80014184Sgabeblack@google.com  // Could send these two directly to dir if we made a new out network on channel 0
80114184Sgabeblack@google.com  action(vdf_victimForce, "vdf", desc="Victimize M/O L2 Data") {
80214184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
80314184Sgabeblack@google.com      out_msg.addr := address;
80414184Sgabeblack@google.com      out_msg.Requestor := machineID;
80514184Sgabeblack@google.com      assert(is_valid(cache_entry));
80614184Sgabeblack@google.com      out_msg.DataBlk := cache_entry.DataBlk;
80714184Sgabeblack@google.com      assert(cache_entry.Dirty);
80814184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
80914184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
81014184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:VicDirty;
81114184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
81214184Sgabeblack@google.com      if (cache_entry.CacheState == State:O) {
81314184Sgabeblack@google.com        out_msg.Shared := true;
81414184Sgabeblack@google.com      } else {
81514184Sgabeblack@google.com        out_msg.Shared := false;
81614184Sgabeblack@google.com      }
81714184Sgabeblack@google.com      out_msg.Private := true;
81814184Sgabeblack@google.com    }
81914184Sgabeblack@google.com  }
82014184Sgabeblack@google.com
82114184Sgabeblack@google.com  action(vcf_victimForce, "vcf", desc="Victimize E/S L2 Data") {
82214184Sgabeblack@google.com    enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
82314184Sgabeblack@google.com      out_msg.addr := address;
82414184Sgabeblack@google.com      out_msg.Requestor := machineID;
82514184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
82614184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Request_Control;
82714184Sgabeblack@google.com      out_msg.Type := CoherenceRequestType:VicClean;
82814184Sgabeblack@google.com      out_msg.InitialRequestTime := curCycle();
82914184Sgabeblack@google.com      if (cache_entry.CacheState == State:S) {
83014184Sgabeblack@google.com        out_msg.Shared := true;
83114184Sgabeblack@google.com      } else {
83214184Sgabeblack@google.com        out_msg.Shared := false;
83314184Sgabeblack@google.com      }
83414184Sgabeblack@google.com      out_msg.Private := true;
83514184Sgabeblack@google.com    }
83614184Sgabeblack@google.com  }
83714184Sgabeblack@google.com
83814184Sgabeblack@google.com  action(a0_allocateL1D, "a0", desc="Allocate L1D0 Block") {
83914184Sgabeblack@google.com    if (L1D0cache.isTagPresent(address) == false) {
84014184Sgabeblack@google.com      L1D0cache.allocateVoid(address, new Entry);
84114184Sgabeblack@google.com    }
84214184Sgabeblack@google.com  }
84314184Sgabeblack@google.com
84414184Sgabeblack@google.com  action(a1_allocateL1D, "a1", desc="Allocate L1D1 Block") {
84514184Sgabeblack@google.com    if (L1D1cache.isTagPresent(address) == false) {
84614184Sgabeblack@google.com      L1D1cache.allocateVoid(address, new Entry);
84714184Sgabeblack@google.com    }
84814184Sgabeblack@google.com  }
84914184Sgabeblack@google.com
85014184Sgabeblack@google.com  action(ai_allocateL1I, "ai", desc="Allocate L1I Block") {
85114184Sgabeblack@google.com    if (L1Icache.isTagPresent(address) == false) {
85214184Sgabeblack@google.com      L1Icache.allocateVoid(address, new Entry);
85314184Sgabeblack@google.com    }
85414184Sgabeblack@google.com  }
85514184Sgabeblack@google.com
85614184Sgabeblack@google.com  action(a2_allocateL2, "a2", desc="Allocate L2 Block") {
85714184Sgabeblack@google.com    if (is_invalid(cache_entry)) {
85814184Sgabeblack@google.com      set_cache_entry(L2cache.allocate(address, new Entry));
85914184Sgabeblack@google.com    }
86014184Sgabeblack@google.com  }
86114184Sgabeblack@google.com
86214184Sgabeblack@google.com  action(t_allocateTBE, "t", desc="allocate TBE Entry") {
86314184Sgabeblack@google.com    check_allocate(TBEs);
86414184Sgabeblack@google.com    assert(is_valid(cache_entry));
86514184Sgabeblack@google.com    TBEs.allocate(address);
86614184Sgabeblack@google.com    set_tbe(TBEs.lookup(address));
86714184Sgabeblack@google.com    tbe.DataBlk := cache_entry.DataBlk;  // Data only used for WBs
86814184Sgabeblack@google.com    tbe.Dirty := cache_entry.Dirty;
86914184Sgabeblack@google.com    tbe.Shared := false;
87014184Sgabeblack@google.com  }
87114184Sgabeblack@google.com
87214184Sgabeblack@google.com  action(d_deallocateTBE, "d", desc="Deallocate TBE") {
87314184Sgabeblack@google.com    TBEs.deallocate(address);
87414184Sgabeblack@google.com    unset_tbe();
87514184Sgabeblack@google.com  }
87614184Sgabeblack@google.com
87714184Sgabeblack@google.com  action(p_popMandatoryQueue, "pm", desc="Pop Mandatory Queue") {
87814184Sgabeblack@google.com    mandatoryQueue_in.dequeue(clockEdge());
87914184Sgabeblack@google.com  }
88014184Sgabeblack@google.com
88114184Sgabeblack@google.com  action(pr_popResponseQueue, "pr", desc="Pop Response Queue") {
88214184Sgabeblack@google.com    responseToCore_in.dequeue(clockEdge());
88314184Sgabeblack@google.com  }
88414184Sgabeblack@google.com
88514184Sgabeblack@google.com  action(pt_popTriggerQueue, "pt", desc="Pop Trigger Queue") {
88614184Sgabeblack@google.com    triggerQueue_in.dequeue(clockEdge());
88714184Sgabeblack@google.com  }
88814184Sgabeblack@google.com
88914184Sgabeblack@google.com  action(pp_popProbeQueue, "pp", desc="pop probe queue") {
89014184Sgabeblack@google.com    probeNetwork_in.dequeue(clockEdge());
89114184Sgabeblack@google.com  }
89214184Sgabeblack@google.com
89314184Sgabeblack@google.com  action(il0_loadDone, "il0", desc="Cluster 0 i load done") {
89414184Sgabeblack@google.com    Entry entry := getICacheEntry(address);
89514184Sgabeblack@google.com    Entry l2entry := getCacheEntry(address); // Used for functional accesses
89614184Sgabeblack@google.com    assert(is_valid(entry));
89714184Sgabeblack@google.com    // L2 supplies data (functional accesses only look in L2, ok because L1
89814184Sgabeblack@google.com    //                   writes through to L2)
89914184Sgabeblack@google.com    sequencer.readCallback(address,
90014184Sgabeblack@google.com                           l2entry.DataBlk,
90114184Sgabeblack@google.com                           true,
90214184Sgabeblack@google.com                           testAndClearLocalHit(entry));
90314184Sgabeblack@google.com  }
90414184Sgabeblack@google.com
90514184Sgabeblack@google.com  action(il1_loadDone, "il1", desc="Cluster 1 i load done") {
90614184Sgabeblack@google.com    Entry entry := getICacheEntry(address);
90714184Sgabeblack@google.com    Entry l2entry := getCacheEntry(address); // Used for functional accesses
90814184Sgabeblack@google.com    assert(is_valid(entry));
90914184Sgabeblack@google.com    // L2 supplies data (functional accesses only look in L2, ok because L1
91014184Sgabeblack@google.com    //                   writes through to L2)
91114184Sgabeblack@google.com    sequencer1.readCallback(address,
91214184Sgabeblack@google.com                            l2entry.DataBlk,
91314184Sgabeblack@google.com                            true,
91414184Sgabeblack@google.com                            testAndClearLocalHit(entry));
91514184Sgabeblack@google.com  }
91614184Sgabeblack@google.com
91714184Sgabeblack@google.com  action(l0_loadDone, "l0", desc="Cluster 0 load done") {
91814184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 0);
91914184Sgabeblack@google.com    Entry l2entry := getCacheEntry(address); // Used for functional accesses
92014184Sgabeblack@google.com    assert(is_valid(entry));
92114184Sgabeblack@google.com    // L2 supplies data (functional accesses only look in L2, ok because L1
92214184Sgabeblack@google.com    //                   writes through to L2)
92314184Sgabeblack@google.com    sequencer.readCallback(address,
92414184Sgabeblack@google.com                           l2entry.DataBlk,
92514184Sgabeblack@google.com                           true,
92614184Sgabeblack@google.com                           testAndClearLocalHit(entry));
92714184Sgabeblack@google.com  }
92814184Sgabeblack@google.com
92914184Sgabeblack@google.com  action(l1_loadDone, "l1", desc="Cluster 1 load done") {
93014184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 1);
93114184Sgabeblack@google.com    Entry l2entry := getCacheEntry(address); // Used for functional accesses
93214184Sgabeblack@google.com    assert(is_valid(entry));
93314184Sgabeblack@google.com    // L2 supplies data (functional accesses only look in L2, ok because L1
93414184Sgabeblack@google.com    //                   writes through to L2)
93514184Sgabeblack@google.com    sequencer1.readCallback(address,
93614184Sgabeblack@google.com                            l2entry.DataBlk,
93714184Sgabeblack@google.com                            true,
93814184Sgabeblack@google.com                            testAndClearLocalHit(entry));
93914184Sgabeblack@google.com  }
94014184Sgabeblack@google.com
94114184Sgabeblack@google.com  action(xl0_loadDone, "xl0", desc="Cluster 0 load done") {
94214184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
94314184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
94414184Sgabeblack@google.com              (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
94514184Sgabeblack@google.com      Entry l2entry := getCacheEntry(address); // Used for functional accesses
94614184Sgabeblack@google.com      DPRINTF(ProtocolTrace, "CP Load Done 0 -- address %s, data: %s\n",
94714184Sgabeblack@google.com              address, l2entry.DataBlk);
94814184Sgabeblack@google.com      // L2 supplies data (functional accesses only look in L2, ok because L1
94914184Sgabeblack@google.com      //                   writes through to L2)
95014184Sgabeblack@google.com      assert(is_valid(l2entry));
95114184Sgabeblack@google.com      sequencer.readCallback(address,
95214184Sgabeblack@google.com                             l2entry.DataBlk,
95314184Sgabeblack@google.com                             false,
95414184Sgabeblack@google.com                             machineIDToMachineType(in_msg.Sender),
95514184Sgabeblack@google.com                             in_msg.InitialRequestTime,
95614184Sgabeblack@google.com                             in_msg.ForwardRequestTime,
95714184Sgabeblack@google.com                             in_msg.ProbeRequestStartTime);
95814184Sgabeblack@google.com    }
95914184Sgabeblack@google.com  }
96014184Sgabeblack@google.com
96114184Sgabeblack@google.com  action(xl1_loadDone, "xl1", desc="Cluster 1 load done") {
96214184Sgabeblack@google.com   peek(responseToCore_in, ResponseMsg) {
96314184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
96414184Sgabeblack@google.com              (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
96514184Sgabeblack@google.com      Entry l2entry := getCacheEntry(address); // Used for functional accesses
96614184Sgabeblack@google.com      // L2 supplies data (functional accesses only look in L2, ok because L1
96714184Sgabeblack@google.com      //                   writes through to L2)
96814184Sgabeblack@google.com      assert(is_valid(l2entry));
96914184Sgabeblack@google.com      sequencer1.readCallback(address,
97014184Sgabeblack@google.com                              l2entry.DataBlk,
97114184Sgabeblack@google.com                              false,
97214184Sgabeblack@google.com                              machineIDToMachineType(in_msg.Sender),
97314184Sgabeblack@google.com                              in_msg.InitialRequestTime,
97414184Sgabeblack@google.com                              in_msg.ForwardRequestTime,
97514184Sgabeblack@google.com                              in_msg.ProbeRequestStartTime);
97614184Sgabeblack@google.com   }
97714184Sgabeblack@google.com  }
97814184Sgabeblack@google.com
97914184Sgabeblack@google.com  action(xi0_loadDone, "xi0", desc="Cluster 0 i-load done") {
98014184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
98114184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
98214184Sgabeblack@google.com              (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
98314184Sgabeblack@google.com      Entry l2entry := getCacheEntry(address); // Used for functional accesses
98414184Sgabeblack@google.com      // L2 supplies data (functional accesses only look in L2, ok because L1
98514184Sgabeblack@google.com      //                   writes through to L2)
98614184Sgabeblack@google.com      assert(is_valid(l2entry));
98714184Sgabeblack@google.com      sequencer.readCallback(address,
98814184Sgabeblack@google.com                             l2entry.DataBlk,
98914184Sgabeblack@google.com                             false,
99014184Sgabeblack@google.com                             machineIDToMachineType(in_msg.Sender),
99114184Sgabeblack@google.com                             in_msg.InitialRequestTime,
99214184Sgabeblack@google.com                             in_msg.ForwardRequestTime,
99314184Sgabeblack@google.com                             in_msg.ProbeRequestStartTime);
99414184Sgabeblack@google.com    }
99514184Sgabeblack@google.com  }
99614184Sgabeblack@google.com
99714184Sgabeblack@google.com  action(xi1_loadDone, "xi1", desc="Cluster 1 i-load done") {
99814184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
99914184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
100014184Sgabeblack@google.com              (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
100114184Sgabeblack@google.com      Entry l2entry := getCacheEntry(address); // Used for functional accesses
100214184Sgabeblack@google.com      // L2 supplies data (functional accesses only look in L2, ok because L1
100314184Sgabeblack@google.com      //                   writes through to L2)
100414184Sgabeblack@google.com      assert(is_valid(l2entry));
100514184Sgabeblack@google.com      sequencer1.readCallback(address,
100614184Sgabeblack@google.com                              l2entry.DataBlk,
100714184Sgabeblack@google.com                              false,
100814184Sgabeblack@google.com                              machineIDToMachineType(in_msg.Sender),
100914184Sgabeblack@google.com                              in_msg.InitialRequestTime,
101014184Sgabeblack@google.com                              in_msg.ForwardRequestTime,
101114184Sgabeblack@google.com                              in_msg.ProbeRequestStartTime);
101214184Sgabeblack@google.com    }
101314184Sgabeblack@google.com  }
101414184Sgabeblack@google.com
101514184Sgabeblack@google.com  action(s0_storeDone, "s0", desc="Cluster 0 store done") {
101614184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 0);
101714184Sgabeblack@google.com    assert(is_valid(entry));
101814184Sgabeblack@google.com    assert(is_valid(cache_entry));
101914184Sgabeblack@google.com    sequencer.writeCallback(address,
102014184Sgabeblack@google.com                            cache_entry.DataBlk,
102114184Sgabeblack@google.com                            true,
102214184Sgabeblack@google.com                            testAndClearLocalHit(entry));
102314184Sgabeblack@google.com    cache_entry.Dirty := true;
102414184Sgabeblack@google.com    entry.DataBlk := cache_entry.DataBlk;
102514184Sgabeblack@google.com    entry.Dirty := true;
102614184Sgabeblack@google.com    DPRINTF(RubySlicc, "%s\n", cache_entry.DataBlk);
102714184Sgabeblack@google.com  }
102814184Sgabeblack@google.com
102914184Sgabeblack@google.com  action(s1_storeDone, "s1", desc="Cluster 1 store done") {
103014184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 1);
103114184Sgabeblack@google.com    assert(is_valid(entry));
103214184Sgabeblack@google.com    assert(is_valid(cache_entry));
103314184Sgabeblack@google.com    sequencer1.writeCallback(address,
103414184Sgabeblack@google.com                             cache_entry.DataBlk,
103514184Sgabeblack@google.com                             true,
103614184Sgabeblack@google.com                             testAndClearLocalHit(entry));
103714184Sgabeblack@google.com    cache_entry.Dirty := true;
103814184Sgabeblack@google.com    entry.Dirty := true;
103914184Sgabeblack@google.com    entry.DataBlk := cache_entry.DataBlk;
104014184Sgabeblack@google.com    DPRINTF(RubySlicc, "%s\n", cache_entry.DataBlk);
104114184Sgabeblack@google.com  }
104214184Sgabeblack@google.com
104314184Sgabeblack@google.com  action(xs0_storeDone, "xs0", desc="Cluster 0 store done") {
104414184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
104514184Sgabeblack@google.com      Entry entry := getL1CacheEntry(address, 0);
104614184Sgabeblack@google.com      assert(is_valid(entry));
104714184Sgabeblack@google.com      assert(is_valid(cache_entry));
104814184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
104914184Sgabeblack@google.com             (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
105014184Sgabeblack@google.com      sequencer.writeCallback(address,
105114184Sgabeblack@google.com                              cache_entry.DataBlk,
105214184Sgabeblack@google.com                              false,
105314184Sgabeblack@google.com                              machineIDToMachineType(in_msg.Sender),
105414184Sgabeblack@google.com                              in_msg.InitialRequestTime,
105514184Sgabeblack@google.com                              in_msg.ForwardRequestTime,
105614184Sgabeblack@google.com                              in_msg.ProbeRequestStartTime);
105714184Sgabeblack@google.com      cache_entry.Dirty := true;
105814184Sgabeblack@google.com      entry.Dirty := true;
105914184Sgabeblack@google.com      entry.DataBlk := cache_entry.DataBlk;
106014184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", cache_entry.DataBlk);
106114184Sgabeblack@google.com    }
106214184Sgabeblack@google.com  }
106314184Sgabeblack@google.com
106414184Sgabeblack@google.com  action(xs1_storeDone, "xs1", desc="Cluster 1 store done") {
106514184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
106614184Sgabeblack@google.com      Entry entry := getL1CacheEntry(address, 1);
106714184Sgabeblack@google.com      assert(is_valid(entry));
106814184Sgabeblack@google.com      assert(is_valid(cache_entry));
106914184Sgabeblack@google.com      assert((machineIDToMachineType(in_msg.Sender) == MachineType:Directory) ||
107014184Sgabeblack@google.com             (machineIDToMachineType(in_msg.Sender) == MachineType:L3Cache));
107114184Sgabeblack@google.com      sequencer1.writeCallback(address,
107214184Sgabeblack@google.com                               cache_entry.DataBlk,
107314184Sgabeblack@google.com                               false,
107414184Sgabeblack@google.com                               machineIDToMachineType(in_msg.Sender),
107514184Sgabeblack@google.com                               in_msg.InitialRequestTime,
107614184Sgabeblack@google.com                               in_msg.ForwardRequestTime,
107714184Sgabeblack@google.com                               in_msg.ProbeRequestStartTime);
107814184Sgabeblack@google.com      cache_entry.Dirty := true;
107914184Sgabeblack@google.com      entry.Dirty := true;
108014184Sgabeblack@google.com      entry.DataBlk := cache_entry.DataBlk;
108114184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", cache_entry.DataBlk);
108214184Sgabeblack@google.com    }
108314184Sgabeblack@google.com  }
108414184Sgabeblack@google.com
108514184Sgabeblack@google.com  action(forward_eviction_to_cpu0, "fec0", desc="sends eviction information to processor0") {
108614184Sgabeblack@google.com    if (send_evictions) {
108714184Sgabeblack@google.com      DPRINTF(RubySlicc, "Sending invalidation for %s to the CPU\n", address);
108814184Sgabeblack@google.com      sequencer.evictionCallback(address);
108914184Sgabeblack@google.com    }
109014184Sgabeblack@google.com  }
109114184Sgabeblack@google.com
109214184Sgabeblack@google.com  action(forward_eviction_to_cpu1, "fec1", desc="sends eviction information to processor1") {
109314184Sgabeblack@google.com    if (send_evictions) {
109414184Sgabeblack@google.com      DPRINTF(RubySlicc, "Sending invalidation for %s to the CPU\n", address);
109514184Sgabeblack@google.com      sequencer1.evictionCallback(address);
109614184Sgabeblack@google.com    }
109714184Sgabeblack@google.com  }
109814184Sgabeblack@google.com
109914184Sgabeblack@google.com  action(ci_copyL2ToL1, "ci", desc="copy L2 data to L1") {
110014184Sgabeblack@google.com    Entry entry := getICacheEntry(address);
110114184Sgabeblack@google.com    assert(is_valid(entry));
110214184Sgabeblack@google.com    assert(is_valid(cache_entry));
110314184Sgabeblack@google.com    entry.Dirty := cache_entry.Dirty;
110414184Sgabeblack@google.com    entry.DataBlk := cache_entry.DataBlk;
110514184Sgabeblack@google.com    entry.FromL2 := true;
110614184Sgabeblack@google.com  }
110714184Sgabeblack@google.com
110814184Sgabeblack@google.com  action(c0_copyL2ToL1, "c0", desc="copy L2 data to L1") {
110914184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 0);
111014184Sgabeblack@google.com    assert(is_valid(entry));
111114184Sgabeblack@google.com    assert(is_valid(cache_entry));
111214184Sgabeblack@google.com    entry.Dirty := cache_entry.Dirty;
111314184Sgabeblack@google.com    entry.DataBlk := cache_entry.DataBlk;
111414184Sgabeblack@google.com    entry.FromL2 := true;
111514184Sgabeblack@google.com  }
111614184Sgabeblack@google.com
111714184Sgabeblack@google.com  action(ss_sendStaleNotification, "ss", desc="stale data; nothing to writeback") {
111814184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
111914184Sgabeblack@google.com      enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
112014184Sgabeblack@google.com        out_msg.addr := address;
112114184Sgabeblack@google.com        out_msg.Type := CoherenceResponseType:StaleNotif;
112214184Sgabeblack@google.com        out_msg.Sender := machineID;
112314184Sgabeblack@google.com        out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
112414184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Response_Control;
112514184Sgabeblack@google.com        DPRINTF(RubySlicc, "%s\n", out_msg);
112614184Sgabeblack@google.com      }
112714184Sgabeblack@google.com    }
112814184Sgabeblack@google.com  }
112914184Sgabeblack@google.com
113014184Sgabeblack@google.com  action(c1_copyL2ToL1, "c1", desc="copy L2 data to L1") {
113114184Sgabeblack@google.com    Entry entry := getL1CacheEntry(address, 1);
113214184Sgabeblack@google.com    assert(is_valid(entry));
113314184Sgabeblack@google.com    assert(is_valid(cache_entry));
113414184Sgabeblack@google.com    entry.Dirty := cache_entry.Dirty;
113514184Sgabeblack@google.com    entry.DataBlk := cache_entry.DataBlk;
113614184Sgabeblack@google.com    entry.FromL2 := true;
113714184Sgabeblack@google.com  }
113814184Sgabeblack@google.com
113914184Sgabeblack@google.com  action(fi_L2ToL1, "fi", desc="L2 to L1 inst fill") {
114014184Sgabeblack@google.com    enqueue(triggerQueue_out, TriggerMsg, l2_hit_latency) {
114114184Sgabeblack@google.com      out_msg.addr := address;
114214184Sgabeblack@google.com      out_msg.Type := TriggerType:L2_to_L1;
114314184Sgabeblack@google.com      out_msg.Dest := CacheId:L1I;
114414184Sgabeblack@google.com    }
114514184Sgabeblack@google.com  }
114614184Sgabeblack@google.com
114714184Sgabeblack@google.com  action(f0_L2ToL1, "f0", desc="L2 to L1 data fill") {
114814184Sgabeblack@google.com    enqueue(triggerQueue_out, TriggerMsg, l2_hit_latency) {
114914184Sgabeblack@google.com      out_msg.addr := address;
115014184Sgabeblack@google.com      out_msg.Type := TriggerType:L2_to_L1;
115114184Sgabeblack@google.com      out_msg.Dest := CacheId:L1D0;
115214184Sgabeblack@google.com    }
115314184Sgabeblack@google.com  }
115414184Sgabeblack@google.com
115514184Sgabeblack@google.com  action(f1_L2ToL1, "f1", desc="L2 to L1 data fill") {
115614184Sgabeblack@google.com    enqueue(triggerQueue_out, TriggerMsg, l2_hit_latency) {
115714184Sgabeblack@google.com      out_msg.addr := address;
115814184Sgabeblack@google.com      out_msg.Type := TriggerType:L2_to_L1;
115914184Sgabeblack@google.com      out_msg.Dest := CacheId:L1D1;
116014184Sgabeblack@google.com    }
116114184Sgabeblack@google.com  }
116214184Sgabeblack@google.com
116314184Sgabeblack@google.com  action(wi_writeIcache, "wi", desc="write data to icache (and l2)") {
116414184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
116514184Sgabeblack@google.com      Entry entry := getICacheEntry(address);
116614184Sgabeblack@google.com      assert(is_valid(entry));
116714184Sgabeblack@google.com      assert(is_valid(cache_entry));
116814184Sgabeblack@google.com      entry.DataBlk := in_msg.DataBlk;
116914184Sgabeblack@google.com      entry.Dirty := in_msg.Dirty;
117014184Sgabeblack@google.com      cache_entry.DataBlk := in_msg.DataBlk;
117114184Sgabeblack@google.com      cache_entry.Dirty := in_msg.Dirty;
117214184Sgabeblack@google.com    }
117314184Sgabeblack@google.com  }
117414184Sgabeblack@google.com
117514184Sgabeblack@google.com  action(w0_writeDcache, "w0", desc="write data to dcache 0 (and l2)") {
117614184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
117714184Sgabeblack@google.com      Entry entry := getL1CacheEntry(address, 0);
117814184Sgabeblack@google.com      assert(is_valid(entry));
117914184Sgabeblack@google.com      assert(is_valid(cache_entry));
118014184Sgabeblack@google.com      entry.DataBlk := in_msg.DataBlk;
118114184Sgabeblack@google.com      entry.Dirty := in_msg.Dirty;
118214184Sgabeblack@google.com      cache_entry.DataBlk := in_msg.DataBlk;
118314184Sgabeblack@google.com      cache_entry.Dirty := in_msg.Dirty;
118414184Sgabeblack@google.com    }
118514184Sgabeblack@google.com  }
118614184Sgabeblack@google.com
118714184Sgabeblack@google.com  action(w1_writeDcache, "w1", desc="write data to dcache 1 (and l2)") {
118814184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
118914184Sgabeblack@google.com      Entry entry := getL1CacheEntry(address, 1);
119014184Sgabeblack@google.com      assert(is_valid(entry));
119114184Sgabeblack@google.com      assert(is_valid(cache_entry));
119214184Sgabeblack@google.com      entry.DataBlk := in_msg.DataBlk;
119314184Sgabeblack@google.com      entry.Dirty := in_msg.Dirty;
119414184Sgabeblack@google.com      cache_entry.DataBlk := in_msg.DataBlk;
119514184Sgabeblack@google.com      cache_entry.Dirty := in_msg.Dirty;
119614184Sgabeblack@google.com    }
119714184Sgabeblack@google.com  }
119814184Sgabeblack@google.com
119914184Sgabeblack@google.com  action(wb_data, "wb", desc="write back data") {
120014184Sgabeblack@google.com    peek(responseToCore_in, ResponseMsg) {
120114184Sgabeblack@google.com      enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
120214184Sgabeblack@google.com        out_msg.addr := address;
120314184Sgabeblack@google.com        out_msg.Type := CoherenceResponseType:CPUData;
120414184Sgabeblack@google.com        out_msg.Sender := machineID;
120514184Sgabeblack@google.com        out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
120614184Sgabeblack@google.com        out_msg.DataBlk := tbe.DataBlk;
120714184Sgabeblack@google.com        out_msg.Dirty := tbe.Dirty;
120814184Sgabeblack@google.com        if (tbe.Shared) {
120914184Sgabeblack@google.com          out_msg.NbReqShared := true;
121014184Sgabeblack@google.com        } else {
121114184Sgabeblack@google.com          out_msg.NbReqShared := false;
121214184Sgabeblack@google.com        }
121314184Sgabeblack@google.com        out_msg.State := CoherenceState:Shared; // faux info
121414184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Writeback_Data;
121514184Sgabeblack@google.com        DPRINTF(RubySlicc, "%s\n", out_msg);
121614184Sgabeblack@google.com      }
121714184Sgabeblack@google.com    }
121814184Sgabeblack@google.com  }
121914184Sgabeblack@google.com
122014184Sgabeblack@google.com  action(pi_sendProbeResponseInv, "pi", desc="send probe ack inv, no data") {
122114184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
122214184Sgabeblack@google.com      out_msg.addr := address;
122314184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
122414184Sgabeblack@google.com      out_msg.Sender := machineID;
122514184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
122614184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
122714184Sgabeblack@google.com      out_msg.Dirty := false;
122814184Sgabeblack@google.com      out_msg.Hit := false;
122914184Sgabeblack@google.com      out_msg.Ntsl := true;
123014184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
123114184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
123214184Sgabeblack@google.com      out_msg.isValid := isValid(address);
123314184Sgabeblack@google.com    }
123414184Sgabeblack@google.com  }
123514184Sgabeblack@google.com
123614184Sgabeblack@google.com  action(pim_sendProbeResponseInvMs, "pim", desc="send probe ack inv, no data") {
123714184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
123814184Sgabeblack@google.com      out_msg.addr := address;
123914184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
124014184Sgabeblack@google.com      out_msg.Sender := machineID;
124114184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
124214184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
124314184Sgabeblack@google.com      out_msg.Dirty := false;
124414184Sgabeblack@google.com      out_msg.Ntsl := true;
124514184Sgabeblack@google.com      out_msg.Hit := false;
124614184Sgabeblack@google.com      APPEND_TRANSITION_COMMENT("Setting Ms");
124714184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
124814184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
124914184Sgabeblack@google.com      out_msg.isValid := isValid(address);
125014184Sgabeblack@google.com    }
125114184Sgabeblack@google.com  }
125214184Sgabeblack@google.com
125314184Sgabeblack@google.com  action(ph_sendProbeResponseHit, "ph", desc="send probe ack PrbShrData, no data") {
125414184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
125514184Sgabeblack@google.com      out_msg.addr := address;
125614184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
125714184Sgabeblack@google.com      out_msg.Sender := machineID;
125814184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
125914184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
126014184Sgabeblack@google.com      assert(addressInCore(address) || is_valid(tbe));
126114184Sgabeblack@google.com      out_msg.Dirty := false;  // only true if sending back data i think
126214184Sgabeblack@google.com      out_msg.Hit := true;
126314184Sgabeblack@google.com      out_msg.Ntsl := false;
126414184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
126514184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
126614184Sgabeblack@google.com      out_msg.isValid := isValid(address);
126714184Sgabeblack@google.com    }
126814184Sgabeblack@google.com  }
126914184Sgabeblack@google.com
127014184Sgabeblack@google.com  action(pb_sendProbeResponseBackprobe, "pb", desc="send probe ack PrbShrData, no data, check for L1 residence") {
127114184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
127214184Sgabeblack@google.com      out_msg.addr := address;
127314184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;  // L3 and CPUs respond in same way to probes
127414184Sgabeblack@google.com      out_msg.Sender := machineID;
127514184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
127614184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
127714184Sgabeblack@google.com      if (addressInCore(address)) {
127814184Sgabeblack@google.com        out_msg.Hit := true;
127914184Sgabeblack@google.com      } else {
128014184Sgabeblack@google.com        out_msg.Hit := false;
128114184Sgabeblack@google.com      }
128214184Sgabeblack@google.com      out_msg.Dirty := false;  // not sending back data, so def. not dirty
128314184Sgabeblack@google.com      out_msg.Ntsl := false;
128414184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
128514184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
128614184Sgabeblack@google.com      out_msg.isValid := isValid(address);
128714184Sgabeblack@google.com    }
128814184Sgabeblack@google.com  }
128914184Sgabeblack@google.com
129014184Sgabeblack@google.com  action(pd_sendProbeResponseData, "pd", desc="send probe ack, with data") {
129114184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
129214184Sgabeblack@google.com      assert(is_valid(cache_entry));
129314184Sgabeblack@google.com      out_msg.addr := address;
129414184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;
129514184Sgabeblack@google.com      out_msg.Sender := machineID;
129614184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
129714184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
129814184Sgabeblack@google.com      out_msg.DataBlk := cache_entry.DataBlk;
129914184Sgabeblack@google.com      assert(cache_entry.Dirty);
130014184Sgabeblack@google.com      out_msg.Dirty := true;
130114184Sgabeblack@google.com      out_msg.Hit := true;
130214184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
130314184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Data;
130414184Sgabeblack@google.com      out_msg.isValid := isValid(address);
130514184Sgabeblack@google.com    }
130614184Sgabeblack@google.com  }
130714184Sgabeblack@google.com
130814184Sgabeblack@google.com  action(pdm_sendProbeResponseDataMs, "pdm", desc="send probe ack, with data") {
130914184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
131014184Sgabeblack@google.com      assert(is_valid(cache_entry));
131114184Sgabeblack@google.com      out_msg.addr := address;
131214184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;
131314184Sgabeblack@google.com      out_msg.Sender := machineID;
131414184Sgabeblack@google.com      // will this always be ok? probably not for multisocket
131514184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
131614184Sgabeblack@google.com      out_msg.DataBlk := cache_entry.DataBlk;
131714184Sgabeblack@google.com      assert(cache_entry.Dirty);
131814184Sgabeblack@google.com      out_msg.Dirty := true;
131914184Sgabeblack@google.com      out_msg.Hit := true;
132014184Sgabeblack@google.com      APPEND_TRANSITION_COMMENT("Setting Ms");
132114184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
132214184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Data;
132314184Sgabeblack@google.com      out_msg.isValid := isValid(address);
132414184Sgabeblack@google.com    }
132514184Sgabeblack@google.com  }
132614184Sgabeblack@google.com
132714184Sgabeblack@google.com  action(pdt_sendProbeResponseDataFromTBE, "pdt", desc="send probe ack with data") {
132814184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
132914184Sgabeblack@google.com      assert(is_valid(tbe));
133014184Sgabeblack@google.com      out_msg.addr := address;
133114184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUPrbResp;
133214184Sgabeblack@google.com      out_msg.Sender := machineID;
133314184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
133414184Sgabeblack@google.com      out_msg.DataBlk := tbe.DataBlk;
133514184Sgabeblack@google.com      assert(tbe.Dirty);
133614184Sgabeblack@google.com      out_msg.Dirty := true;
133714184Sgabeblack@google.com      out_msg.Hit := true;
133814184Sgabeblack@google.com      out_msg.State := CoherenceState:NA;
133914184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Data;
134014184Sgabeblack@google.com      out_msg.isValid := isValid(address);
134114184Sgabeblack@google.com    }
134214184Sgabeblack@google.com  }
134314184Sgabeblack@google.com
134414184Sgabeblack@google.com  action(ra_sendReplAck, "ra", desc="Send ack to r-buf that line is replaced if needed") {
134514184Sgabeblack@google.com    if (is_invalid(tbe) || tbe.AckNeeded) {
134614184Sgabeblack@google.com      enqueue(requestNetwork_out, CPURequestMsg, issue_latency) {
134714184Sgabeblack@google.com        out_msg.addr := address;
134814184Sgabeblack@google.com        out_msg.Type := CoherenceRequestType:InvAck;
134914184Sgabeblack@google.com        out_msg.Requestor := machineID;
135014184Sgabeblack@google.com        out_msg.Destination.add(getPeer(machineID));
135114184Sgabeblack@google.com        out_msg.MessageSize := MessageSizeType:Request_Control;
135214184Sgabeblack@google.com      }
135314184Sgabeblack@google.com      APPEND_TRANSITION_COMMENT(" Sending ack to r-buf ");
135414184Sgabeblack@google.com    } else {
135514184Sgabeblack@google.com      APPEND_TRANSITION_COMMENT(" NOT Sending ack to r-buf ");
135614184Sgabeblack@google.com    }
135714184Sgabeblack@google.com  }
135814184Sgabeblack@google.com
135914184Sgabeblack@google.com  action(m_markAckNeeded, "m", desc="Mark TBE to send ack when deallocated") {
136014184Sgabeblack@google.com    assert(is_valid(tbe));
136114184Sgabeblack@google.com    tbe.AckNeeded := true;
136214184Sgabeblack@google.com  }
136314184Sgabeblack@google.com
136414184Sgabeblack@google.com  action(mc_cancelWB, "mc", desc="send writeback cancel to L3") {
136514184Sgabeblack@google.com    enqueue(responseNetwork_out, ResponseMsg, issue_latency) {
136614184Sgabeblack@google.com      out_msg.addr := address;
136714184Sgabeblack@google.com      out_msg.Type := CoherenceResponseType:CPUCancelWB;
136814184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
136914184Sgabeblack@google.com      out_msg.Sender := machineID;
137014184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Response_Control;
137114184Sgabeblack@google.com    }
137214184Sgabeblack@google.com  }
137314184Sgabeblack@google.com
137414184Sgabeblack@google.com  action(s_setSharedFlip, "s", desc="hit by shared probe, status may be different") {
137514184Sgabeblack@google.com    assert(is_valid(tbe));
137614184Sgabeblack@google.com    tbe.Shared := true;
137714184Sgabeblack@google.com  }
137814184Sgabeblack@google.com
137914184Sgabeblack@google.com  action(uu_sendUnblock, "uu", desc="state changed, unblock") {
138014184Sgabeblack@google.com    enqueue(unblockNetwork_out, UnblockMsg, issue_latency) {
138114184Sgabeblack@google.com      out_msg.addr := address;
138214184Sgabeblack@google.com      out_msg.Destination.add(mapAddressToMachine(address, MachineType:Directory));
138314184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Unblock_Control;
138414184Sgabeblack@google.com      out_msg.wasValid := isValid(address);
138514184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
138614184Sgabeblack@google.com    }
138714184Sgabeblack@google.com  }
138814184Sgabeblack@google.com
138914184Sgabeblack@google.com  action(sdv_sendDoneValid, "sdv", desc="Request finished, send done ack") {
139014184Sgabeblack@google.com    enqueue(unblockNetwork_out, UnblockMsg, 1) {
139114184Sgabeblack@google.com      out_msg.addr := address;
139214184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
139314184Sgabeblack@google.com      out_msg.DoneAck := true;
139414184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Unblock_Control;
139514184Sgabeblack@google.com      if (is_valid(tbe)) {
139614184Sgabeblack@google.com          out_msg.Dirty := tbe.Dirty;
139714184Sgabeblack@google.com      } else if (is_valid(cache_entry)) {
139814184Sgabeblack@google.com          out_msg.Dirty := cache_entry.Dirty;
139914184Sgabeblack@google.com      } else {
140014184Sgabeblack@google.com          out_msg.Dirty := false;
140114184Sgabeblack@google.com      }
140214184Sgabeblack@google.com      out_msg.validToInvalid := false;
140314184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
140414184Sgabeblack@google.com    }
140514184Sgabeblack@google.com  }
140614184Sgabeblack@google.com
140714184Sgabeblack@google.com  action(sdi_sendDoneInvalid, "sdi", desc="Request finished, send done ack") {
140814184Sgabeblack@google.com    enqueue(unblockNetwork_out, UnblockMsg, 1) {
140914184Sgabeblack@google.com      out_msg.addr := address;
141014184Sgabeblack@google.com      out_msg.Destination.add(getPeer(machineID));
141114184Sgabeblack@google.com      out_msg.DoneAck := true;
141214184Sgabeblack@google.com      out_msg.MessageSize := MessageSizeType:Unblock_Control;
141314184Sgabeblack@google.com      if (is_valid(tbe)) {
141414184Sgabeblack@google.com          out_msg.Dirty := tbe.Dirty;
141514184Sgabeblack@google.com      } else if (is_valid(cache_entry)) {
141614184Sgabeblack@google.com          out_msg.Dirty := cache_entry.Dirty;
141714184Sgabeblack@google.com      } else {
141814184Sgabeblack@google.com          out_msg.Dirty := false;
141914184Sgabeblack@google.com      }
142014184Sgabeblack@google.com      out_msg.validToInvalid := true;
142114184Sgabeblack@google.com      DPRINTF(RubySlicc, "%s\n", out_msg);
142214184Sgabeblack@google.com    }
142314184Sgabeblack@google.com  }
142414184Sgabeblack@google.com
142514184Sgabeblack@google.com  action(l10m_profileMiss, "l10m", desc="l10m miss profile") {
142614184Sgabeblack@google.com    ++L1D0cache.demand_misses;
142714184Sgabeblack@google.com  }
142814184Sgabeblack@google.com
142914184Sgabeblack@google.com  action(l11m_profileMiss, "l11m", desc="l11m miss profile") {
143014184Sgabeblack@google.com    ++L1D1cache.demand_misses;
143114184Sgabeblack@google.com  }
143214184Sgabeblack@google.com
143314184Sgabeblack@google.com  action(l1im_profileMiss, "l1lm", desc="l1im miss profile") {
143414184Sgabeblack@google.com    ++L1Icache.demand_misses;
143514184Sgabeblack@google.com  }
143614184Sgabeblack@google.com
143714184Sgabeblack@google.com  action(l2m_profileMiss, "l2m", desc="l2m miss profile") {
143814184Sgabeblack@google.com    ++L2cache.demand_misses;
143914184Sgabeblack@google.com  }
144014184Sgabeblack@google.com
144114184Sgabeblack@google.com  action(yy_recycleProbeQueue, "yy", desc="recycle probe queue") {
144214184Sgabeblack@google.com    probeNetwork_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
144314184Sgabeblack@google.com  }
144414184Sgabeblack@google.com
144514184Sgabeblack@google.com  action(zz_recycleMandatoryQueue, "\z", desc="recycle mandatory queue") {
144614184Sgabeblack@google.com    mandatoryQueue_in.recycle(clockEdge(), cyclesToTicks(recycle_latency));
144714184Sgabeblack@google.com  }
144814184Sgabeblack@google.com  // END ACTIONS
144914184Sgabeblack@google.com
145014184Sgabeblack@google.com  // BEGIN TRANSITIONS
145114184Sgabeblack@google.com
145214184Sgabeblack@google.com  // transitions from base
145314184Sgabeblack@google.com  transition(I, C0_Load_L1miss, I_E0S) {L1D0TagArrayRead, L2TagArrayRead} {
145414184Sgabeblack@google.com    // track misses, if implemented
145514184Sgabeblack@google.com    // since in I state, L2 miss as well
145614184Sgabeblack@google.com    l2m_profileMiss;
145714184Sgabeblack@google.com    l10m_profileMiss;
145814184Sgabeblack@google.com    a0_allocateL1D;
145914184Sgabeblack@google.com    l1im_profileMiss;
146014184Sgabeblack@google.com    a2_allocateL2;
146114184Sgabeblack@google.com    i1_invCluster;
146214184Sgabeblack@google.com    ii_invIcache;
146314184Sgabeblack@google.com    n_issueRdBlk;
146414184Sgabeblack@google.com    p_popMandatoryQueue;
146514184Sgabeblack@google.com  }
146614184Sgabeblack@google.com
146714184Sgabeblack@google.com  transition(I, C1_Load_L1miss, I_E1S) {L1D1TagArrayRead, L2TagArrayRead} {
146814184Sgabeblack@google.com    // track misses, if implemented
146914184Sgabeblack@google.com    // since in I state, L2 miss as well
147014184Sgabeblack@google.com    l2m_profileMiss;
147114184Sgabeblack@google.com    l11m_profileMiss;
147214184Sgabeblack@google.com    a1_allocateL1D;
147314184Sgabeblack@google.com    a2_allocateL2;
147414184Sgabeblack@google.com    i0_invCluster;
147514184Sgabeblack@google.com    ii_invIcache;
147614184Sgabeblack@google.com    n_issueRdBlk;
147714184Sgabeblack@google.com    p_popMandatoryQueue;
147814184Sgabeblack@google.com  }
147914184Sgabeblack@google.com
148014184Sgabeblack@google.com  transition(I, Ifetch0_L1miss, S0) {L1ITagArrayRead, L2TagArrayRead} {
148114184Sgabeblack@google.com    // track misses, if implemented
148214184Sgabeblack@google.com    // L2 miss as well
148314184Sgabeblack@google.com    l10m_profileMiss;
148414184Sgabeblack@google.com    l2m_profileMiss;
148514184Sgabeblack@google.com    l1im_profileMiss;
148614184Sgabeblack@google.com    ai_allocateL1I;
148714184Sgabeblack@google.com    a2_allocateL2;
148814184Sgabeblack@google.com    ib_invBothClusters;
148914184Sgabeblack@google.com    nS_issueRdBlkS;
149014184Sgabeblack@google.com    p_popMandatoryQueue;
149114184Sgabeblack@google.com  }
149214184Sgabeblack@google.com
149314184Sgabeblack@google.com  transition(I, Ifetch1_L1miss, S1) {L1ITagArrayRead, L2TagArrayRead} {
149414184Sgabeblack@google.com     l11m_profileMiss;
149514184Sgabeblack@google.com    // track misses, if implemented
149614184Sgabeblack@google.com    // L2 miss as well
149714184Sgabeblack@google.com    l2m_profileMiss;
149814184Sgabeblack@google.com    l1im_profileMiss;
149914184Sgabeblack@google.com    ai_allocateL1I;
150014184Sgabeblack@google.com    a2_allocateL2;
150114184Sgabeblack@google.com    ib_invBothClusters;
150214184Sgabeblack@google.com    nS_issueRdBlkS;
150314184Sgabeblack@google.com    p_popMandatoryQueue;
150414184Sgabeblack@google.com  }
150514184Sgabeblack@google.com
150614184Sgabeblack@google.com  transition(I, C0_Store_L1miss, I_M0) {L1D0TagArrayRead,L2TagArrayRead} {
150714184Sgabeblack@google.com    l2m_profileMiss;
150814184Sgabeblack@google.com    l10m_profileMiss;
150914184Sgabeblack@google.com    a0_allocateL1D;
151014184Sgabeblack@google.com    a2_allocateL2;
151114184Sgabeblack@google.com    i1_invCluster;
151214184Sgabeblack@google.com    ii_invIcache;
151314184Sgabeblack@google.com    nM_issueRdBlkM;
151414184Sgabeblack@google.com    p_popMandatoryQueue;
151514184Sgabeblack@google.com  }
151614184Sgabeblack@google.com
151714184Sgabeblack@google.com  transition(I, C1_Store_L1miss, I_M1) {L1D0TagArrayRead, L2TagArrayRead} {
151814184Sgabeblack@google.com    l2m_profileMiss;
151914184Sgabeblack@google.com    l11m_profileMiss;
152014184Sgabeblack@google.com    a1_allocateL1D;
152114184Sgabeblack@google.com    a2_allocateL2;
152214184Sgabeblack@google.com    i0_invCluster;
152314184Sgabeblack@google.com    ii_invIcache;
152414184Sgabeblack@google.com    nM_issueRdBlkM;
152514184Sgabeblack@google.com    p_popMandatoryQueue;
152614184Sgabeblack@google.com  }
152714184Sgabeblack@google.com
152814184Sgabeblack@google.com  transition(S, C0_Load_L1miss, S_F0) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
152914184Sgabeblack@google.com    l10m_profileMiss;
153014184Sgabeblack@google.com    a0_allocateL1D;
153114184Sgabeblack@google.com    f0_L2ToL1;
153214184Sgabeblack@google.com    p_popMandatoryQueue;
153314184Sgabeblack@google.com  }
153414184Sgabeblack@google.com
153514184Sgabeblack@google.com  transition(S, C1_Load_L1miss, S_F1) {L1D1TagArrayRead,  L2TagArrayRead, L2DataArrayRead} {
153614184Sgabeblack@google.com    l11m_profileMiss;
153714184Sgabeblack@google.com    a1_allocateL1D;
153814184Sgabeblack@google.com    f1_L2ToL1;
153914184Sgabeblack@google.com    p_popMandatoryQueue;
154014184Sgabeblack@google.com  }
154114184Sgabeblack@google.com
154214184Sgabeblack@google.com  transition(S, Ifetch0_L1miss, Si_F0) {L1ITagArrayRead,L2TagArrayRead, L2DataArrayRead} {
154314184Sgabeblack@google.com    l1im_profileMiss;
154414184Sgabeblack@google.com    ai_allocateL1I;
154514184Sgabeblack@google.com    fi_L2ToL1;
154614184Sgabeblack@google.com    p_popMandatoryQueue;
154714184Sgabeblack@google.com  }
154814184Sgabeblack@google.com
154914184Sgabeblack@google.com  transition(S, Ifetch1_L1miss, Si_F1) {L1ITagArrayRead, L2TagArrayRead, L2DataArrayRead} {
155014184Sgabeblack@google.com    l1im_profileMiss;
155114184Sgabeblack@google.com    ai_allocateL1I;
155214184Sgabeblack@google.com    fi_L2ToL1;
155314184Sgabeblack@google.com    p_popMandatoryQueue;
155414184Sgabeblack@google.com  }
155514184Sgabeblack@google.com
155614184Sgabeblack@google.com  transition({S}, {C0_Store_L1hit, C0_Store_L1miss}, S_M0) {L1D0TagArrayRead, L2TagArrayRead}{
155714184Sgabeblack@google.com    l2m_profileMiss;
155814184Sgabeblack@google.com    l10m_profileMiss;
155914184Sgabeblack@google.com    a0_allocateL1D;
156014184Sgabeblack@google.com    i1_invCluster;
156114184Sgabeblack@google.com    ii_invIcache;
156214184Sgabeblack@google.com    nM_issueRdBlkM;
156314184Sgabeblack@google.com    p_popMandatoryQueue;
156414184Sgabeblack@google.com  }
156514184Sgabeblack@google.com
156614184Sgabeblack@google.com  transition({S}, {C1_Store_L1hit, C1_Store_L1miss}, S_M1) {L1D1TagArrayRead,L2TagArrayRead} {
156714184Sgabeblack@google.com    l2m_profileMiss;
156814184Sgabeblack@google.com    l11m_profileMiss;
156914184Sgabeblack@google.com    a1_allocateL1D;
157014184Sgabeblack@google.com    i0_invCluster;
157114184Sgabeblack@google.com    ii_invIcache;
157214184Sgabeblack@google.com    nM_issueRdBlkM;
157314184Sgabeblack@google.com    p_popMandatoryQueue;
157414184Sgabeblack@google.com  }
157514184Sgabeblack@google.com  transition(Es, C0_Load_L1miss, Es_F0) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {  // can this be folded with S_F?
157614184Sgabeblack@google.com     l10m_profileMiss;
157714184Sgabeblack@google.com    a0_allocateL1D;
157814184Sgabeblack@google.com    f0_L2ToL1;
157914184Sgabeblack@google.com    p_popMandatoryQueue;
158014184Sgabeblack@google.com  }
158114184Sgabeblack@google.com
158214184Sgabeblack@google.com  transition(Es, C1_Load_L1miss, Es_F1) {L1D1TagArrayRead, L2TagArrayRead, L2DataArrayRead} {  // can this be folded with S_F?
158314184Sgabeblack@google.com     l11m_profileMiss;
158414184Sgabeblack@google.com    a1_allocateL1D;
158514184Sgabeblack@google.com    f1_L2ToL1;
158614184Sgabeblack@google.com    p_popMandatoryQueue;
158714184Sgabeblack@google.com  }
158814184Sgabeblack@google.com
158914184Sgabeblack@google.com  transition(Es, Ifetch0_L1miss, S0) {L1ITagArrayRead, L2TagArrayRead} {
159014184Sgabeblack@google.com      l1im_profileMiss;
159114184Sgabeblack@google.com     i2_invL2;
159214184Sgabeblack@google.com    ai_allocateL1I;
159314184Sgabeblack@google.com    a2_allocateL2;
159414184Sgabeblack@google.com    ib_invBothClusters;
159514184Sgabeblack@google.com    nS_issueRdBlkS;
159614184Sgabeblack@google.com    p_popMandatoryQueue;
159714184Sgabeblack@google.com  }
159814184Sgabeblack@google.com
159914184Sgabeblack@google.com  transition(Es, Ifetch1_L1miss, S1) {L1ITagArrayRead, L2TagArrayRead} {
160014184Sgabeblack@google.com     l1im_profileMiss;
160114184Sgabeblack@google.com    i2_invL2;
160214184Sgabeblack@google.com    ai_allocateL1I;
160314184Sgabeblack@google.com    a2_allocateL2;
160414184Sgabeblack@google.com    ib_invBothClusters;
160514184Sgabeblack@google.com    nS_issueRdBlkS;
160614184Sgabeblack@google.com    p_popMandatoryQueue;
160714184Sgabeblack@google.com  }
160814184Sgabeblack@google.com
160914184Sgabeblack@google.com  // THES SHOULD NOT BE INSTANTANEOUS BUT OH WELL FOR NOW
161014184Sgabeblack@google.com  transition(Es, {C0_Store_L1hit, C0_Store_L1miss}, M0) {L1D0TagArrayWrite,L1D0TagArrayRead, L2TagArrayRead, L1D0DataArrayWrite, L2TagArrayWrite, L2DataArrayWrite} {
161114184Sgabeblack@google.com    a0_allocateL1D;
161214184Sgabeblack@google.com    i1_invCluster;
161314184Sgabeblack@google.com    s0_storeDone;   // instantaneous L1/L2 dirty - no writethrough delay
161414184Sgabeblack@google.com    p_popMandatoryQueue;
161514184Sgabeblack@google.com  }
161614184Sgabeblack@google.com
161714184Sgabeblack@google.com  transition(Es, {C1_Store_L1hit, C1_Store_L1miss}, M1) {L1D1TagArrayRead, L1D1TagArrayWrite, L1D1DataArrayWrite, L2TagArrayWrite, L2DataArrayWrite} {
161814184Sgabeblack@google.com    a1_allocateL1D;
161914184Sgabeblack@google.com    i0_invCluster;
162014184Sgabeblack@google.com    s1_storeDone;
162114184Sgabeblack@google.com    p_popMandatoryQueue;
162214184Sgabeblack@google.com  }
162314184Sgabeblack@google.com
162414184Sgabeblack@google.com  transition(E0, C0_Load_L1miss, E0_F) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
162514184Sgabeblack@google.com     l10m_profileMiss;
162614184Sgabeblack@google.com    a0_allocateL1D;
162714184Sgabeblack@google.com    f0_L2ToL1;
162814184Sgabeblack@google.com    p_popMandatoryQueue;
162914184Sgabeblack@google.com  }
163014184Sgabeblack@google.com
163114184Sgabeblack@google.com  transition(E0, C1_Load_L1miss, E0_Es) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
163214184Sgabeblack@google.com     l11m_profileMiss;
163314184Sgabeblack@google.com    a1_allocateL1D;
163414184Sgabeblack@google.com    f1_L2ToL1;
163514184Sgabeblack@google.com    p_popMandatoryQueue;
163614184Sgabeblack@google.com  }
163714184Sgabeblack@google.com
163814184Sgabeblack@google.com  transition(E0, Ifetch0_L1miss, S0) {L2TagArrayRead, L1ITagArrayRead} {
163914184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue RdBlkS
164014184Sgabeblack@google.com    l1im_profileMiss;
164114184Sgabeblack@google.com    i2_invL2;
164214184Sgabeblack@google.com    ai_allocateL1I;
164314184Sgabeblack@google.com    a2_allocateL2;
164414184Sgabeblack@google.com    i0_invCluster;
164514184Sgabeblack@google.com    nS_issueRdBlkS;
164614184Sgabeblack@google.com    p_popMandatoryQueue;
164714184Sgabeblack@google.com  }
164814184Sgabeblack@google.com
164914184Sgabeblack@google.com  transition(E0, Ifetch1_L1miss, S1) {L2TagArrayRead, L1ITagArrayRead } {
165014184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue RdBlkS
165114184Sgabeblack@google.com    l1im_profileMiss;
165214184Sgabeblack@google.com    i2_invL2;
165314184Sgabeblack@google.com    ai_allocateL1I;
165414184Sgabeblack@google.com    a2_allocateL2;
165514184Sgabeblack@google.com    i0_invCluster;
165614184Sgabeblack@google.com    nS_issueRdBlkS;
165714184Sgabeblack@google.com    p_popMandatoryQueue;
165814184Sgabeblack@google.com  }
165914184Sgabeblack@google.com
166014184Sgabeblack@google.com  transition(E0, {C0_Store_L1hit, C0_Store_L1miss}, M0) {L1D0TagArrayRead, L1D0DataArrayWrite, L1D0TagArrayWrite, L2TagArrayRead, L2DataArrayWrite, L2TagArrayWrite} {
166114184Sgabeblack@google.com    a0_allocateL1D;
166214184Sgabeblack@google.com    s0_storeDone;
166314184Sgabeblack@google.com    p_popMandatoryQueue;
166414184Sgabeblack@google.com  }
166514184Sgabeblack@google.com
166614184Sgabeblack@google.com  transition(E0, C1_Store_L1miss, M1) {L1D0TagArrayRead, L1D0TagArrayWrite, L2TagArrayRead, L2TagArrayWrite, L2DataArrayWrite} {
166714184Sgabeblack@google.com    a1_allocateL1D;
166814184Sgabeblack@google.com    l11m_profileMiss;
166914184Sgabeblack@google.com    i0_invCluster;
167014184Sgabeblack@google.com    s1_storeDone;
167114184Sgabeblack@google.com    p_popMandatoryQueue;
167214184Sgabeblack@google.com  }
167314184Sgabeblack@google.com
167414184Sgabeblack@google.com  transition(E1, C1_Load_L1miss, E1_F) {L1D1TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
167514184Sgabeblack@google.com    a1_allocateL1D;
167614184Sgabeblack@google.com    l11m_profileMiss;
167714184Sgabeblack@google.com    f1_L2ToL1;
167814184Sgabeblack@google.com    p_popMandatoryQueue;
167914184Sgabeblack@google.com  }
168014184Sgabeblack@google.com
168114184Sgabeblack@google.com  transition(E1, C0_Load_L1miss, E1_Es) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
168214184Sgabeblack@google.com    a0_allocateL1D;
168314184Sgabeblack@google.com    l10m_profileMiss;
168414184Sgabeblack@google.com    f0_L2ToL1;
168514184Sgabeblack@google.com    p_popMandatoryQueue;
168614184Sgabeblack@google.com  }
168714184Sgabeblack@google.com
168814184Sgabeblack@google.com  transition(E1, Ifetch1_L1miss, S1) {L2TagArrayRead, L1ITagArrayRead} {
168914184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue RdBlkS
169014184Sgabeblack@google.com    l1im_profileMiss;
169114184Sgabeblack@google.com    i2_invL2;
169214184Sgabeblack@google.com    ai_allocateL1I;
169314184Sgabeblack@google.com    a2_allocateL2;
169414184Sgabeblack@google.com    i1_invCluster;
169514184Sgabeblack@google.com    nS_issueRdBlkS;
169614184Sgabeblack@google.com    p_popMandatoryQueue;
169714184Sgabeblack@google.com  }
169814184Sgabeblack@google.com
169914184Sgabeblack@google.com  transition(E1, Ifetch0_L1miss, S0) {L2TagArrayRead,L1ITagArrayRead} {
170014184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue RdBlkS
170114184Sgabeblack@google.com    l1im_profileMiss;
170214184Sgabeblack@google.com    i2_invL2;
170314184Sgabeblack@google.com    ai_allocateL1I;
170414184Sgabeblack@google.com    a2_allocateL2;
170514184Sgabeblack@google.com    i1_invCluster;
170614184Sgabeblack@google.com    nS_issueRdBlkS;
170714184Sgabeblack@google.com    p_popMandatoryQueue;
170814184Sgabeblack@google.com  }
170914184Sgabeblack@google.com
171014184Sgabeblack@google.com  transition(E1, {C1_Store_L1hit, C1_Store_L1miss}, M1) {L1D1TagArrayRead, L1D1TagArrayWrite, L2TagArrayRead, L2DataArrayWrite, L2TagArrayWrite} {
171114184Sgabeblack@google.com    a1_allocateL1D;
171214184Sgabeblack@google.com    s1_storeDone;
171314184Sgabeblack@google.com    p_popMandatoryQueue;
171414184Sgabeblack@google.com  }
171514184Sgabeblack@google.com
171614184Sgabeblack@google.com  transition(E1, C0_Store_L1miss, M0) {L1D0TagArrayRead, L1D0TagArrayWrite, L2TagArrayRead, L2TagArrayWrite, L2DataArrayWrite} {
171714184Sgabeblack@google.com     l10m_profileMiss;
171814184Sgabeblack@google.com    a0_allocateL1D;
171914184Sgabeblack@google.com    i1_invCluster;
172014184Sgabeblack@google.com    s0_storeDone;
172114184Sgabeblack@google.com    p_popMandatoryQueue;
172214184Sgabeblack@google.com  }
172314184Sgabeblack@google.com
172414184Sgabeblack@google.com  transition({O}, {C0_Store_L1hit, C0_Store_L1miss}, O_M0) {L1D0TagArrayRead, L2TagArrayRead} {
172514184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue CtoD
172614184Sgabeblack@google.com     l10m_profileMiss;
172714184Sgabeblack@google.com    a0_allocateL1D;
172814184Sgabeblack@google.com    i1_invCluster;
172914184Sgabeblack@google.com    ii_invIcache;
173014184Sgabeblack@google.com    nM_issueRdBlkM;
173114184Sgabeblack@google.com    p_popMandatoryQueue;
173214184Sgabeblack@google.com  }
173314184Sgabeblack@google.com
173414184Sgabeblack@google.com  transition({O}, {C1_Store_L1hit, C1_Store_L1miss}, O_M1) {L1D1TagArrayRead, L2TagArrayRead} {
173514184Sgabeblack@google.com    l2m_profileMiss; // permissions miss, still issue RdBlkS
173614184Sgabeblack@google.com    l11m_profileMiss;
173714184Sgabeblack@google.com    a1_allocateL1D;
173814184Sgabeblack@google.com    i0_invCluster;
173914184Sgabeblack@google.com    ii_invIcache;
174014184Sgabeblack@google.com    nM_issueRdBlkM;
174114184Sgabeblack@google.com    p_popMandatoryQueue;
174214184Sgabeblack@google.com  }
174314184Sgabeblack@google.com
174414184Sgabeblack@google.com  transition(O, C0_Load_L1miss, O_F0) {L2TagArrayRead, L2DataArrayRead, L1D0TagArrayRead} {
174514184Sgabeblack@google.com    l10m_profileMiss;
174614184Sgabeblack@google.com    a0_allocateL1D;
174714184Sgabeblack@google.com    f0_L2ToL1;
174814184Sgabeblack@google.com    p_popMandatoryQueue;
174914184Sgabeblack@google.com  }
175014184Sgabeblack@google.com
175114184Sgabeblack@google.com  transition(O, C1_Load_L1miss, O_F1) {L2TagArrayRead, L2DataArrayRead, L1D1TagArrayRead} {
175214184Sgabeblack@google.com    l11m_profileMiss;
175314184Sgabeblack@google.com    a1_allocateL1D;
175414184Sgabeblack@google.com    f1_L2ToL1;
175514184Sgabeblack@google.com    p_popMandatoryQueue;
175614184Sgabeblack@google.com  }
175714184Sgabeblack@google.com
175814184Sgabeblack@google.com  transition(Ms, C0_Load_L1miss, Ms_F0) {L2TagArrayRead, L2DataArrayRead, L1D0TagArrayRead} {
175914184Sgabeblack@google.com    l10m_profileMiss;
176014184Sgabeblack@google.com    a0_allocateL1D;
176114184Sgabeblack@google.com    f0_L2ToL1;
176214184Sgabeblack@google.com    p_popMandatoryQueue;
176314184Sgabeblack@google.com  }
176414184Sgabeblack@google.com
176514184Sgabeblack@google.com  transition(Ms, C1_Load_L1miss, Ms_F1) {L2TagArrayRead, L2DataArrayRead, L1D1TagArrayRead} {
176614184Sgabeblack@google.com    l11m_profileMiss;
176714184Sgabeblack@google.com    a1_allocateL1D;
176814184Sgabeblack@google.com    f1_L2ToL1;
176914184Sgabeblack@google.com    p_popMandatoryQueue;
177014184Sgabeblack@google.com  }
177114184Sgabeblack@google.com
177214184Sgabeblack@google.com  transition({Ms, M0, M1, O}, Ifetch0_L1miss, MO_S0) {L1ITagArrayRead,  L2TagArrayRead} {
177314184Sgabeblack@google.com    l2m_profileMiss;  // permissions miss
177414184Sgabeblack@google.com    l1im_profileMiss;
177514184Sgabeblack@google.com    ai_allocateL1I;
177614184Sgabeblack@google.com    t_allocateTBE;
177714184Sgabeblack@google.com    ib_invBothClusters;
177814184Sgabeblack@google.com    vd_victim;
177914184Sgabeblack@google.com//    i2_invL2;
178014184Sgabeblack@google.com    p_popMandatoryQueue;
178114184Sgabeblack@google.com  }
178214184Sgabeblack@google.com
178314184Sgabeblack@google.com  transition({Ms, M0, M1, O}, Ifetch1_L1miss, MO_S1) {L1ITagArrayRead L2TagArrayRead } {
178414184Sgabeblack@google.com    l2m_profileMiss;  // permissions miss
178514184Sgabeblack@google.com    l10m_profileMiss;
178614184Sgabeblack@google.com    ai_allocateL1I;
178714184Sgabeblack@google.com    t_allocateTBE;
178814184Sgabeblack@google.com    ib_invBothClusters;
178914184Sgabeblack@google.com    vd_victim;
179014184Sgabeblack@google.com//    i2_invL2;
179114184Sgabeblack@google.com    p_popMandatoryQueue;
179214184Sgabeblack@google.com  }
179314184Sgabeblack@google.com
179414184Sgabeblack@google.com  transition(Ms, {C0_Store_L1hit, C0_Store_L1miss}, M0) {L1D0TagArrayRead, L1D0TagArrayWrite, L1D0DataArrayWrite, L2TagArrayRead, L2DataArrayWrite, L2TagArrayWrite} {
179514184Sgabeblack@google.com    a0_allocateL1D;
179614184Sgabeblack@google.com    i1_invCluster;
179714184Sgabeblack@google.com    s0_storeDone;
179814184Sgabeblack@google.com    p_popMandatoryQueue;
179914184Sgabeblack@google.com  }
180014184Sgabeblack@google.com
180114184Sgabeblack@google.com  transition(Ms, {C1_Store_L1hit, C1_Store_L1miss}, M1) {L1D1TagArrayRead, L1D1TagArrayWrite, L1D1DataArrayWrite, L2TagArrayRead, L2DataArrayWrite, L2TagArrayWrite} {
180214184Sgabeblack@google.com    a1_allocateL1D;
180314184Sgabeblack@google.com    i0_invCluster;
180414184Sgabeblack@google.com    s1_storeDone;
180514184Sgabeblack@google.com    p_popMandatoryQueue;
180614184Sgabeblack@google.com  }
180714184Sgabeblack@google.com
180814184Sgabeblack@google.com  transition(M0, C0_Load_L1miss, M0_F) {L1D0TagArrayRead, L2TagArrayRead, L2DataArrayRead} {
180914184Sgabeblack@google.com   l10m_profileMiss;
181014184Sgabeblack@google.com    a0_allocateL1D;
181114184Sgabeblack@google.com    f0_L2ToL1;
181214184Sgabeblack@google.com    p_popMandatoryQueue;
181314184Sgabeblack@google.com  }
181414184Sgabeblack@google.com
181514184Sgabeblack@google.com  transition(M0, C1_Load_L1miss, M0_Ms) {L2TagArrayRead, L2DataArrayRead,L1D1TagArrayRead} {
181614184Sgabeblack@google.com   l11m_profileMiss;
181714184Sgabeblack@google.com    a1_allocateL1D;
181814184Sgabeblack@google.com    f1_L2ToL1;
181914184Sgabeblack@google.com    p_popMandatoryQueue;
182014184Sgabeblack@google.com  }
182114184Sgabeblack@google.com
182214184Sgabeblack@google.com  transition(M0, {C0_Store_L1hit, C0_Store_L1miss}) {L1D0TagArrayRead, L1D0DataArrayWrite, L2DataArrayWrite, L2TagArrayRead} {
182314184Sgabeblack@google.com    a0_allocateL1D;
182414184Sgabeblack@google.com    s0_storeDone;
182514184Sgabeblack@google.com    p_popMandatoryQueue;
182614184Sgabeblack@google.com  }
182714184Sgabeblack@google.com
182814184Sgabeblack@google.com  transition(M0, {C1_Store_L1hit, C1_Store_L1miss}, M1) {L1D0TagArrayRead, L1D0TagArrayWrite, L1D0DataArrayWrite, L2DataArrayWrite, L2TagArrayRead, L2TagArrayWrite} {
182914184Sgabeblack@google.com    a1_allocateL1D;
183014184Sgabeblack@google.com    i0_invCluster;
183114184Sgabeblack@google.com    s1_storeDone;
183214184Sgabeblack@google.com    p_popMandatoryQueue;
183314184Sgabeblack@google.com  }
183414184Sgabeblack@google.com
183514184Sgabeblack@google.com  transition(M1, C0_Load_L1miss, M1_Ms) {L2TagArrayRead, L2DataArrayRead, L1D0TagArrayRead} {
183614184Sgabeblack@google.com    l10m_profileMiss;
183714184Sgabeblack@google.com    a0_allocateL1D;
183814184Sgabeblack@google.com    f0_L2ToL1;
183914184Sgabeblack@google.com    p_popMandatoryQueue;
184014184Sgabeblack@google.com  }
184114184Sgabeblack@google.com
184214184Sgabeblack@google.com  transition(M1, C1_Load_L1miss, M1_F) {L1D1TagArrayRead L2TagArrayRead, L2DataArrayRead} {
184314184Sgabeblack@google.com   l11m_profileMiss;
184414184Sgabeblack@google.com    a1_allocateL1D;
184514184Sgabeblack@google.com    f1_L2ToL1;
184614184Sgabeblack@google.com    p_popMandatoryQueue;
184714184Sgabeblack@google.com  }
184814184Sgabeblack@google.com
184914184Sgabeblack@google.com  transition(M1, {C0_Store_L1hit, C0_Store_L1miss}, M0) {L1D0TagArrayRead, L1D0TagArrayWrite, L1D0DataArrayWrite, L2TagArrayRead, L2DataArrayWrite, L2TagArrayWrite} {
185014184Sgabeblack@google.com    a0_allocateL1D;
185114184Sgabeblack@google.com    i1_invCluster;
185214184Sgabeblack@google.com    s0_storeDone;
185314184Sgabeblack@google.com    p_popMandatoryQueue;
185414184Sgabeblack@google.com  }
185514184Sgabeblack@google.com
185614184Sgabeblack@google.com  transition(M1, {C1_Store_L1hit, C1_Store_L1miss}) {L1D1TagArrayRead, L1D1DataArrayWrite, L2TagArrayRead, L2DataArrayWrite} {
185714184Sgabeblack@google.com    a1_allocateL1D;
185814184Sgabeblack@google.com    s1_storeDone;
185914184Sgabeblack@google.com    p_popMandatoryQueue;
186014184Sgabeblack@google.com  }
186114184Sgabeblack@google.com
186214184Sgabeblack@google.com  // end transitions from base
186314184Sgabeblack@google.com
186414184Sgabeblack@google.com  // Begin simple hit transitions
186514184Sgabeblack@google.com  transition({S, Es, E0, O, Ms, M0, O_F1, S_F1, Si_F0, Si_F1, Es_F1, E0_Es,
186614184Sgabeblack@google.com          Ms_F1, M0_Ms}, C0_Load_L1hit) {L1D0TagArrayRead, L1D0DataArrayRead} {
186714184Sgabeblack@google.com    // track hits, if implemented
186814184Sgabeblack@google.com    l0_loadDone;
186914184Sgabeblack@google.com    p_popMandatoryQueue;
187014184Sgabeblack@google.com  }
187114184Sgabeblack@google.com
187214184Sgabeblack@google.com  transition({S, Es, E1, O, Ms, M1, O_F0, S_F0, Si_F0, Si_F1, Es_F0, E1_Es,
187314184Sgabeblack@google.com          Ms_F0, M1_Ms}, C1_Load_L1hit) {L1D1TagArrayRead, L1D1DataArrayRead} {
187414184Sgabeblack@google.com    // track hits, if implemented
187514184Sgabeblack@google.com    l1_loadDone;
187614184Sgabeblack@google.com    p_popMandatoryQueue;
187714184Sgabeblack@google.com  }
187814184Sgabeblack@google.com
187914184Sgabeblack@google.com  transition({S, S_C, S_F0, S_F1, S_F}, Ifetch0_L1hit) {L1ITagArrayRead, L1IDataArrayRead} {
188014184Sgabeblack@google.com    // track hits, if implemented
188114184Sgabeblack@google.com    il0_loadDone;
188214184Sgabeblack@google.com    p_popMandatoryQueue;
188314184Sgabeblack@google.com  }
188414184Sgabeblack@google.com
188514184Sgabeblack@google.com  transition({S, S_C, S_F0, S_F1, S_F}, Ifetch1_L1hit) {L1ITagArrayRead, L1IDataArrayWrite} {
188614184Sgabeblack@google.com    // track hits, if implemented
188714184Sgabeblack@google.com    il1_loadDone;
188814184Sgabeblack@google.com    p_popMandatoryQueue;
188914184Sgabeblack@google.com  }
189014184Sgabeblack@google.com
189114184Sgabeblack@google.com  // end simple hit transitions
189214184Sgabeblack@google.com
189314184Sgabeblack@google.com  // Transitions from transient states
189414184Sgabeblack@google.com
189514184Sgabeblack@google.com  // recycles
189614184Sgabeblack@google.com  transition({I_M0, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E0S, I_ES, IF_E0S, IF_ES,
189714184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F0, S_F, O_F0, O_F, S_M0, O_M0, Es_F0, Es_F, E0_F,
189814184Sgabeblack@google.com          E1_Es, Ms_F0, Ms_F, M0_F, M1_Ms}, C0_Load_L1hit) {} {
189914184Sgabeblack@google.com    zz_recycleMandatoryQueue;
190014184Sgabeblack@google.com  }
190114184Sgabeblack@google.com
190214184Sgabeblack@google.com  transition({IF_E1S, F_S0, F_S1, ES_I, MO_I, MO_S0, MO_S1, Si_F0, Si_F1, S_M1,
190314184Sgabeblack@google.com          O_M1, S0, S1, I_C, S0_C, S1_C, S_C}, C0_Load_L1miss) {} {
190414184Sgabeblack@google.com    zz_recycleMandatoryQueue;
190514184Sgabeblack@google.com  }
190614184Sgabeblack@google.com
190714184Sgabeblack@google.com  transition({I_M1, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E1S, I_ES, IF_E1S, IF_ES,
190814184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F1, S_F, O_F1, O_F, S_M1, O_M1, Es_F1, Es_F, E1_F,
190914184Sgabeblack@google.com          E0_Es, Ms_F1, Ms_F, M0_Ms, M1_F}, C1_Load_L1hit) {} {
191014184Sgabeblack@google.com    zz_recycleMandatoryQueue;
191114184Sgabeblack@google.com  }
191214184Sgabeblack@google.com
191314184Sgabeblack@google.com  transition({IF_E0S, F_S0, F_S1, ES_I, MO_I, MO_S0, MO_S1, Si_F0, Si_F1, S_M0,
191414184Sgabeblack@google.com          O_M0, S0, S1, I_C, S0_C, S1_C, S_C},  C1_Load_L1miss) {} {
191514184Sgabeblack@google.com    zz_recycleMandatoryQueue;
191614184Sgabeblack@google.com  }
191714184Sgabeblack@google.com
191814184Sgabeblack@google.com  transition({F_S0, F_S1, MO_S0, MO_S1, Si_F0, Si_F1, S0, S1, S0_C, S1_C}, {Ifetch0_L1hit, Ifetch1_L1hit}) {} {
191914184Sgabeblack@google.com    zz_recycleMandatoryQueue;
192014184Sgabeblack@google.com  }
192114184Sgabeblack@google.com
192214184Sgabeblack@google.com  transition({I_M0, I_M1, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E0S, I_E1S, I_ES,
192314184Sgabeblack@google.com          IF_E0S, IF_E1S, IF_ES, IF0_ES, IF1_ES, ES_I, MO_I, S_F0, S_F1, S_F,
192414184Sgabeblack@google.com          O_F0, O_F1, O_F, S_M0, S_M1, O_M0, O_M1, Es_F0, Es_F1, Es_F, E0_F,
192514184Sgabeblack@google.com          E1_F, E0_Es, E1_Es, Ms_F0, Ms_F1, Ms_F, M0_F, M0_Ms, M1_F, M1_Ms, I_C,
192614184Sgabeblack@google.com          S_C}, {Ifetch0_L1miss, Ifetch1_L1miss}) {} {
192714184Sgabeblack@google.com    zz_recycleMandatoryQueue;
192814184Sgabeblack@google.com  }
192914184Sgabeblack@google.com
193014184Sgabeblack@google.com  transition({I_E1S, IF_E1S, F_S0, F_S1, ES_I, MO_I, MO_S0, MO_S1, S_F1, O_F1,
193114184Sgabeblack@google.com          Si_F0, Si_F1, S_M1, O_M1, S0, S1, Es_F1, E1_F, E0_Es, Ms_F1, M0_Ms,
193214184Sgabeblack@google.com          M1_F, I_C, S0_C, S1_C, S_C}, {C0_Store_L1miss}) {} {
193314184Sgabeblack@google.com    zz_recycleMandatoryQueue;
193414184Sgabeblack@google.com  }
193514184Sgabeblack@google.com
193614184Sgabeblack@google.com  transition({I_E0S, IF_E0S, F_S0, F_S1, ES_I, MO_I, MO_S0, MO_S1 S_F0, O_F0,
193714184Sgabeblack@google.com          Si_F0, Si_F1, S_M0, O_M0, S0, S1, Es_F0, E0_F, E1_Es, Ms_F0, M0_F,
193814184Sgabeblack@google.com          M1_Ms, I_C, S0_C, S1_C, S_C}, {C1_Store_L1miss}) {} {
193914184Sgabeblack@google.com    zz_recycleMandatoryQueue;
194014184Sgabeblack@google.com  }
194114184Sgabeblack@google.com
194214184Sgabeblack@google.com  transition({I_M0, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E0S, I_ES, IF_E0S, IF_ES,
194314184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F0, S_F1, S_F, O_F0, O_F1, O_F, Si_F0, Si_F1, S_M0, O_M0, Es_F0, Es_F1, Es_F, E0_F, E0_Es, E1_Es, Ms_F0, Ms_F1, Ms_F, M0_F, M0_Ms, M1_Ms}, {C0_Store_L1hit}) {} {
194414184Sgabeblack@google.com    zz_recycleMandatoryQueue;
194514184Sgabeblack@google.com  }
194614184Sgabeblack@google.com
194714184Sgabeblack@google.com  transition({I_M1, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E1S, I_ES, IF_E1S, IF_ES,
194814184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F0, S_F1, S_F, O_F0, O_F1, O_F, Si_F0, Si_F1, S_M1,
194914184Sgabeblack@google.com          O_M1, Es_F0, Es_F1, Es_F, E1_F, E0_Es, E1_Es, Ms_F0, Ms_F1, Ms_F,
195014184Sgabeblack@google.com          M0_Ms, M1_F, M1_Ms}, {C1_Store_L1hit}) {} {
195114184Sgabeblack@google.com    zz_recycleMandatoryQueue;
195214184Sgabeblack@google.com  }
195314184Sgabeblack@google.com
195414184Sgabeblack@google.com  transition({I_M0, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E0S, I_ES, IF_E0S, IF_ES,
195514184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F0, S_F, O_F0, O_F, S_M0, O_M0, Es_F0, Es_F, E0_F,
195614184Sgabeblack@google.com          E1_Es, Ms_F0, Ms_F, M0_F, M1_Ms}, L1D0_Repl) {} {
195714184Sgabeblack@google.com    zz_recycleMandatoryQueue;
195814184Sgabeblack@google.com  }
195914184Sgabeblack@google.com
196014184Sgabeblack@google.com  transition({I_M1, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E1S, I_ES, IF_E1S, IF_ES,
196114184Sgabeblack@google.com          IF0_ES, IF1_ES, S_F1, S_F, O_F1, O_F, S_M1, O_M1, Es_F1, Es_F, E1_F,
196214184Sgabeblack@google.com          E0_Es, Ms_F1, Ms_F, M0_Ms, M1_F}, L1D1_Repl) {} {
196314184Sgabeblack@google.com    zz_recycleMandatoryQueue;
196414184Sgabeblack@google.com  }
196514184Sgabeblack@google.com
196614184Sgabeblack@google.com  transition({F_S0, F_S1, MO_S0, MO_S1, Si_F0, Si_F1, S0, S1, S0_C, S1_C}, L1I_Repl) {} {
196714184Sgabeblack@google.com    zz_recycleMandatoryQueue;
196814184Sgabeblack@google.com  }
196914184Sgabeblack@google.com
197014184Sgabeblack@google.com  transition({S_C, S0_C, S1_C, S0, S1, Si_F0, Si_F1, I_M0, I_M1, I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_E0S, I_E1S, I_ES, S_F0, S_F1, S_F, O_F0, O_F1, O_F, S_M0, O_M0, S_M1, O_M1, Es_F0, Es_F1, Es_F, E0_F, E1_F, E0_Es, E1_Es, Ms_F0, Ms_F1, Ms_F, M0_F, M0_Ms, M1_F, M1_Ms, MO_S0, MO_S1, IF_E0S, IF_E1S, IF_ES, IF0_ES, IF1_ES, F_S0, F_S1}, L2_Repl) {} {
197114184Sgabeblack@google.com    zz_recycleMandatoryQueue;
197214184Sgabeblack@google.com  }
197314184Sgabeblack@google.com
197414184Sgabeblack@google.com  transition({IF_E0S, IF_E1S, IF_ES, IF0_ES, IF1_ES, F_S0, F_S1}, {NB_AckS,
197514184Sgabeblack@google.com          PrbInvData, PrbInvDataDemand, PrbInv, PrbShrData, PrbShrDataDemand}) {} {
197614184Sgabeblack@google.com    zz_recycleMandatoryQueue;  // these should be resolved soon, but I didn't want to add more states, though technically they could be solved now, and probes really could be solved but i don't think it's really necessary.
197714184Sgabeblack@google.com  }
197814184Sgabeblack@google.com
197914184Sgabeblack@google.com  transition({IF_E0S, IF_E1S, IF_ES, IF0_ES, IF1_ES}, NB_AckE) {} {
198014184Sgabeblack@google.com    zz_recycleMandatoryQueue;  // these should be resolved soon, but I didn't want to add more states, though technically they could be solved now, and probes really could be solved but i don't think it's really necessary.
198114184Sgabeblack@google.com  }
198214184Sgabeblack@google.com
198314184Sgabeblack@google.com  transition({E0_Es, E1_F, Es_F1}, C0_Load_L1miss, Es_F) {L2DataArrayRead} {
198414184Sgabeblack@google.com    l10m_profileMiss;
198514184Sgabeblack@google.com    a0_allocateL1D;
198614184Sgabeblack@google.com    f0_L2ToL1;
198714184Sgabeblack@google.com    p_popMandatoryQueue;
198814184Sgabeblack@google.com  }
198914184Sgabeblack@google.com
199014184Sgabeblack@google.com  transition(S_F1, C0_Load_L1miss, S_F) {L2DataArrayRead} {
199114184Sgabeblack@google.com    l10m_profileMiss;
199214184Sgabeblack@google.com    a0_allocateL1D;
199314184Sgabeblack@google.com    f0_L2ToL1;
199414184Sgabeblack@google.com    p_popMandatoryQueue;
199514184Sgabeblack@google.com  }
199614184Sgabeblack@google.com
199714184Sgabeblack@google.com  transition(O_F1, C0_Load_L1miss, O_F) {L2DataArrayRead} {
199814184Sgabeblack@google.com    l10m_profileMiss;
199914184Sgabeblack@google.com    a0_allocateL1D;
200014184Sgabeblack@google.com    f0_L2ToL1;
200114184Sgabeblack@google.com    p_popMandatoryQueue;
200214184Sgabeblack@google.com  }
200314184Sgabeblack@google.com
200414184Sgabeblack@google.com  transition({Ms_F1, M0_Ms, M1_F}, C0_Load_L1miss, Ms_F) {L2DataArrayRead} {
200514184Sgabeblack@google.com    l10m_profileMiss;
200614184Sgabeblack@google.com    a0_allocateL1D;
200714184Sgabeblack@google.com    f0_L2ToL1;
200814184Sgabeblack@google.com    p_popMandatoryQueue;
200914184Sgabeblack@google.com  }
201014184Sgabeblack@google.com
201114184Sgabeblack@google.com  transition(I_M0, C1_Load_L1miss, I_M0Ms){
201214184Sgabeblack@google.com    l11m_profileMiss;
201314184Sgabeblack@google.com    l2m_profileMiss;
201414184Sgabeblack@google.com    a1_allocateL1D;
201514184Sgabeblack@google.com    p_popMandatoryQueue;
201614184Sgabeblack@google.com  }
201714184Sgabeblack@google.com
201814184Sgabeblack@google.com  transition(I_M1, C0_Load_L1miss, I_M1Ms){
201914184Sgabeblack@google.com    l10m_profileMiss;
202014184Sgabeblack@google.com    l2m_profileMiss;
202114184Sgabeblack@google.com    a0_allocateL1D;
202214184Sgabeblack@google.com    p_popMandatoryQueue;
202314184Sgabeblack@google.com  }
202414184Sgabeblack@google.com
202514184Sgabeblack@google.com  transition(I_M0, C1_Store_L1miss, I_M0M1) {
202614184Sgabeblack@google.com    l11m_profileMiss;
202714184Sgabeblack@google.com    l2m_profileMiss;
202814184Sgabeblack@google.com    a1_allocateL1D;
202914184Sgabeblack@google.com    p_popMandatoryQueue;
203014184Sgabeblack@google.com  }
203114184Sgabeblack@google.com
203214184Sgabeblack@google.com  transition(I_M1, C0_Store_L1miss, I_M1M0) {L1D0TagArrayRead, L1D0TagArrayWrite, L2TagArrayRead, L2TagArrayWrite} {
203314184Sgabeblack@google.com    l2m_profileMiss;
203414184Sgabeblack@google.com    a0_allocateL1D;
203514184Sgabeblack@google.com    p_popMandatoryQueue;
203614184Sgabeblack@google.com  }
203714184Sgabeblack@google.com
203814184Sgabeblack@google.com  transition(I_E0S, C1_Load_L1miss, I_ES) {} {
203914184Sgabeblack@google.com    l2m_profileMiss;
204014184Sgabeblack@google.com    l11m_profileMiss;
204114184Sgabeblack@google.com    a1_allocateL1D;
204214184Sgabeblack@google.com    p_popMandatoryQueue;
204314184Sgabeblack@google.com  }
204414184Sgabeblack@google.com
204514184Sgabeblack@google.com  transition(I_E1S, C0_Load_L1miss, I_ES) {} {
204614184Sgabeblack@google.com    l2m_profileMiss;
204714184Sgabeblack@google.com    l10m_profileMiss;
204814184Sgabeblack@google.com    l2m_profileMiss;
204914184Sgabeblack@google.com    a0_allocateL1D;
205014184Sgabeblack@google.com    p_popMandatoryQueue;
205114184Sgabeblack@google.com  }
205214184Sgabeblack@google.com
205314184Sgabeblack@google.com  transition({E1_Es, E0_F, Es_F0}, C1_Load_L1miss, Es_F) {L2DataArrayRead} {
205414184Sgabeblack@google.com    l11m_profileMiss;
205514184Sgabeblack@google.com    a1_allocateL1D;
205614184Sgabeblack@google.com    f1_L2ToL1;
205714184Sgabeblack@google.com    p_popMandatoryQueue;
205814184Sgabeblack@google.com  }
205914184Sgabeblack@google.com
206014184Sgabeblack@google.com  transition(S_F0, C1_Load_L1miss, S_F) { L2DataArrayRead} {
206114184Sgabeblack@google.com    l11m_profileMiss;
206214184Sgabeblack@google.com    a1_allocateL1D;
206314184Sgabeblack@google.com    f1_L2ToL1;
206414184Sgabeblack@google.com    p_popMandatoryQueue;
206514184Sgabeblack@google.com  }
206614184Sgabeblack@google.com
206714184Sgabeblack@google.com  transition(O_F0, C1_Load_L1miss, O_F) {L2DataArrayRead} {
206814184Sgabeblack@google.com    l11m_profileMiss;
206914184Sgabeblack@google.com    a1_allocateL1D;
207014184Sgabeblack@google.com    f1_L2ToL1;
207114184Sgabeblack@google.com    p_popMandatoryQueue;
207214184Sgabeblack@google.com  }
207314184Sgabeblack@google.com
207414184Sgabeblack@google.com  transition({Ms_F0, M1_Ms, M0_F}, C1_Load_L1miss, Ms_F) {L2DataArrayRead} {
207514184Sgabeblack@google.com    l11m_profileMiss;
207614184Sgabeblack@google.com    a1_allocateL1D;
207714184Sgabeblack@google.com    f1_L2ToL1;
207814184Sgabeblack@google.com    p_popMandatoryQueue;
207914184Sgabeblack@google.com  }
208014184Sgabeblack@google.com
208114184Sgabeblack@google.com  transition({S, Es, E0, O, Ms, M0, O_F1, S_F1, Si_F0, Si_F1, Es_F1, E0_Es, Ms_F1, M0_Ms}, L1D0_Repl) {L1D0TagArrayRead} {
208214184Sgabeblack@google.com    i0_invCluster;
208314184Sgabeblack@google.com  }
208414184Sgabeblack@google.com
208514184Sgabeblack@google.com  transition({S, Es, E1, O, Ms, M1, O_F0, S_F0, Si_F0, Si_F1, Es_F0, E1_Es, Ms_F0, M1_Ms}, L1D1_Repl) {L1D1TagArrayRead} {
208614184Sgabeblack@google.com    i1_invCluster;
208714184Sgabeblack@google.com  }
208814184Sgabeblack@google.com
208914184Sgabeblack@google.com  transition({S, S_C, S_F0, S_F1}, L1I_Repl) {L1ITagArrayRead} {
209014184Sgabeblack@google.com    ii_invIcache;
209114184Sgabeblack@google.com  }
209214184Sgabeblack@google.com
209314184Sgabeblack@google.com  transition({S, E0, E1, Es}, L2_Repl, ES_I) {L2TagArrayRead,L1D0TagArrayRead, L1D1TagArrayRead, L1ITagArrayRead} {
209414184Sgabeblack@google.com    forward_eviction_to_cpu0;
209514184Sgabeblack@google.com    forward_eviction_to_cpu1;
209614184Sgabeblack@google.com    t_allocateTBE;
209714184Sgabeblack@google.com    vc_victim;
209814184Sgabeblack@google.com    ib_invBothClusters;
209914184Sgabeblack@google.com    i2_invL2;
210014184Sgabeblack@google.com    ii_invIcache;
210114184Sgabeblack@google.com  }
210214184Sgabeblack@google.com
210314184Sgabeblack@google.com  transition({Ms, M0, M1, O}, L2_Repl, MO_I) {L2TagArrayRead, L2TagArrayWrite, L1D0TagArrayRead, L1D1TagArrayRead} {
210414184Sgabeblack@google.com    forward_eviction_to_cpu0;
210514184Sgabeblack@google.com    forward_eviction_to_cpu1;
210614184Sgabeblack@google.com    t_allocateTBE;
210714184Sgabeblack@google.com    vd_victim;
210814184Sgabeblack@google.com    i2_invL2;
210914184Sgabeblack@google.com    ib_invBothClusters;  // nothing will happen for D0 on M1, vice versa
211014184Sgabeblack@google.com  }
211114184Sgabeblack@google.com
211214184Sgabeblack@google.com  transition(S0, NB_AckS, S) {L1D0DataArrayWrite, L1D0TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
211314184Sgabeblack@google.com    wi_writeIcache;
211414184Sgabeblack@google.com    xi0_loadDone;
211514184Sgabeblack@google.com    uu_sendUnblock;
211614184Sgabeblack@google.com    sdv_sendDoneValid;
211714184Sgabeblack@google.com    pr_popResponseQueue;
211814184Sgabeblack@google.com  }
211914184Sgabeblack@google.com
212014184Sgabeblack@google.com  transition(S1, NB_AckS, S) {L1D1DataArrayWrite, L1D1TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
212114184Sgabeblack@google.com    wi_writeIcache;
212214184Sgabeblack@google.com    xi1_loadDone;
212314184Sgabeblack@google.com    sdv_sendDoneValid;
212414184Sgabeblack@google.com    uu_sendUnblock;
212514184Sgabeblack@google.com    pr_popResponseQueue;
212614184Sgabeblack@google.com  }
212714184Sgabeblack@google.com
212814184Sgabeblack@google.com  transition(S0_C, NB_AckS, S_C) { L1IDataArrayWrite,L2DataArrayWrite} {
212914184Sgabeblack@google.com    // does not need send done since the rdblks was "sinked"
213014184Sgabeblack@google.com    wi_writeIcache;
213114184Sgabeblack@google.com    xi0_loadDone;
213214184Sgabeblack@google.com    uu_sendUnblock;
213314184Sgabeblack@google.com    pr_popResponseQueue;
213414184Sgabeblack@google.com  }
213514184Sgabeblack@google.com
213614184Sgabeblack@google.com  transition(S1_C, NB_AckS, S_C) { L1D1DataArrayWrite,L2DataArrayWrite} {
213714184Sgabeblack@google.com    wi_writeIcache;
213814184Sgabeblack@google.com    xi1_loadDone;
213914184Sgabeblack@google.com    uu_sendUnblock;
214014184Sgabeblack@google.com    pr_popResponseQueue;
214114184Sgabeblack@google.com  }
214214184Sgabeblack@google.com
214314184Sgabeblack@google.com  transition(I_M0, NB_AckM, M0) { L1D0DataArrayWrite, L1D0TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
214414184Sgabeblack@google.com    w0_writeDcache;
214514184Sgabeblack@google.com    xs0_storeDone;
214614184Sgabeblack@google.com    sdv_sendDoneValid;
214714184Sgabeblack@google.com    uu_sendUnblock;
214814184Sgabeblack@google.com    pr_popResponseQueue;
214914184Sgabeblack@google.com  }
215014184Sgabeblack@google.com
215114184Sgabeblack@google.com  transition(I_M1, NB_AckM, M1) {L1D1DataArrayWrite, L1D1TagArrayWrite,L2DataArrayWrite, L2TagArrayWrite} {
215214184Sgabeblack@google.com    w1_writeDcache;
215314184Sgabeblack@google.com    xs1_storeDone;
215414184Sgabeblack@google.com    sdv_sendDoneValid;
215514184Sgabeblack@google.com    uu_sendUnblock;
215614184Sgabeblack@google.com    pr_popResponseQueue;
215714184Sgabeblack@google.com  }
215814184Sgabeblack@google.com
215914184Sgabeblack@google.com  // THESE MO->M1 should not be instantaneous but oh well for now.
216014184Sgabeblack@google.com  transition(I_M0M1, NB_AckM, M1) {L1D1DataArrayWrite, L1D1TagArrayWrite,L2DataArrayWrite, L2TagArrayWrite} {
216114184Sgabeblack@google.com    w0_writeDcache;
216214184Sgabeblack@google.com    xs0_storeDone;
216314184Sgabeblack@google.com    sdv_sendDoneValid;
216414184Sgabeblack@google.com    uu_sendUnblock;
216514184Sgabeblack@google.com    i0_invCluster;
216614184Sgabeblack@google.com    s1_storeDone;
216714184Sgabeblack@google.com    pr_popResponseQueue;
216814184Sgabeblack@google.com  }
216914184Sgabeblack@google.com
217014184Sgabeblack@google.com  transition(I_M1M0, NB_AckM, M0) {L1D0DataArrayWrite, L1D0TagArrayWrite,L2DataArrayWrite, L2TagArrayWrite} {
217114184Sgabeblack@google.com    w1_writeDcache;
217214184Sgabeblack@google.com    xs1_storeDone;
217314184Sgabeblack@google.com    sdv_sendDoneValid;
217414184Sgabeblack@google.com    uu_sendUnblock;
217514184Sgabeblack@google.com    i1_invCluster;
217614184Sgabeblack@google.com    s0_storeDone;
217714184Sgabeblack@google.com    pr_popResponseQueue;
217814184Sgabeblack@google.com  }
217914184Sgabeblack@google.com
218014184Sgabeblack@google.com  // Above shoudl be more like this, which has some latency to xfer to L1
218114184Sgabeblack@google.com  transition(I_M0Ms, NB_AckM, M0_Ms) {L1D0DataArrayWrite,L2DataArrayWrite} {
218214184Sgabeblack@google.com    w0_writeDcache;
218314184Sgabeblack@google.com    xs0_storeDone;
218414184Sgabeblack@google.com    sdv_sendDoneValid;
218514184Sgabeblack@google.com    uu_sendUnblock;
218614184Sgabeblack@google.com    f1_L2ToL1;
218714184Sgabeblack@google.com    pr_popResponseQueue;
218814184Sgabeblack@google.com  }
218914184Sgabeblack@google.com
219014184Sgabeblack@google.com  transition(I_M1Ms, NB_AckM, M1_Ms) {L1D1DataArrayWrite,L2DataArrayWrite} {
219114184Sgabeblack@google.com    w1_writeDcache;
219214184Sgabeblack@google.com    xs1_storeDone;
219314184Sgabeblack@google.com    sdv_sendDoneValid;
219414184Sgabeblack@google.com    uu_sendUnblock;
219514184Sgabeblack@google.com    f0_L2ToL1;
219614184Sgabeblack@google.com    pr_popResponseQueue;
219714184Sgabeblack@google.com  }
219814184Sgabeblack@google.com
219914184Sgabeblack@google.com  transition(I_E0S, NB_AckE, E0) {L1D0DataArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
220014184Sgabeblack@google.com    w0_writeDcache;
220114184Sgabeblack@google.com    xl0_loadDone;
220214184Sgabeblack@google.com    sdv_sendDoneValid;
220314184Sgabeblack@google.com    uu_sendUnblock;
220414184Sgabeblack@google.com    pr_popResponseQueue;
220514184Sgabeblack@google.com  }
220614184Sgabeblack@google.com
220714184Sgabeblack@google.com  transition(I_E1S, NB_AckE, E1) {L1D1DataArrayWrite, L1D1TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
220814184Sgabeblack@google.com    w1_writeDcache;
220914184Sgabeblack@google.com    xl1_loadDone;
221014184Sgabeblack@google.com    sdv_sendDoneValid;
221114184Sgabeblack@google.com    uu_sendUnblock;
221214184Sgabeblack@google.com    pr_popResponseQueue;
221314184Sgabeblack@google.com  }
221414184Sgabeblack@google.com
221514184Sgabeblack@google.com  transition(I_ES, NB_AckE, Es) {L1D1DataArrayWrite, L1D1TagArrayWrite, L1D0DataArrayWrite, L1D0TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite } {
221614184Sgabeblack@google.com    w0_writeDcache;
221714184Sgabeblack@google.com    xl0_loadDone;
221814184Sgabeblack@google.com    w1_writeDcache;
221914184Sgabeblack@google.com    xl1_loadDone;
222014184Sgabeblack@google.com    sdv_sendDoneValid;
222114184Sgabeblack@google.com    uu_sendUnblock;
222214184Sgabeblack@google.com    pr_popResponseQueue;
222314184Sgabeblack@google.com  }
222414184Sgabeblack@google.com
222514184Sgabeblack@google.com  transition(I_E0S, NB_AckS, S) {L1D0DataArrayWrite, L1D0TagArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
222614184Sgabeblack@google.com    w0_writeDcache;
222714184Sgabeblack@google.com    xl0_loadDone;
222814184Sgabeblack@google.com    sdv_sendDoneValid;
222914184Sgabeblack@google.com    uu_sendUnblock;
223014184Sgabeblack@google.com    pr_popResponseQueue;
223114184Sgabeblack@google.com  }
223214184Sgabeblack@google.com
223314184Sgabeblack@google.com  transition(I_E1S, NB_AckS, S) {L1D1TagArrayWrite, L1D1DataArrayWrite, L2TagArrayWrite, L2DataArrayWrite} {
223414184Sgabeblack@google.com    w1_writeDcache;
223514184Sgabeblack@google.com    xl1_loadDone;
223614184Sgabeblack@google.com    sdv_sendDoneValid;
223714184Sgabeblack@google.com    uu_sendUnblock;
223814184Sgabeblack@google.com    pr_popResponseQueue;
223914184Sgabeblack@google.com  }
224014184Sgabeblack@google.com
224114184Sgabeblack@google.com  transition(I_ES, NB_AckS, S) {L1D0TagArrayWrite, L1D0DataArrayWrite, L2TagArrayWrite,  L2DataArrayWrite} {
224214184Sgabeblack@google.com    w0_writeDcache;
224314184Sgabeblack@google.com    xl0_loadDone;
224414184Sgabeblack@google.com    w1_writeDcache;
224514184Sgabeblack@google.com    xl1_loadDone;
224614184Sgabeblack@google.com    sdv_sendDoneValid;
224714184Sgabeblack@google.com    uu_sendUnblock;
224814184Sgabeblack@google.com    pr_popResponseQueue;
224914184Sgabeblack@google.com  }
225014184Sgabeblack@google.com
225114184Sgabeblack@google.com  transition(S_F0, L2_to_L1D0, S) {L1D0TagArrayWrite, L1D0DataArrayWrite,  L2TagArrayWrite, L2DataArrayRead} {
225214184Sgabeblack@google.com    c0_copyL2ToL1;
225314184Sgabeblack@google.com    l0_loadDone;
225414184Sgabeblack@google.com    pt_popTriggerQueue;
225514184Sgabeblack@google.com  }
225614184Sgabeblack@google.com
225714184Sgabeblack@google.com  transition(S_F1, L2_to_L1D1, S) {L1D1TagArrayWrite, L1D1DataArrayWrite,  L2TagArrayWrite, L2DataArrayRead} {
225814184Sgabeblack@google.com    c1_copyL2ToL1;
225914184Sgabeblack@google.com    l1_loadDone;
226014184Sgabeblack@google.com    pt_popTriggerQueue;
226114184Sgabeblack@google.com  }
226214184Sgabeblack@google.com
226314184Sgabeblack@google.com  transition(Si_F0, L2_to_L1I, S) {L1ITagArrayWrite, L1IDataArrayWrite,  L2TagArrayWrite, L2DataArrayRead} {
226414184Sgabeblack@google.com    ci_copyL2ToL1;
226514184Sgabeblack@google.com    il0_loadDone;
226614184Sgabeblack@google.com    pt_popTriggerQueue;
226714184Sgabeblack@google.com  }
226814184Sgabeblack@google.com
226914184Sgabeblack@google.com  transition(Si_F1, L2_to_L1I, S) {L1ITagArrayWrite, L1IDataArrayWrite,  L2TagArrayWrite, L2DataArrayRead} {
227014184Sgabeblack@google.com    ci_copyL2ToL1;
227114184Sgabeblack@google.com    il1_loadDone;
227214184Sgabeblack@google.com    pt_popTriggerQueue;
227314184Sgabeblack@google.com  }
227414184Sgabeblack@google.com
227514184Sgabeblack@google.com  transition(S_F, L2_to_L1D0, S_F1) { L1D0DataArrayWrite, L2DataArrayRead} {
227614184Sgabeblack@google.com    c0_copyL2ToL1;
227714184Sgabeblack@google.com    l0_loadDone;
227814184Sgabeblack@google.com    pt_popTriggerQueue;
227914184Sgabeblack@google.com  }
228014184Sgabeblack@google.com
228114184Sgabeblack@google.com  transition(S_F, L2_to_L1D1, S_F0) { L1D1DataArrayWrite, L2DataArrayRead} {
228214184Sgabeblack@google.com    c1_copyL2ToL1;
228314184Sgabeblack@google.com    l1_loadDone;
228414184Sgabeblack@google.com    pt_popTriggerQueue;
228514184Sgabeblack@google.com  }
228614184Sgabeblack@google.com
228714184Sgabeblack@google.com  transition(O_F0, L2_to_L1D0, O) { L1D0DataArrayWrite, L1D0TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
228814184Sgabeblack@google.com    c0_copyL2ToL1;
228914184Sgabeblack@google.com    l0_loadDone;
229014184Sgabeblack@google.com    pt_popTriggerQueue;
229114184Sgabeblack@google.com  }
229214184Sgabeblack@google.com
229314184Sgabeblack@google.com  transition(O_F1, L2_to_L1D1, O) {L1D1DataArrayWrite, L1D1TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
229414184Sgabeblack@google.com    c1_copyL2ToL1;
229514184Sgabeblack@google.com    l1_loadDone;
229614184Sgabeblack@google.com    pt_popTriggerQueue;
229714184Sgabeblack@google.com  }
229814184Sgabeblack@google.com
229914184Sgabeblack@google.com  transition(O_F, L2_to_L1D0, O_F1) { L1D0DataArrayWrite, L2DataArrayRead} {
230014184Sgabeblack@google.com    c0_copyL2ToL1;
230114184Sgabeblack@google.com    l0_loadDone;
230214184Sgabeblack@google.com    pt_popTriggerQueue;
230314184Sgabeblack@google.com  }
230414184Sgabeblack@google.com
230514184Sgabeblack@google.com  transition(O_F, L2_to_L1D1, O_F0) { L1D1DataArrayWrite, L2DataArrayRead} {
230614184Sgabeblack@google.com    c1_copyL2ToL1;
230714184Sgabeblack@google.com    l1_loadDone;
230814184Sgabeblack@google.com    pt_popTriggerQueue;
230914184Sgabeblack@google.com  }
231014184Sgabeblack@google.com
231114184Sgabeblack@google.com  transition(M1_F, L2_to_L1D1, M1) {L1D1DataArrayWrite, L1D1TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
231214184Sgabeblack@google.com    c1_copyL2ToL1;
231314184Sgabeblack@google.com    l1_loadDone;
231414184Sgabeblack@google.com    pt_popTriggerQueue;
231514184Sgabeblack@google.com  }
231614184Sgabeblack@google.com
231714184Sgabeblack@google.com  transition(M0_F, L2_to_L1D0, M0) {L1D0DataArrayWrite, L1D0TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
231814184Sgabeblack@google.com    c0_copyL2ToL1;
231914184Sgabeblack@google.com    l0_loadDone;
232014184Sgabeblack@google.com    pt_popTriggerQueue;
232114184Sgabeblack@google.com  }
232214184Sgabeblack@google.com
232314184Sgabeblack@google.com  transition(Ms_F0, L2_to_L1D0, Ms) {L1D0DataArrayWrite, L1D0TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
232414184Sgabeblack@google.com    c0_copyL2ToL1;
232514184Sgabeblack@google.com    l0_loadDone;
232614184Sgabeblack@google.com    pt_popTriggerQueue;
232714184Sgabeblack@google.com  }
232814184Sgabeblack@google.com
232914184Sgabeblack@google.com  transition(Ms_F1, L2_to_L1D1, Ms) {L1D1DataArrayWrite, L1D1TagArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
233014184Sgabeblack@google.com    c1_copyL2ToL1;
233114184Sgabeblack@google.com    l1_loadDone;
233214184Sgabeblack@google.com    pt_popTriggerQueue;
233314184Sgabeblack@google.com  }
233414184Sgabeblack@google.com
233514184Sgabeblack@google.com  transition(Ms_F, L2_to_L1D0, Ms_F1) {L1D0DataArrayWrite, L2DataArrayRead} {
233614184Sgabeblack@google.com    c0_copyL2ToL1;
233714184Sgabeblack@google.com    l0_loadDone;
233814184Sgabeblack@google.com    pt_popTriggerQueue;
233914184Sgabeblack@google.com  }
234014184Sgabeblack@google.com
234114184Sgabeblack@google.com  transition(Ms_F, L2_to_L1D1, Ms_F0) {L1IDataArrayWrite, L2DataArrayRead} {
234214184Sgabeblack@google.com    c1_copyL2ToL1;
234314184Sgabeblack@google.com    l1_loadDone;
234414184Sgabeblack@google.com    pt_popTriggerQueue;
234514184Sgabeblack@google.com  }
234614184Sgabeblack@google.com
234714184Sgabeblack@google.com  transition(M1_Ms, L2_to_L1D0, Ms) {L1D0TagArrayWrite, L1D0DataArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
234814184Sgabeblack@google.com    c0_copyL2ToL1;
234914184Sgabeblack@google.com    l0_loadDone;
235014184Sgabeblack@google.com    pt_popTriggerQueue;
235114184Sgabeblack@google.com  }
235214184Sgabeblack@google.com
235314184Sgabeblack@google.com  transition(M0_Ms, L2_to_L1D1, Ms) {L1D1TagArrayWrite, L1D1DataArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
235414184Sgabeblack@google.com    c1_copyL2ToL1;
235514184Sgabeblack@google.com    l1_loadDone;
235614184Sgabeblack@google.com    pt_popTriggerQueue;
235714184Sgabeblack@google.com  }
235814184Sgabeblack@google.com
235914184Sgabeblack@google.com  transition(Es_F0, L2_to_L1D0, Es) {L1D0TagArrayWrite, L1D0DataArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
236014184Sgabeblack@google.com    c0_copyL2ToL1;
236114184Sgabeblack@google.com    l0_loadDone;
236214184Sgabeblack@google.com    pt_popTriggerQueue;
236314184Sgabeblack@google.com  }
236414184Sgabeblack@google.com
236514184Sgabeblack@google.com  transition(Es_F1, L2_to_L1D1, Es) {L1D1TagArrayWrite, L1D1DataArrayWrite, L2TagArrayWrite, L2DataArrayRead} {
236614184Sgabeblack@google.com    c1_copyL2ToL1;
236714184Sgabeblack@google.com    l1_loadDone;
236814184Sgabeblack@google.com    pt_popTriggerQueue;
236914184Sgabeblack@google.com  }
237014184Sgabeblack@google.com
237114184Sgabeblack@google.com  transition(Es_F, L2_to_L1D0, Es_F1) {L2TagArrayRead, L2DataArrayRead} {
237214184Sgabeblack@google.com    c0_copyL2ToL1;
237314184Sgabeblack@google.com    l0_loadDone;
237414184Sgabeblack@google.com    pt_popTriggerQueue;
237514184Sgabeblack@google.com  }
237614184Sgabeblack@google.com
237714184Sgabeblack@google.com  transition(Es_F, L2_to_L1D1, Es_F0) {L2TagArrayRead, L2DataArrayRead} {
237814184Sgabeblack@google.com    c1_copyL2ToL1;
237914184Sgabeblack@google.com    l1_loadDone;
238014184Sgabeblack@google.com    pt_popTriggerQueue;
238114184Sgabeblack@google.com  }
238214184Sgabeblack@google.com
238314184Sgabeblack@google.com  transition(E0_F, L2_to_L1D0, E0) {L2TagArrayRead, L2DataArrayRead} {
238414184Sgabeblack@google.com    c0_copyL2ToL1;
238514184Sgabeblack@google.com    l0_loadDone;
238614184Sgabeblack@google.com    pt_popTriggerQueue;
238714184Sgabeblack@google.com  }
238814184Sgabeblack@google.com
238914184Sgabeblack@google.com  transition(E1_F, L2_to_L1D1, E1) {L2TagArrayRead, L2DataArrayRead} {
239014184Sgabeblack@google.com    c1_copyL2ToL1;
239114184Sgabeblack@google.com    l1_loadDone;
239214184Sgabeblack@google.com    pt_popTriggerQueue;
239314184Sgabeblack@google.com  }
239414184Sgabeblack@google.com
239514184Sgabeblack@google.com  transition(E1_Es, L2_to_L1D0, Es) {L2TagArrayRead, L2DataArrayRead} {
239614184Sgabeblack@google.com    c0_copyL2ToL1;
239714184Sgabeblack@google.com    l0_loadDone;
239814184Sgabeblack@google.com    pt_popTriggerQueue;
239914184Sgabeblack@google.com  }
240014184Sgabeblack@google.com
240114184Sgabeblack@google.com  transition(E0_Es, L2_to_L1D1, Es) {L2TagArrayRead, L2DataArrayRead} {
240214184Sgabeblack@google.com    c1_copyL2ToL1;
240314184Sgabeblack@google.com    l1_loadDone;
240414184Sgabeblack@google.com    pt_popTriggerQueue;
240514184Sgabeblack@google.com  }
240614184Sgabeblack@google.com
240714184Sgabeblack@google.com  transition(IF_E0S, L2_to_L1D0, I_E0S) {} {
240814184Sgabeblack@google.com    pt_popTriggerQueue;
240914184Sgabeblack@google.com  }
241014184Sgabeblack@google.com
241114184Sgabeblack@google.com  transition(IF_E1S, L2_to_L1D1, I_E1S) {} {
241214184Sgabeblack@google.com    pt_popTriggerQueue;
241314184Sgabeblack@google.com  }
241414184Sgabeblack@google.com
241514184Sgabeblack@google.com  transition(IF_ES, L2_to_L1D0, IF1_ES) {} {
241614184Sgabeblack@google.com    pt_popTriggerQueue;
241714184Sgabeblack@google.com  }
241814184Sgabeblack@google.com
241914184Sgabeblack@google.com  transition(IF_ES, L2_to_L1D1, IF0_ES) {} {
242014184Sgabeblack@google.com    pt_popTriggerQueue;
242114184Sgabeblack@google.com  }
242214184Sgabeblack@google.com
242314184Sgabeblack@google.com  transition(IF0_ES, L2_to_L1D0, I_ES) {} {
242414184Sgabeblack@google.com    pt_popTriggerQueue;
242514184Sgabeblack@google.com  }
242614184Sgabeblack@google.com
242714184Sgabeblack@google.com  transition(IF1_ES, L2_to_L1D1, I_ES) {} {
242814184Sgabeblack@google.com    pt_popTriggerQueue;
242914184Sgabeblack@google.com  }
243014184Sgabeblack@google.com
243114184Sgabeblack@google.com  transition(F_S0, L2_to_L1I, S0) {} {
243214184Sgabeblack@google.com    pt_popTriggerQueue;
243314184Sgabeblack@google.com  }
243414184Sgabeblack@google.com
243514184Sgabeblack@google.com  transition(F_S1, L2_to_L1I, S1) {} {
243614184Sgabeblack@google.com    pt_popTriggerQueue;
243714184Sgabeblack@google.com  }
243814184Sgabeblack@google.com
243914184Sgabeblack@google.com  transition({S_M0, O_M0}, NB_AckM, M0) {L1D0TagArrayWrite, L1D0DataArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
244014184Sgabeblack@google.com    xs0_storeDone;
244114184Sgabeblack@google.com    sdv_sendDoneValid;
244214184Sgabeblack@google.com    uu_sendUnblock;
244314184Sgabeblack@google.com    pr_popResponseQueue;
244414184Sgabeblack@google.com  }
244514184Sgabeblack@google.com
244614184Sgabeblack@google.com  transition({S_M1, O_M1}, NB_AckM, M1) {L1D1TagArrayWrite, L1D1DataArrayWrite, L2DataArrayWrite, L2TagArrayWrite} {
244714184Sgabeblack@google.com    xs1_storeDone;
244814184Sgabeblack@google.com    sdv_sendDoneValid;
244914184Sgabeblack@google.com    uu_sendUnblock;
245014184Sgabeblack@google.com    pr_popResponseQueue;
245114184Sgabeblack@google.com  }
245214184Sgabeblack@google.com
245314184Sgabeblack@google.com  transition(MO_I, NB_AckWB, I) {L2TagArrayWrite} {
245414184Sgabeblack@google.com    wb_data;
245514184Sgabeblack@google.com    ra_sendReplAck;
245614184Sgabeblack@google.com    sdi_sendDoneInvalid;
245714184Sgabeblack@google.com    d_deallocateTBE;
245814184Sgabeblack@google.com    pr_popResponseQueue;
245914184Sgabeblack@google.com  }
246014184Sgabeblack@google.com
246114184Sgabeblack@google.com  transition(ES_I, NB_AckWB, I) {L2TagArrayWrite} {
246214184Sgabeblack@google.com    wb_data;
246314184Sgabeblack@google.com    ra_sendReplAck;
246414184Sgabeblack@google.com    sdi_sendDoneInvalid;
246514184Sgabeblack@google.com    d_deallocateTBE;
246614184Sgabeblack@google.com    pr_popResponseQueue;
246714184Sgabeblack@google.com  }
246814184Sgabeblack@google.com
246914184Sgabeblack@google.com  transition(MO_S0, NB_AckWB, S0) {L2TagArrayWrite} {
247014184Sgabeblack@google.com    wb_data;
247114184Sgabeblack@google.com    i2_invL2;
247214184Sgabeblack@google.com    a2_allocateL2;
247314184Sgabeblack@google.com    sdv_sendDoneValid;
247414184Sgabeblack@google.com    nS_issueRdBlkS;
247514184Sgabeblack@google.com    d_deallocateTBE; // FOO
247614184Sgabeblack@google.com    pr_popResponseQueue;
247714184Sgabeblack@google.com  }
247814184Sgabeblack@google.com
247914184Sgabeblack@google.com  transition(MO_S1, NB_AckWB, S1) {L2TagArrayWrite} {
248014184Sgabeblack@google.com    wb_data;
248114184Sgabeblack@google.com    i2_invL2;
248214184Sgabeblack@google.com    a2_allocateL2;
248314184Sgabeblack@google.com    sdv_sendDoneValid;
248414184Sgabeblack@google.com    nS_issueRdBlkS;
248514184Sgabeblack@google.com    d_deallocateTBE; // FOO
248614184Sgabeblack@google.com    pr_popResponseQueue;
248714184Sgabeblack@google.com  }
248814184Sgabeblack@google.com
248914184Sgabeblack@google.com  // Writeback cancel "ack"
249014184Sgabeblack@google.com  transition(I_C, NB_AckWB, I) {L2TagArrayWrite} {
249114184Sgabeblack@google.com    ss_sendStaleNotification;
249214184Sgabeblack@google.com    sdi_sendDoneInvalid;
249314184Sgabeblack@google.com    d_deallocateTBE;
249414184Sgabeblack@google.com    pr_popResponseQueue;
249514184Sgabeblack@google.com  }
249614184Sgabeblack@google.com
249714184Sgabeblack@google.com  transition(S0_C, NB_AckWB, S0) {L2TagArrayWrite} {
249814184Sgabeblack@google.com    ss_sendStaleNotification;
249914184Sgabeblack@google.com    sdv_sendDoneValid;
250014184Sgabeblack@google.com    pr_popResponseQueue;
250114184Sgabeblack@google.com  }
250214184Sgabeblack@google.com
250314184Sgabeblack@google.com  transition(S1_C, NB_AckWB, S1) {L2TagArrayWrite} {
250414184Sgabeblack@google.com    ss_sendStaleNotification;
250514184Sgabeblack@google.com    sdv_sendDoneValid;
250614184Sgabeblack@google.com    pr_popResponseQueue;
250714184Sgabeblack@google.com  }
250814184Sgabeblack@google.com
250914184Sgabeblack@google.com  transition(S_C, NB_AckWB, S) {L2TagArrayWrite} {
251014184Sgabeblack@google.com    ss_sendStaleNotification;
251114184Sgabeblack@google.com    sdv_sendDoneValid;
251214184Sgabeblack@google.com    pr_popResponseQueue;
251314184Sgabeblack@google.com  }
251414184Sgabeblack@google.com
251514184Sgabeblack@google.com  // Begin Probe Transitions
251614184Sgabeblack@google.com
251714184Sgabeblack@google.com  transition({Ms, M0, M1, O}, {PrbInvData, PrbInvDataDemand}, I) {L2TagArrayRead, L2TagArrayWrite, L2DataArrayRead} {
251814184Sgabeblack@google.com    forward_eviction_to_cpu0;
251914184Sgabeblack@google.com    forward_eviction_to_cpu1;
252014184Sgabeblack@google.com    pd_sendProbeResponseData;
252114184Sgabeblack@google.com    i2_invL2;
252214184Sgabeblack@google.com    ib_invBothClusters;
252314184Sgabeblack@google.com    pp_popProbeQueue;
252414184Sgabeblack@google.com  }
252514184Sgabeblack@google.com
252614184Sgabeblack@google.com  transition({Es, E0, E1, S, I}, {PrbInvData, PrbInvDataDemand}, I) {L2TagArrayRead, L2TagArrayWrite} {
252714184Sgabeblack@google.com    forward_eviction_to_cpu0;
252814184Sgabeblack@google.com    forward_eviction_to_cpu1;
252914184Sgabeblack@google.com    pi_sendProbeResponseInv;
253014184Sgabeblack@google.com    i2_invL2;
253114184Sgabeblack@google.com    ib_invBothClusters;
253214184Sgabeblack@google.com    ii_invIcache;  // only relevant for S
253314184Sgabeblack@google.com    pp_popProbeQueue;
253414184Sgabeblack@google.com  }
253514184Sgabeblack@google.com
253614184Sgabeblack@google.com  transition(S_C, {PrbInvData, PrbInvDataDemand}, I_C) {L2TagArrayWrite} {
253714184Sgabeblack@google.com    t_allocateTBE;
253814184Sgabeblack@google.com    forward_eviction_to_cpu0;
253914184Sgabeblack@google.com    forward_eviction_to_cpu1;
254014184Sgabeblack@google.com    pi_sendProbeResponseInv;
254114184Sgabeblack@google.com    i2_invL2;
254214184Sgabeblack@google.com    ib_invBothClusters;
254314184Sgabeblack@google.com    ii_invIcache;
254414184Sgabeblack@google.com    pp_popProbeQueue;
254514184Sgabeblack@google.com  }
254614184Sgabeblack@google.com
254714184Sgabeblack@google.com  transition(I_C, {PrbInvData, PrbInvDataDemand}, I_C) {} {
254814184Sgabeblack@google.com    pi_sendProbeResponseInv;
254914184Sgabeblack@google.com    ib_invBothClusters;
255014184Sgabeblack@google.com    pp_popProbeQueue;
255114184Sgabeblack@google.com  }
255214184Sgabeblack@google.com
255314184Sgabeblack@google.com  transition({Ms, M0, M1, O, Es, E0, E1, S, I}, PrbInv, I) {L2TagArrayRead, L2TagArrayWrite} {
255414184Sgabeblack@google.com    forward_eviction_to_cpu0;
255514184Sgabeblack@google.com    forward_eviction_to_cpu1;
255614184Sgabeblack@google.com    pi_sendProbeResponseInv;
255714184Sgabeblack@google.com    i2_invL2; // nothing will happen in I
255814184Sgabeblack@google.com    ib_invBothClusters;
255914184Sgabeblack@google.com    ii_invIcache;
256014184Sgabeblack@google.com    pp_popProbeQueue;
256114184Sgabeblack@google.com  }
256214184Sgabeblack@google.com
256314184Sgabeblack@google.com  transition(S_C, PrbInv, I_C) {L2TagArrayWrite} {
256414184Sgabeblack@google.com    t_allocateTBE;
256514184Sgabeblack@google.com    forward_eviction_to_cpu0;
256614184Sgabeblack@google.com    forward_eviction_to_cpu1;
256714184Sgabeblack@google.com    pi_sendProbeResponseInv;
256814184Sgabeblack@google.com    i2_invL2;
256914184Sgabeblack@google.com    ib_invBothClusters;
257014184Sgabeblack@google.com    ii_invIcache;
257114184Sgabeblack@google.com    pp_popProbeQueue;
257214184Sgabeblack@google.com  }
257314184Sgabeblack@google.com
257414184Sgabeblack@google.com  transition(I_C, PrbInv, I_C) {} {
257514184Sgabeblack@google.com    pi_sendProbeResponseInv;
257614184Sgabeblack@google.com    ib_invBothClusters;
257714184Sgabeblack@google.com    ii_invIcache;
257814184Sgabeblack@google.com    pp_popProbeQueue;
257914184Sgabeblack@google.com  }
258014184Sgabeblack@google.com
258114184Sgabeblack@google.com  transition({Ms, M0, M1, O}, {PrbShrData, PrbShrDataDemand}, O) {L2TagArrayRead, L2TagArrayWrite, L2DataArrayRead} {
258214184Sgabeblack@google.com    pd_sendProbeResponseData;
258314184Sgabeblack@google.com    pp_popProbeQueue;
258414184Sgabeblack@google.com  }
258514184Sgabeblack@google.com
258614184Sgabeblack@google.com  transition({Es, E0, E1, S}, {PrbShrData, PrbShrDataDemand}, S) {L2TagArrayRead, L2TagArrayWrite} {
258714184Sgabeblack@google.com    ph_sendProbeResponseHit;
258814184Sgabeblack@google.com    pp_popProbeQueue;
258914184Sgabeblack@google.com  }
259014184Sgabeblack@google.com
259114184Sgabeblack@google.com  transition(S_C, {PrbShrData, PrbShrDataDemand}) {} {
259214184Sgabeblack@google.com    ph_sendProbeResponseHit;
259314184Sgabeblack@google.com    pp_popProbeQueue;
259414184Sgabeblack@google.com  }
259514184Sgabeblack@google.com
259614184Sgabeblack@google.com  transition({I, I_C}, {PrbShrData, PrbShrDataDemand}) {L2TagArrayRead} {
259714184Sgabeblack@google.com    pb_sendProbeResponseBackprobe;
259814184Sgabeblack@google.com    pp_popProbeQueue;
259914184Sgabeblack@google.com  }
260014184Sgabeblack@google.com
260114184Sgabeblack@google.com  transition({I_M0, I_E0S}, {PrbInv, PrbInvData, PrbInvDataDemand}) {} {
260214184Sgabeblack@google.com    pi_sendProbeResponseInv;
260314184Sgabeblack@google.com    ib_invBothClusters;  // must invalidate current data (only relevant for I_M0)
260414184Sgabeblack@google.com    a0_allocateL1D;  // but make sure there is room for incoming data when it arrives
260514184Sgabeblack@google.com    pp_popProbeQueue;
260614184Sgabeblack@google.com  }
260714184Sgabeblack@google.com
260814184Sgabeblack@google.com  transition({I_M1, I_E1S}, {PrbInv, PrbInvData, PrbInvDataDemand}) {} {
260914184Sgabeblack@google.com    pi_sendProbeResponseInv;
261014184Sgabeblack@google.com    ib_invBothClusters; // must invalidate current data (only relevant for I_M1)
261114184Sgabeblack@google.com    a1_allocateL1D;  // but make sure there is room for incoming data when it arrives
261214184Sgabeblack@google.com    pp_popProbeQueue;
261314184Sgabeblack@google.com  }
261414184Sgabeblack@google.com
261514184Sgabeblack@google.com  transition({I_M0M1, I_M1M0, I_M0Ms, I_M1Ms, I_ES}, {PrbInv, PrbInvData, PrbInvDataDemand, PrbShrData, PrbShrDataDemand}) {} {
261614184Sgabeblack@google.com    pi_sendProbeResponseInv;
261714184Sgabeblack@google.com    ib_invBothClusters;
261814184Sgabeblack@google.com    a0_allocateL1D;
261914184Sgabeblack@google.com    a1_allocateL1D;
262014184Sgabeblack@google.com    pp_popProbeQueue;
262114184Sgabeblack@google.com  }
262214184Sgabeblack@google.com
262314184Sgabeblack@google.com  transition({I_M0, I_E0S, I_M1, I_E1S}, {PrbShrData, PrbShrDataDemand}) {} {
262414184Sgabeblack@google.com    pb_sendProbeResponseBackprobe;
262514184Sgabeblack@google.com    pp_popProbeQueue;
262614184Sgabeblack@google.com  }
262714184Sgabeblack@google.com
262814184Sgabeblack@google.com  transition(ES_I, {PrbInvData, PrbInvDataDemand}, I_C) {} {
262914184Sgabeblack@google.com    pi_sendProbeResponseInv;
263014184Sgabeblack@google.com    ib_invBothClusters;
263114184Sgabeblack@google.com    ii_invIcache;
263214184Sgabeblack@google.com    pp_popProbeQueue;
263314184Sgabeblack@google.com  }
263414184Sgabeblack@google.com
263514184Sgabeblack@google.com  transition(MO_I, {PrbInvData, PrbInvDataDemand}, I_C) {} {
263614184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
263714184Sgabeblack@google.com    ib_invBothClusters;
263814184Sgabeblack@google.com    ii_invIcache;
263914184Sgabeblack@google.com    pp_popProbeQueue;
264014184Sgabeblack@google.com  }
264114184Sgabeblack@google.com
264214184Sgabeblack@google.com  transition(MO_I, PrbInv, I_C) {} {
264314184Sgabeblack@google.com    pi_sendProbeResponseInv;
264414184Sgabeblack@google.com    ib_invBothClusters;
264514184Sgabeblack@google.com    ii_invIcache;
264614184Sgabeblack@google.com    pp_popProbeQueue;
264714184Sgabeblack@google.com  }
264814184Sgabeblack@google.com
264914184Sgabeblack@google.com  transition(ES_I, PrbInv, I_C) {} {
265014184Sgabeblack@google.com    pi_sendProbeResponseInv;
265114184Sgabeblack@google.com    ib_invBothClusters;
265214184Sgabeblack@google.com    ii_invIcache;
265314184Sgabeblack@google.com    pp_popProbeQueue;
265414184Sgabeblack@google.com  }
265514184Sgabeblack@google.com
265614184Sgabeblack@google.com  transition(ES_I, {PrbShrData, PrbShrDataDemand}, ES_I) {} {
265714184Sgabeblack@google.com    ph_sendProbeResponseHit;
265814184Sgabeblack@google.com    s_setSharedFlip;
265914184Sgabeblack@google.com    pp_popProbeQueue;
266014184Sgabeblack@google.com  }
266114184Sgabeblack@google.com
266214184Sgabeblack@google.com  transition(MO_I, {PrbShrData, PrbShrDataDemand}, MO_I) {} {
266314184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
266414184Sgabeblack@google.com    s_setSharedFlip;
266514184Sgabeblack@google.com    pp_popProbeQueue;
266614184Sgabeblack@google.com  }
266714184Sgabeblack@google.com
266814184Sgabeblack@google.com  transition(MO_S0, {PrbInvData, PrbInvDataDemand}, S0_C) {L2TagArrayWrite} {
266914184Sgabeblack@google.com    forward_eviction_to_cpu0;
267014184Sgabeblack@google.com    forward_eviction_to_cpu1;
267114184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
267214184Sgabeblack@google.com    i2_invL2;
267314184Sgabeblack@google.com    a2_allocateL2;
267414184Sgabeblack@google.com    nS_issueRdBlkS;
267514184Sgabeblack@google.com    d_deallocateTBE;
267614184Sgabeblack@google.com    pp_popProbeQueue;
267714184Sgabeblack@google.com  }
267814184Sgabeblack@google.com
267914184Sgabeblack@google.com  transition(MO_S1, {PrbInvData, PrbInvDataDemand}, S1_C) {} {
268014184Sgabeblack@google.com    forward_eviction_to_cpu0;
268114184Sgabeblack@google.com    forward_eviction_to_cpu1;
268214184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
268314184Sgabeblack@google.com    i2_invL2;
268414184Sgabeblack@google.com    a2_allocateL2;
268514184Sgabeblack@google.com    nS_issueRdBlkS;
268614184Sgabeblack@google.com    d_deallocateTBE;
268714184Sgabeblack@google.com    pp_popProbeQueue;
268814184Sgabeblack@google.com  }
268914184Sgabeblack@google.com
269014184Sgabeblack@google.com  transition(MO_S0, PrbInv, S0_C) {L2TagArrayWrite} {
269114184Sgabeblack@google.com    forward_eviction_to_cpu0;
269214184Sgabeblack@google.com    forward_eviction_to_cpu1;
269314184Sgabeblack@google.com    pi_sendProbeResponseInv;
269414184Sgabeblack@google.com    i2_invL2;
269514184Sgabeblack@google.com    a2_allocateL2;
269614184Sgabeblack@google.com    nS_issueRdBlkS;
269714184Sgabeblack@google.com    d_deallocateTBE;
269814184Sgabeblack@google.com    pp_popProbeQueue;
269914184Sgabeblack@google.com  }
270014184Sgabeblack@google.com
270114184Sgabeblack@google.com  transition(MO_S1, PrbInv, S1_C) {L2TagArrayWrite} {
270214184Sgabeblack@google.com    forward_eviction_to_cpu0;
270314184Sgabeblack@google.com    forward_eviction_to_cpu1;
270414184Sgabeblack@google.com    pi_sendProbeResponseInv;
270514184Sgabeblack@google.com    i2_invL2;
270614184Sgabeblack@google.com    a2_allocateL2;
270714184Sgabeblack@google.com    nS_issueRdBlkS;
270814184Sgabeblack@google.com    d_deallocateTBE;
270914184Sgabeblack@google.com    pp_popProbeQueue;
271014184Sgabeblack@google.com  }
271114184Sgabeblack@google.com
271214184Sgabeblack@google.com  transition({MO_S0, MO_S1}, {PrbShrData, PrbShrDataDemand}) {} {
271314184Sgabeblack@google.com    pdt_sendProbeResponseDataFromTBE;
271414184Sgabeblack@google.com    s_setSharedFlip;
271514184Sgabeblack@google.com    pp_popProbeQueue;
271614184Sgabeblack@google.com  }
271714184Sgabeblack@google.com
271814184Sgabeblack@google.com  transition({S_F0, Es_F0, E0_F, E1_Es}, {PrbInvData, PrbInvDataDemand, PrbInv}, IF_E0S) {} {
271914184Sgabeblack@google.com    forward_eviction_to_cpu0;
272014184Sgabeblack@google.com    forward_eviction_to_cpu1;
272114184Sgabeblack@google.com    pi_sendProbeResponseInv;
272214184Sgabeblack@google.com    // invalidate everything you've got
272314184Sgabeblack@google.com    ib_invBothClusters;
272414184Sgabeblack@google.com    ii_invIcache;
272514184Sgabeblack@google.com    i2_invL2;
272614184Sgabeblack@google.com    // but make sure you have room for what you need from the fill
272714184Sgabeblack@google.com    a0_allocateL1D;
272814184Sgabeblack@google.com    a2_allocateL2;
272914184Sgabeblack@google.com    n_issueRdBlk;
273014184Sgabeblack@google.com    pp_popProbeQueue;
273114184Sgabeblack@google.com  }
273214184Sgabeblack@google.com
273314184Sgabeblack@google.com  transition({S_F1, Es_F1, E1_F, E0_Es}, {PrbInvData, PrbInvDataDemand, PrbInv}, IF_E1S) {} {
273414184Sgabeblack@google.com    forward_eviction_to_cpu0;
273514184Sgabeblack@google.com    forward_eviction_to_cpu1;
273614184Sgabeblack@google.com    pi_sendProbeResponseInv;
273714184Sgabeblack@google.com    // invalidate everything you've got
273814184Sgabeblack@google.com    ib_invBothClusters;
273914184Sgabeblack@google.com    ii_invIcache;
274014184Sgabeblack@google.com    i2_invL2;
274114184Sgabeblack@google.com    // but make sure you have room for what you need from the fill
274214184Sgabeblack@google.com    a1_allocateL1D;
274314184Sgabeblack@google.com    a2_allocateL2;
274414184Sgabeblack@google.com    n_issueRdBlk;
274514184Sgabeblack@google.com    pp_popProbeQueue;
274614184Sgabeblack@google.com  }
274714184Sgabeblack@google.com
274814184Sgabeblack@google.com  transition({S_F, Es_F}, {PrbInvData, PrbInvDataDemand, PrbInv}, IF_ES) {} {
274914184Sgabeblack@google.com    forward_eviction_to_cpu0;
275014184Sgabeblack@google.com    forward_eviction_to_cpu1;
275114184Sgabeblack@google.com    pi_sendProbeResponseInv;
275214184Sgabeblack@google.com    // invalidate everything you've got
275314184Sgabeblack@google.com    ib_invBothClusters;
275414184Sgabeblack@google.com    ii_invIcache;
275514184Sgabeblack@google.com    i2_invL2;
275614184Sgabeblack@google.com    // but make sure you have room for what you need from the fill
275714184Sgabeblack@google.com    a0_allocateL1D;
275814184Sgabeblack@google.com    a1_allocateL1D;
275914184Sgabeblack@google.com    a2_allocateL2;
276014184Sgabeblack@google.com    n_issueRdBlk;
276114184Sgabeblack@google.com    pp_popProbeQueue;
276214184Sgabeblack@google.com  }
276314184Sgabeblack@google.com
276414184Sgabeblack@google.com  transition(Si_F0, {PrbInvData, PrbInvDataDemand, PrbInv}, F_S0) {} {
276514184Sgabeblack@google.com    forward_eviction_to_cpu0;
276614184Sgabeblack@google.com    forward_eviction_to_cpu1;
276714184Sgabeblack@google.com    pi_sendProbeResponseInv;
276814184Sgabeblack@google.com    ib_invBothClusters;
276914184Sgabeblack@google.com    ii_invIcache;
277014184Sgabeblack@google.com    i2_invL2;
277114184Sgabeblack@google.com    ai_allocateL1I;
277214184Sgabeblack@google.com    a2_allocateL2;
277314184Sgabeblack@google.com    nS_issueRdBlkS;
277414184Sgabeblack@google.com    pp_popProbeQueue;
277514184Sgabeblack@google.com  }
277614184Sgabeblack@google.com
277714184Sgabeblack@google.com  transition(Si_F1, {PrbInvData, PrbInvDataDemand, PrbInv}, F_S1) {} {
277814184Sgabeblack@google.com    forward_eviction_to_cpu0;
277914184Sgabeblack@google.com    forward_eviction_to_cpu1;
278014184Sgabeblack@google.com    pi_sendProbeResponseInv;
278114184Sgabeblack@google.com    ib_invBothClusters;
278214184Sgabeblack@google.com    ii_invIcache;
278314184Sgabeblack@google.com    i2_invL2;
278414184Sgabeblack@google.com    ai_allocateL1I;
278514184Sgabeblack@google.com    a2_allocateL2;
278614184Sgabeblack@google.com    nS_issueRdBlkS;
278714184Sgabeblack@google.com    pp_popProbeQueue;
278814184Sgabeblack@google.com  }
278914184Sgabeblack@google.com
279014184Sgabeblack@google.com  transition({Es_F0, E0_F, E1_Es}, {PrbShrData, PrbShrDataDemand}, S_F0) {} {
279114184Sgabeblack@google.com    ph_sendProbeResponseHit;
279214184Sgabeblack@google.com    pp_popProbeQueue;
279314184Sgabeblack@google.com  }
279414184Sgabeblack@google.com
279514184Sgabeblack@google.com  transition({Es_F1, E1_F, E0_Es}, {PrbShrData, PrbShrDataDemand}, S_F1) {} {
279614184Sgabeblack@google.com    ph_sendProbeResponseHit;
279714184Sgabeblack@google.com    pp_popProbeQueue;
279814184Sgabeblack@google.com  }
279914184Sgabeblack@google.com
280014184Sgabeblack@google.com  transition(Es_F, {PrbShrData, PrbShrDataDemand}, S_F) {} {
280114184Sgabeblack@google.com    ph_sendProbeResponseHit;
280214184Sgabeblack@google.com    pp_popProbeQueue;
280314184Sgabeblack@google.com  }
280414184Sgabeblack@google.com
280514184Sgabeblack@google.com  transition({S_F0, S_F1, S_F, Si_F0, Si_F1}, {PrbShrData, PrbShrDataDemand}) {} {
280614184Sgabeblack@google.com    ph_sendProbeResponseHit;
280714184Sgabeblack@google.com    pp_popProbeQueue;
280814184Sgabeblack@google.com  }
280914184Sgabeblack@google.com
281014184Sgabeblack@google.com  transition(S_M0, {PrbInvData, PrbInvDataDemand}, I_M0) {} {
281114184Sgabeblack@google.com    forward_eviction_to_cpu0;
281214184Sgabeblack@google.com    forward_eviction_to_cpu1;
281314184Sgabeblack@google.com    pim_sendProbeResponseInvMs;
281414184Sgabeblack@google.com    ib_invBothClusters;
281514184Sgabeblack@google.com    ii_invIcache;
281614184Sgabeblack@google.com    i2_invL2;
281714184Sgabeblack@google.com    a0_allocateL1D;
281814184Sgabeblack@google.com    a2_allocateL2;
281914184Sgabeblack@google.com    pp_popProbeQueue;
282014184Sgabeblack@google.com  }
282114184Sgabeblack@google.com
282214184Sgabeblack@google.com  transition(O_M0, {PrbInvData, PrbInvDataDemand}, I_M0) {L2DataArrayRead} {
282314184Sgabeblack@google.com    forward_eviction_to_cpu0;
282414184Sgabeblack@google.com    forward_eviction_to_cpu1;
282514184Sgabeblack@google.com    pdm_sendProbeResponseDataMs;
282614184Sgabeblack@google.com    ib_invBothClusters;
282714184Sgabeblack@google.com    ii_invIcache;
282814184Sgabeblack@google.com    i2_invL2;
282914184Sgabeblack@google.com    a0_allocateL1D;
283014184Sgabeblack@google.com    a2_allocateL2;
283114184Sgabeblack@google.com    pp_popProbeQueue;
283214184Sgabeblack@google.com  }
283314184Sgabeblack@google.com
283414184Sgabeblack@google.com  transition({S_M0, O_M0}, {PrbInv}, I_M0) {} {
283514184Sgabeblack@google.com    forward_eviction_to_cpu0;
283614184Sgabeblack@google.com    forward_eviction_to_cpu1;
283714184Sgabeblack@google.com    pim_sendProbeResponseInvMs;
283814184Sgabeblack@google.com    ib_invBothClusters;
283914184Sgabeblack@google.com    ii_invIcache;
284014184Sgabeblack@google.com    i2_invL2;
284114184Sgabeblack@google.com    a0_allocateL1D;
284214184Sgabeblack@google.com    a2_allocateL2;
284314184Sgabeblack@google.com    pp_popProbeQueue;
284414184Sgabeblack@google.com  }
284514184Sgabeblack@google.com
284614184Sgabeblack@google.com  transition(S_M1, {PrbInvData, PrbInvDataDemand}, I_M1) {} {
284714184Sgabeblack@google.com    forward_eviction_to_cpu0;
284814184Sgabeblack@google.com    forward_eviction_to_cpu1;
284914184Sgabeblack@google.com    pim_sendProbeResponseInvMs;
285014184Sgabeblack@google.com    ib_invBothClusters;
285114184Sgabeblack@google.com    ii_invIcache;
285214184Sgabeblack@google.com    i2_invL2;
285314184Sgabeblack@google.com    a1_allocateL1D;
285414184Sgabeblack@google.com    a2_allocateL2;
285514184Sgabeblack@google.com    pp_popProbeQueue;
285614184Sgabeblack@google.com  }
285714184Sgabeblack@google.com
285814184Sgabeblack@google.com  transition(O_M1, {PrbInvData, PrbInvDataDemand}, I_M1) {} {
285914184Sgabeblack@google.com    forward_eviction_to_cpu0;
286014184Sgabeblack@google.com    forward_eviction_to_cpu1;
286114184Sgabeblack@google.com    pdm_sendProbeResponseDataMs;
286214184Sgabeblack@google.com    ib_invBothClusters;
286314184Sgabeblack@google.com    ii_invIcache;
286414184Sgabeblack@google.com    i2_invL2;
286514184Sgabeblack@google.com    a1_allocateL1D;
286614184Sgabeblack@google.com    a2_allocateL2;
286714184Sgabeblack@google.com    pp_popProbeQueue;
286814184Sgabeblack@google.com  }
286914184Sgabeblack@google.com
287014184Sgabeblack@google.com  transition({S_M1, O_M1}, {PrbInv}, I_M1) {} {
287114184Sgabeblack@google.com    forward_eviction_to_cpu0;
287214184Sgabeblack@google.com    forward_eviction_to_cpu1;
287314184Sgabeblack@google.com    pim_sendProbeResponseInvMs;
287414184Sgabeblack@google.com    ib_invBothClusters;
287514184Sgabeblack@google.com    ii_invIcache;
287614184Sgabeblack@google.com    i2_invL2;
287714184Sgabeblack@google.com    a1_allocateL1D;
287814184Sgabeblack@google.com    a2_allocateL2;
287914184Sgabeblack@google.com    pp_popProbeQueue;
288014184Sgabeblack@google.com  }
288114184Sgabeblack@google.com
288214184Sgabeblack@google.com  transition({S0, S0_C}, {PrbInvData, PrbInvDataDemand, PrbInv}) {} {
288314184Sgabeblack@google.com    forward_eviction_to_cpu0;
288414184Sgabeblack@google.com    forward_eviction_to_cpu1;
288514184Sgabeblack@google.com    pi_sendProbeResponseInv;
288614184Sgabeblack@google.com    ib_invBothClusters;
288714184Sgabeblack@google.com    ii_invIcache;
288814184Sgabeblack@google.com    i2_invL2;
288914184Sgabeblack@google.com    ai_allocateL1I;
289014184Sgabeblack@google.com    a2_allocateL2;
289114184Sgabeblack@google.com    pp_popProbeQueue;
289214184Sgabeblack@google.com  }
289314184Sgabeblack@google.com
289414184Sgabeblack@google.com  transition({S1, S1_C}, {PrbInvData, PrbInvDataDemand, PrbInv}) {} {
289514184Sgabeblack@google.com    forward_eviction_to_cpu0;
289614184Sgabeblack@google.com    forward_eviction_to_cpu1;
289714184Sgabeblack@google.com    pi_sendProbeResponseInv;
289814184Sgabeblack@google.com    ib_invBothClusters;
289914184Sgabeblack@google.com    ii_invIcache;
290014184Sgabeblack@google.com    i2_invL2;
290114184Sgabeblack@google.com    ai_allocateL1I;
290214184Sgabeblack@google.com    a2_allocateL2;
290314184Sgabeblack@google.com    pp_popProbeQueue;
290414184Sgabeblack@google.com  }
290514184Sgabeblack@google.com
290614184Sgabeblack@google.com  transition({S_M0, S_M1}, {PrbShrData, PrbShrDataDemand}) {} {
290714184Sgabeblack@google.com    ph_sendProbeResponseHit;
290814184Sgabeblack@google.com    pp_popProbeQueue;
290914184Sgabeblack@google.com  }
291014184Sgabeblack@google.com
291114184Sgabeblack@google.com  transition({O_M0, O_M1}, {PrbShrData, PrbShrDataDemand}) {L2DataArrayRead} {
291214184Sgabeblack@google.com    pd_sendProbeResponseData;
291314184Sgabeblack@google.com    pp_popProbeQueue;
291414184Sgabeblack@google.com  }
291514184Sgabeblack@google.com
291614184Sgabeblack@google.com  transition({S0, S1, S0_C, S1_C}, {PrbShrData, PrbShrDataDemand}) {} {
291714184Sgabeblack@google.com    pb_sendProbeResponseBackprobe;
291814184Sgabeblack@google.com    pp_popProbeQueue;
291914184Sgabeblack@google.com  }
292014184Sgabeblack@google.com
292114184Sgabeblack@google.com  transition({Ms_F0, M0_F, M1_Ms, O_F0}, {PrbInvData, PrbInvDataDemand}, IF_E0S) {L2DataArrayRead} {
292214184Sgabeblack@google.com    forward_eviction_to_cpu0;
292314184Sgabeblack@google.com    forward_eviction_to_cpu1;
292414184Sgabeblack@google.com    pd_sendProbeResponseData;
292514184Sgabeblack@google.com    ib_invBothClusters;
292614184Sgabeblack@google.com    i2_invL2;
292714184Sgabeblack@google.com    a0_allocateL1D;
292814184Sgabeblack@google.com    a2_allocateL2;
292914184Sgabeblack@google.com    n_issueRdBlk;
293014184Sgabeblack@google.com    pp_popProbeQueue;
293114184Sgabeblack@google.com  }
293214184Sgabeblack@google.com
293314184Sgabeblack@google.com  transition({Ms_F1, M1_F, M0_Ms, O_F1}, {PrbInvData, PrbInvDataDemand}, IF_E1S) {L2DataArrayRead} {
293414184Sgabeblack@google.com    forward_eviction_to_cpu0;
293514184Sgabeblack@google.com    forward_eviction_to_cpu1;
293614184Sgabeblack@google.com    pd_sendProbeResponseData;
293714184Sgabeblack@google.com    ib_invBothClusters;
293814184Sgabeblack@google.com    i2_invL2;
293914184Sgabeblack@google.com    a1_allocateL1D;
294014184Sgabeblack@google.com    a2_allocateL2;
294114184Sgabeblack@google.com    n_issueRdBlk;
294214184Sgabeblack@google.com    pp_popProbeQueue;
294314184Sgabeblack@google.com  }
294414184Sgabeblack@google.com
294514184Sgabeblack@google.com  transition({Ms_F, O_F}, {PrbInvData, PrbInvDataDemand}, IF_ES) {L2DataArrayRead} {
294614184Sgabeblack@google.com    forward_eviction_to_cpu0;
294714184Sgabeblack@google.com    forward_eviction_to_cpu1;
294814184Sgabeblack@google.com    pd_sendProbeResponseData;
294914184Sgabeblack@google.com    ib_invBothClusters;
295014184Sgabeblack@google.com    i2_invL2;
295114184Sgabeblack@google.com    a0_allocateL1D;
295214184Sgabeblack@google.com    a1_allocateL1D;
295314184Sgabeblack@google.com    a2_allocateL2;
295414184Sgabeblack@google.com    n_issueRdBlk;
295514184Sgabeblack@google.com    pp_popProbeQueue;
295614184Sgabeblack@google.com  }
295714184Sgabeblack@google.com
295814184Sgabeblack@google.com  transition({Ms_F0, M0_F, M1_Ms, O_F0}, PrbInv, IF_E0S) {} {
295914184Sgabeblack@google.com    forward_eviction_to_cpu0;
296014184Sgabeblack@google.com    forward_eviction_to_cpu1;
296114184Sgabeblack@google.com    pi_sendProbeResponseInv;
296214184Sgabeblack@google.com    ib_invBothClusters;
296314184Sgabeblack@google.com    i2_invL2;
296414184Sgabeblack@google.com    a0_allocateL1D;
296514184Sgabeblack@google.com    a2_allocateL2;
296614184Sgabeblack@google.com    n_issueRdBlk;
296714184Sgabeblack@google.com    pp_popProbeQueue;
296814184Sgabeblack@google.com  }
296914184Sgabeblack@google.com
297014184Sgabeblack@google.com  transition({Ms_F1, M1_F, M0_Ms, O_F1}, PrbInv, IF_E1S) {} {
297114184Sgabeblack@google.com    forward_eviction_to_cpu0;
297214184Sgabeblack@google.com    forward_eviction_to_cpu1;
297314184Sgabeblack@google.com    pi_sendProbeResponseInv;
297414184Sgabeblack@google.com    ib_invBothClusters;
297514184Sgabeblack@google.com    i2_invL2;
297614184Sgabeblack@google.com    a1_allocateL1D;
297714184Sgabeblack@google.com    a2_allocateL2;
297814184Sgabeblack@google.com    n_issueRdBlk;
297914184Sgabeblack@google.com    pp_popProbeQueue;
298014184Sgabeblack@google.com  }
298114184Sgabeblack@google.com
298214184Sgabeblack@google.com  transition({Ms_F, O_F}, PrbInv, IF_ES) {} {
298314184Sgabeblack@google.com    forward_eviction_to_cpu0;
298414184Sgabeblack@google.com    forward_eviction_to_cpu1;
298514184Sgabeblack@google.com    pi_sendProbeResponseInv;
298614184Sgabeblack@google.com    ib_invBothClusters;
298714184Sgabeblack@google.com    i2_invL2;
298814184Sgabeblack@google.com    a0_allocateL1D;
298914184Sgabeblack@google.com    a1_allocateL1D;
299014184Sgabeblack@google.com    a2_allocateL2;
299114184Sgabeblack@google.com    n_issueRdBlk;
299214184Sgabeblack@google.com    pp_popProbeQueue;
299314184Sgabeblack@google.com  }
299414184Sgabeblack@google.com
299514184Sgabeblack@google.com  transition({Ms_F0, M0_F, M1_Ms}, {PrbShrData, PrbShrDataDemand}, O_F0) {L2DataArrayRead} {
299614184Sgabeblack@google.com    pd_sendProbeResponseData;
299714184Sgabeblack@google.com    pp_popProbeQueue;
299814184Sgabeblack@google.com  }
299914184Sgabeblack@google.com
300014184Sgabeblack@google.com  transition({Ms_F1, M1_F, M0_Ms}, {PrbShrData, PrbShrDataDemand}, O_F1) {} {
300114184Sgabeblack@google.com  }
300214184Sgabeblack@google.com
300314184Sgabeblack@google.com  transition({Ms_F}, {PrbShrData, PrbShrDataDemand}, O_F) {L2DataArrayRead} {
300414184Sgabeblack@google.com    pd_sendProbeResponseData;
300514184Sgabeblack@google.com    pp_popProbeQueue;
300614184Sgabeblack@google.com  }
300714184Sgabeblack@google.com
300814184Sgabeblack@google.com  transition({O_F0, O_F1, O_F}, {PrbShrData, PrbShrDataDemand}) {L2DataArrayRead} {
300914184Sgabeblack@google.com    pd_sendProbeResponseData;
301014184Sgabeblack@google.com    pp_popProbeQueue;
301114184Sgabeblack@google.com  }
301214184Sgabeblack@google.com
301314184Sgabeblack@google.com  // END TRANSITIONS
301414184Sgabeblack@google.com}
301514184Sgabeblack@google.com
301614184Sgabeblack@google.com
3017