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.com
3714184Sgabeblack@google.comenumeration(CoherenceRequestType, desc="Coherence Request Types") {
3814184Sgabeblack@google.com  // CPU Request Types ONLY
3914184Sgabeblack@google.com  RdBlk,        desc="Read Blk";
4014184Sgabeblack@google.com  RdBlkM,       desc="Read Blk Modified";
4114184Sgabeblack@google.com  RdBlkS,       desc="Read Blk Shared";
4214184Sgabeblack@google.com  CtoD,         desc="Change To Dirty";
4314184Sgabeblack@google.com  VicClean,     desc="L2 clean eviction";
4414184Sgabeblack@google.com  VicDirty,     desc="L2 dirty eviction";
4514184Sgabeblack@google.com  Atomic,       desc="Upper level atomic";
4614184Sgabeblack@google.com  AtomicWriteBack, desc="Upper level atomic";
4714184Sgabeblack@google.com  WriteThrough, desc="Ordered WriteThrough w/Data";
4814184Sgabeblack@google.com  WriteThroughFifo, desc="WriteThrough with no data";
4914184Sgabeblack@google.com  WriteThroughDummy, desc="WriteThrough with no data for atomic operation";
5014184Sgabeblack@google.com  WriteFlush,   desc="Release Flush";
5114184Sgabeblack@google.com
5214184Sgabeblack@google.com  WrCancel,     desc="want to cancel WB to Memory"; // should this be here?
5314184Sgabeblack@google.com
5414184Sgabeblack@google.com  WBApproval,   desc="WB Approval";
5514184Sgabeblack@google.com
5614184Sgabeblack@google.com  // Messages between Dir and R-Dir
5714184Sgabeblack@google.com  ForceInv,     desc="Send invalide to the block";
5814184Sgabeblack@google.com  ForceDowngrade, desc="Send downgrade to the block";
5914184Sgabeblack@google.com  Unblock,      desc="Used to let the dir know a message has been sunk";
6014184Sgabeblack@google.com
6114184Sgabeblack@google.com  // Messages between R-Dir and R-Buffer
6214184Sgabeblack@google.com  PrivateNotify, desc="Let region buffer know it has private access";
6314184Sgabeblack@google.com  SharedNotify,  desc="Let region buffer know it has shared access";
6414184Sgabeblack@google.com  WbNotify,      desc="Let region buffer know it saw its wb request";
6514184Sgabeblack@google.com  Downgrade,     desc="Force the region buffer to downgrade to shared";
6614184Sgabeblack@google.com  // Response to R-Dir (probably should be on a different network, but
6714184Sgabeblack@google.com  // I need it to be ordered with respect to requests)
6814184Sgabeblack@google.com  InvAck,       desc="Let the R-Dir know when the inv has occured";
6914184Sgabeblack@google.com
7014184Sgabeblack@google.com  PrivateRequest, desc="R-buf wants the region in private";
7114184Sgabeblack@google.com  UpgradeRequest, desc="R-buf wants the region in private";
7214184Sgabeblack@google.com  SharedRequest,  desc="R-buf wants the region in shared (could respond with private)";
7314184Sgabeblack@google.com  CleanWbRequest, desc="R-buf wants to deallocate clean region";
7414184Sgabeblack@google.com
7514184Sgabeblack@google.com  NA,             desc="So we don't get segfaults";
7614184Sgabeblack@google.com}
7714184Sgabeblack@google.com
7814184Sgabeblack@google.comenumeration(ProbeRequestType, desc="Probe Request Types") {
7914184Sgabeblack@google.com  PrbDowngrade,    desc="Probe for Status";  // EtoS, MtoO, StoS
8014184Sgabeblack@google.com  PrbInv,       desc="Probe to Invalidate";
8114184Sgabeblack@google.com
8214184Sgabeblack@google.com  // For regions
8314184Sgabeblack@google.com  PrbRepl,      desc="Force the cache to do a replacement";
8414184Sgabeblack@google.com  PrbRegDowngrade, desc="Probe for Status";  // EtoS, MtoO, StoS
8514184Sgabeblack@google.com  PrbAtomic,    desc="Forwarded Atomic Operation";
8614184Sgabeblack@google.com}
8714184Sgabeblack@google.com
8814184Sgabeblack@google.com
8914184Sgabeblack@google.comenumeration(CoherenceResponseType, desc="Coherence Response Types") {
9014184Sgabeblack@google.com  NBSysResp,       desc="Northbridge response to CPU Rd request";
9114184Sgabeblack@google.com  NBSysWBAck,      desc="Northbridge response ok to WB";
9214184Sgabeblack@google.com  TDSysResp,       desc="TCCdirectory response to CPU Rd request";
9314184Sgabeblack@google.com  TDSysWBAck,      desc="TCCdirectory response ok to WB";
9414184Sgabeblack@google.com  TDSysWBNack,     desc="TCCdirectory response ok to drop";
9514184Sgabeblack@google.com  CPUPrbResp,      desc="CPU Probe Response";
9614184Sgabeblack@google.com  CPUData,         desc="CPU Data";
9714184Sgabeblack@google.com  StaleNotif,      desc="Notification of Stale WBAck, No data to writeback";
9814184Sgabeblack@google.com  CPUCancelWB,     desc="want to cancel WB to Memory";
9914184Sgabeblack@google.com  MemData,         desc="Data from Memory";
10014184Sgabeblack@google.com
10114184Sgabeblack@google.com  // for regions
10214184Sgabeblack@google.com  PrivateAck,      desc="Ack that r-buf received private notify";
10314184Sgabeblack@google.com  RegionWbAck,     desc="Writeback Ack that r-buf completed deallocation";
10414184Sgabeblack@google.com  DirReadyAck,     desc="Directory (mem ctrl)<->region dir handshake";
10514184Sgabeblack@google.com}
10614184Sgabeblack@google.com
10714184Sgabeblack@google.comenumeration(CoherenceState, default="CoherenceState_NA", desc="Coherence State") {
10814184Sgabeblack@google.com  Modified,             desc="Modified";
10914184Sgabeblack@google.com  Owned,                desc="Owned state";
11014184Sgabeblack@google.com  Exclusive,            desc="Exclusive";
11114184Sgabeblack@google.com  Shared,               desc="Shared";
11214184Sgabeblack@google.com  NA,                   desc="NA";
11314184Sgabeblack@google.com}
11414184Sgabeblack@google.com
11514184Sgabeblack@google.comstructure(CPURequestMsg, desc="...", interface="Message") {
11614184Sgabeblack@google.com  Addr addr,             desc="Physical address for this request";
11714184Sgabeblack@google.com  Addr DemandAddress,       desc="Physical block address for this request";
11814184Sgabeblack@google.com  CoherenceRequestType Type,   desc="Type of request";
11914184Sgabeblack@google.com  DataBlock DataBlk,           desc="data for the cache line";  // only for WB
12014184Sgabeblack@google.com  bool Dirty,                   desc="whether WB data is dirty";  // only for WB
12114184Sgabeblack@google.com  MachineID Requestor,            desc="Node who initiated the request";
12214184Sgabeblack@google.com  NetDest Destination,             desc="Multicast destination mask";
12314184Sgabeblack@google.com  bool Shared,                  desc="For CPU_WrVicBlk, vic is O not M.  For CPU_ClVicBlk, vic is S";
12414184Sgabeblack@google.com  MessageSizeType MessageSize, desc="size category of the message";
12514184Sgabeblack@google.com  Cycles InitialRequestTime, desc="time the initial requests was sent from the L1Cache";
12614184Sgabeblack@google.com  Cycles ForwardRequestTime, desc="time the dir forwarded the request";
12714184Sgabeblack@google.com  Cycles ProbeRequestStartTime, desc="the time the dir started the probe request";
12814184Sgabeblack@google.com  bool DemandRequest, default="false", desc="For profiling purposes";
12914184Sgabeblack@google.com
13014184Sgabeblack@google.com  NetDest Sharers,              desc="Caches that may have a valid copy of the data";
13114184Sgabeblack@google.com  bool ForceShared,             desc="R-dir knows it is shared, pass on so it sends an S copy, not E";
13214184Sgabeblack@google.com  bool Private, default="false", desc="Requestor already has private permissions, no need for dir check";
13314184Sgabeblack@google.com  bool CtoDSinked, default="false", desc="This is true if the CtoD previously sent must have been sunk";
13414184Sgabeblack@google.com
13514184Sgabeblack@google.com  bool NoAckNeeded, default="false", desc="True if region buffer doesn't need to ack";
13614184Sgabeblack@google.com  int Acks, default="0", desc="Acks that the dir (mem ctrl) should expect to receive";
13714184Sgabeblack@google.com  CoherenceRequestType OriginalType, default="CoherenceRequestType_NA",  desc="Type of request from core fwded through region buffer";
13814184Sgabeblack@google.com  WriteMask writeMask, desc="Write Through Data";
13914184Sgabeblack@google.com  MachineID WTRequestor,            desc="Node who initiated the write through";
14014184Sgabeblack@google.com  HSAScope scope,                      default="HSAScope_SYSTEM", desc="Request Scope";
14114184Sgabeblack@google.com  int wfid,                         default="0", desc="wavefront id";
14214184Sgabeblack@google.com  bool NoWriteConflict,             default="true", desc="write collided with CAB entry";
14314184Sgabeblack@google.com  int ProgramCounter,               desc="PC that accesses to this block";
14414184Sgabeblack@google.com
14514184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
14614184Sgabeblack@google.com    // Only PUTX messages contains the data block
14714184Sgabeblack@google.com    if (Type == CoherenceRequestType:VicDirty) {
14814184Sgabeblack@google.com        return testAndRead(addr, DataBlk, pkt);
14914184Sgabeblack@google.com    }
15014184Sgabeblack@google.com
15114184Sgabeblack@google.com    return false;
15214184Sgabeblack@google.com  }
15314184Sgabeblack@google.com
15414184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
15514184Sgabeblack@google.com    // No check on message type required since the protocol should
15614184Sgabeblack@google.com    // read data from those messages that contain the block
15714184Sgabeblack@google.com    return testAndWrite(addr, DataBlk, pkt);
15814184Sgabeblack@google.com  }
15914184Sgabeblack@google.com}
16014184Sgabeblack@google.com
16114184Sgabeblack@google.comstructure(NBProbeRequestMsg, desc="...", interface="Message") {
16214184Sgabeblack@google.com  Addr addr,              desc="Physical address for this request";
16314184Sgabeblack@google.com  ProbeRequestType Type,             desc="NB_PrbNxtState signal";
16414184Sgabeblack@google.com  bool ReturnData,              desc="Indicates CPU should return data";
16514184Sgabeblack@google.com  NetDest Destination,             desc="Node to whom the data is sent";
16614184Sgabeblack@google.com  MessageSizeType MessageSize, desc="size category of the message";
16714184Sgabeblack@google.com  bool DemandRequest, default="false", desc="demand request, requesting 3-hop transfer";
16814184Sgabeblack@google.com  Addr DemandAddress,        desc="Demand block address for a region request";
16914184Sgabeblack@google.com  MachineID Requestor,          desc="Requestor id for 3-hop requests";
17014184Sgabeblack@google.com  bool NoAckNeeded, default="false", desc="For short circuting acks";
17114184Sgabeblack@google.com  int ProgramCounter,           desc="PC that accesses to this block";
17214184Sgabeblack@google.com
17314184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
17414184Sgabeblack@google.com    return false;
17514184Sgabeblack@google.com  }
17614184Sgabeblack@google.com
17714184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
17814184Sgabeblack@google.com    // No check on message type required since the protocol should
17914184Sgabeblack@google.com    // read data from those messages that contain the block
18014184Sgabeblack@google.com    return false;
18114184Sgabeblack@google.com  }
18214184Sgabeblack@google.com
18314184Sgabeblack@google.com}
18414184Sgabeblack@google.com
18514184Sgabeblack@google.comstructure(TDProbeRequestMsg, desc="...", interface="Message") {
18614184Sgabeblack@google.com  Addr addr,              desc="Physical address for this request";
18714184Sgabeblack@google.com  ProbeRequestType Type,  desc="TD_PrbNxtState signal";
18814184Sgabeblack@google.com  bool ReturnData,        desc="Indicates CPU should return data";
18914184Sgabeblack@google.com  bool localCtoD,         desc="Indicates CtoD is within the GPU hierarchy (aka TCC subtree)";
19014184Sgabeblack@google.com  NetDest Destination,    desc="Node to whom the data is sent";
19114184Sgabeblack@google.com  MessageSizeType MessageSize, desc="size category of the message";
19214184Sgabeblack@google.com  int Phase,              desc="Synchronization Phase";
19314184Sgabeblack@google.com  int wfid,               desc="wavefront id for Release";
19414184Sgabeblack@google.com  MachineID Requestor,    desc="Node who initiated the request";
19514184Sgabeblack@google.com
19614184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
19714184Sgabeblack@google.com    return false;
19814184Sgabeblack@google.com  }
19914184Sgabeblack@google.com
20014184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
20114184Sgabeblack@google.com    // No check on message type required since the protocol should
20214184Sgabeblack@google.com    // read data from those messages that contain the block
20314184Sgabeblack@google.com    return false;
20414184Sgabeblack@google.com  }
20514184Sgabeblack@google.com}
20614184Sgabeblack@google.com
20714184Sgabeblack@google.com// Response Messages seemed to be easily munged into one type
20814184Sgabeblack@google.comstructure(ResponseMsg, desc="...", interface="Message") {
20914184Sgabeblack@google.com  Addr addr,             desc="Physical address for this request";
21014184Sgabeblack@google.com  CoherenceResponseType Type,  desc="NB Sys Resp or CPU Response to Probe";
21114184Sgabeblack@google.com  MachineID Sender,               desc="Node who sent the data";
21214184Sgabeblack@google.com  NetDest Destination,             desc="Node to whom the data is sent";
21314184Sgabeblack@google.com  // Begin Used Only By CPU Response
21414184Sgabeblack@google.com  DataBlock DataBlk,           desc="data for the cache line";
21514184Sgabeblack@google.com  bool Hit,                    desc="probe hit valid line";
21614184Sgabeblack@google.com  bool Shared,                 desc="True if S, or if NB Probe ReturnData==1 && O";
21714184Sgabeblack@google.com  bool Dirty,                  desc="Is the data dirty (different than memory)?";
21814184Sgabeblack@google.com  bool Ntsl,                   desc="indicates probed lin will be invalid after probe";
21914184Sgabeblack@google.com  bool UntransferredOwner,     desc="pending confirmation of ownership change";
22014184Sgabeblack@google.com  // End Used Only By CPU Response
22114184Sgabeblack@google.com
22214184Sgabeblack@google.com  // Begin NB Response Only
22314184Sgabeblack@google.com  CoherenceState State, default=CoherenceState_NA,        desc="What returned data from NB should be in";
22414184Sgabeblack@google.com  bool CtoD,                    desc="was the originator a CtoD?";
22514184Sgabeblack@google.com  // End NB Response Only
22614184Sgabeblack@google.com
22714184Sgabeblack@google.com  // Normally if a block gets hit by a probe while waiting to be written back,
22814184Sgabeblack@google.com  // you flip the NbReqShared signal (part of the CPURequest signal group).
22914184Sgabeblack@google.com  // But since this is in packets and I don't want to send a separate packet,
23014184Sgabeblack@google.com  // let's just send this signal back with the data instead
23114184Sgabeblack@google.com  bool NbReqShared,             desc="modification of Shared field from initial request, e.g. hit by shared probe";
23214184Sgabeblack@google.com
23314184Sgabeblack@google.com  MessageSizeType MessageSize, desc="size category of the message";
23414184Sgabeblack@google.com  Cycles InitialRequestTime, desc="time the initial requests was sent from the L1Cache";
23514184Sgabeblack@google.com  Cycles ForwardRequestTime, desc="time the dir forwarded the request";
23614184Sgabeblack@google.com  Cycles ProbeRequestStartTime, desc="the time the dir started the probe request";
23714184Sgabeblack@google.com  bool DemandRequest, default="false", desc="For profiling purposes";
23814184Sgabeblack@google.com
23914184Sgabeblack@google.com  bool L3Hit, default="false", desc="Did memory or L3 supply the data?";
24014184Sgabeblack@google.com  MachineID OriginalResponder, desc="Mach which wrote the data to the L3";
24114184Sgabeblack@google.com  MachineID WTRequestor,             desc="Node who started the writethrough";
24214184Sgabeblack@google.com
24314184Sgabeblack@google.com  bool NotCached, default="false", desc="True when the Region buffer has already evicted the line";
24414184Sgabeblack@google.com
24514184Sgabeblack@google.com  bool NoAckNeeded, default="false", desc="For short circuting acks";
24614184Sgabeblack@google.com  bool isValid, default="false", desc="Is acked block valid";
24714184Sgabeblack@google.com  int wfid, default="0", desc="wavefront id";
24814184Sgabeblack@google.com  int Phase,                   desc="Synchronization Phase";
24914184Sgabeblack@google.com
25014184Sgabeblack@google.com  int ProgramCounter,       desc="PC that issues this request";
25114184Sgabeblack@google.com  bool mispred,              desc="tell TCP if the block should not be bypassed";
25214184Sgabeblack@google.com
25314184Sgabeblack@google.com
25414184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
25514184Sgabeblack@google.com    // Only PUTX messages contains the data block
25614184Sgabeblack@google.com    if (Type == CoherenceResponseType:CPUData ||
25714184Sgabeblack@google.com        Type == CoherenceResponseType:MemData) {
25814184Sgabeblack@google.com        return testAndRead(addr, DataBlk, pkt);
25914184Sgabeblack@google.com    }
26014184Sgabeblack@google.com
26114184Sgabeblack@google.com    return false;
26214184Sgabeblack@google.com  }
26314184Sgabeblack@google.com
26414184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
26514184Sgabeblack@google.com    // No check on message type required since the protocol should
26614184Sgabeblack@google.com    // read data from those messages that contain the block
26714184Sgabeblack@google.com    return testAndWrite(addr, DataBlk, pkt);
26814184Sgabeblack@google.com  }
26914184Sgabeblack@google.com}
27014184Sgabeblack@google.com
27114184Sgabeblack@google.comstructure(UnblockMsg, desc="...", interface="Message") {
27214184Sgabeblack@google.com  Addr addr,              desc="Physical address for this request";
27314184Sgabeblack@google.com  NetDest Destination,          desc="Destination (always directory)";
27414184Sgabeblack@google.com  MessageSizeType MessageSize, desc="size category of the message";
27514184Sgabeblack@google.com  MachineID Sender,               desc="Node who sent the data";
27614184Sgabeblack@google.com  bool currentOwner, default="false", desc="Is the sender the current owner";
27714184Sgabeblack@google.com  bool DoneAck, default="false", desc="Is this a done ack?";
27814184Sgabeblack@google.com  bool Dirty, default="false", desc="Was block dirty when evicted";
27914184Sgabeblack@google.com  bool wasValid, default="false", desc="Was block valid when evicted";
28014184Sgabeblack@google.com  bool valid, default="false", desc="Is block valid";
28114184Sgabeblack@google.com  bool validToInvalid, default="false", desc="Was block valid when evicted";
28214184Sgabeblack@google.com
28314184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
28414184Sgabeblack@google.com    return false;
28514184Sgabeblack@google.com  }
28614184Sgabeblack@google.com
28714184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
28814184Sgabeblack@google.com    // No check on message type required since the protocol should
28914184Sgabeblack@google.com    // read data from those messages that contain the block
29014184Sgabeblack@google.com    return false;
29114184Sgabeblack@google.com  }
29214184Sgabeblack@google.com}
29314184Sgabeblack@google.com
29414184Sgabeblack@google.comenumeration(TriggerType, desc="Trigger Type") {
29514184Sgabeblack@google.com  L2_to_L1,             desc="L2 to L1 fill";
29614184Sgabeblack@google.com  AcksComplete,         desc="NB received all needed Acks";
29714184Sgabeblack@google.com
29814184Sgabeblack@google.com  // For regions
29914184Sgabeblack@google.com  InvNext,              desc="Invalidate the next block";
30014184Sgabeblack@google.com  PrivateAck,           desc="Loopback ack for machines with no Region Buffer";
30114184Sgabeblack@google.com  AllOutstanding,       desc="All outstanding requests have finished";
30214184Sgabeblack@google.com  L3Hit,                desc="L3 hit in dir";
30314184Sgabeblack@google.com
30414184Sgabeblack@google.com  // For region directory once the directory is blocked
30514184Sgabeblack@google.com  InvRegion,            desc="Invalidate region";
30614184Sgabeblack@google.com  DowngradeRegion,      desc="downgrade region";
30714184Sgabeblack@google.com  //For writethrough
30814184Sgabeblack@google.com  UnblockWriteThrough,  desc="unblock";
30914184Sgabeblack@google.com  WriteData,            desc="Write to full cacheblock data";
31014184Sgabeblack@google.com  WriteDone,            desc="Sequencer says that write is done";
31114184Sgabeblack@google.com  AtomicDone,           desc="Atomic is done";
31214184Sgabeblack@google.com}
31314184Sgabeblack@google.com
31414184Sgabeblack@google.comenumeration(CacheId, desc="Which Cache in the Core") {
31514184Sgabeblack@google.com  L1I,          desc="L1 I-cache";
31614184Sgabeblack@google.com  L1D0,         desc="L1 D-cache cluster 0";
31714184Sgabeblack@google.com  L1D1,         desc="L1 D-cache cluster 1";
31814184Sgabeblack@google.com  NA,           desc="Default";
31914184Sgabeblack@google.com}
32014184Sgabeblack@google.com
32114184Sgabeblack@google.comstructure(TriggerMsg, desc="...", interface="Message") {
32214184Sgabeblack@google.com  Addr addr,              desc="Address";
32314184Sgabeblack@google.com  TriggerType Type,             desc="Type of trigger";
32414184Sgabeblack@google.com  CacheId Dest,         default="CacheId_NA", desc="Cache to invalidate";
32514184Sgabeblack@google.com  int ProgramCounter,           desc="PC that accesses to this block";
32614184Sgabeblack@google.com
32714184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
32814184Sgabeblack@google.com    return false;
32914184Sgabeblack@google.com  }
33014184Sgabeblack@google.com
33114184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
33214184Sgabeblack@google.com    // No check on message type required since the protocol should
33314184Sgabeblack@google.com    // read data from those messages that contain the block
33414184Sgabeblack@google.com    return false;
33514184Sgabeblack@google.com  }
33614184Sgabeblack@google.com
33714184Sgabeblack@google.com}
33814184Sgabeblack@google.com
33914184Sgabeblack@google.comenumeration(FifoType, desc="Fifo Type") {
34014184Sgabeblack@google.com  WriteDummy,          desc="Dummy Write for atomic operation";
34114184Sgabeblack@google.com  WriteThrough,        desc="simple writethrough request";
34214184Sgabeblack@google.com  WriteFlush,          desc="synchronization message";
34314184Sgabeblack@google.com}
34414184Sgabeblack@google.com
34514184Sgabeblack@google.comstructure(FifoMsg, desc="...", interface="Message") {
34614184Sgabeblack@google.com  Addr addr,          desc="Address";
34714184Sgabeblack@google.com  FifoType Type,            desc="WriteThrough/WriteFlush";
34814184Sgabeblack@google.com  int wfid,                 default="0",desc="wavefront id";
34914184Sgabeblack@google.com  MachineID Requestor,      desc="Flush Requestor";
35014184Sgabeblack@google.com  MachineID oRequestor,      desc="original Flush Requestor";
35114184Sgabeblack@google.com
35214184Sgabeblack@google.com  bool functionalRead(Packet *pkt) {
35314184Sgabeblack@google.com    return false;
35414184Sgabeblack@google.com  }
35514184Sgabeblack@google.com
35614184Sgabeblack@google.com  bool functionalWrite(Packet *pkt) {
35714184Sgabeblack@google.com    // No check on message type required since the protocol should
35814184Sgabeblack@google.com    // read data from those messages that contain the block
35914184Sgabeblack@google.com    return false;
36014184Sgabeblack@google.com  }
36114184Sgabeblack@google.com
36214184Sgabeblack@google.com}
363