114184Sgabeblack@google.com/* 214184Sgabeblack@google.com * Copyright (c) 2011-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 * Author: Blake Hechtman 3414184Sgabeblack@google.com */ 3514184Sgabeblack@google.com 3614184Sgabeblack@google.commachine(MachineType:TCP, "GPU TCP (L1 Data Cache)") 3714184Sgabeblack@google.com : VIPERCoalescer* coalescer; 3814184Sgabeblack@google.com Sequencer* sequencer; 3914184Sgabeblack@google.com bool use_seq_not_coal; 4014184Sgabeblack@google.com CacheMemory * L1cache; 4114184Sgabeblack@google.com bool WB; /*is this cache Writeback?*/ 4214184Sgabeblack@google.com bool disableL1; /* bypass L1 cache? */ 4314184Sgabeblack@google.com int TCC_select_num_bits; 4414184Sgabeblack@google.com Cycles issue_latency := 40; // time to send data down to TCC 4514184Sgabeblack@google.com Cycles l2_hit_latency := 18; 4614184Sgabeblack@google.com 4714184Sgabeblack@google.com MessageBuffer * requestFromTCP, network="To", virtual_network="1", vnet_type="request"; 4814184Sgabeblack@google.com MessageBuffer * responseFromTCP, network="To", virtual_network="3", vnet_type="response"; 4914184Sgabeblack@google.com MessageBuffer * unblockFromCore, network="To", virtual_network="5", vnet_type="unblock"; 5014184Sgabeblack@google.com 5114184Sgabeblack@google.com MessageBuffer * probeToTCP, network="From", virtual_network="1", vnet_type="request"; 5214184Sgabeblack@google.com MessageBuffer * responseToTCP, network="From", virtual_network="3", vnet_type="response"; 5314184Sgabeblack@google.com MessageBuffer * mandatoryQueue; 5414184Sgabeblack@google.com 5514184Sgabeblack@google.com{ 5614184Sgabeblack@google.com state_declaration(State, desc="TCP Cache States", default="TCP_State_I") { 5714184Sgabeblack@google.com I, AccessPermission:Invalid, desc="Invalid"; 5814184Sgabeblack@google.com V, AccessPermission:Read_Only, desc="Valid"; 5914184Sgabeblack@google.com W, AccessPermission:Read_Write, desc="Written"; 6014184Sgabeblack@google.com M, AccessPermission:Read_Write, desc="Written and Valid"; 6114184Sgabeblack@google.com L, AccessPermission:Read_Write, desc="Local access is modifable"; 6214184Sgabeblack@google.com A, AccessPermission:Invalid, desc="Waiting on Atomic"; 6314184Sgabeblack@google.com } 6414184Sgabeblack@google.com 6514184Sgabeblack@google.com enumeration(Event, desc="TCP Events") { 6614184Sgabeblack@google.com // Core initiated 6714184Sgabeblack@google.com Load, desc="Load"; 6814184Sgabeblack@google.com Store, desc="Store to L1 (L1 is dirty)"; 6914184Sgabeblack@google.com StoreThrough, desc="Store directly to L2(L1 is clean)"; 7014184Sgabeblack@google.com StoreLocal, desc="Store to L1 but L1 is clean"; 7114184Sgabeblack@google.com Atomic, desc="Atomic"; 7214184Sgabeblack@google.com Flush, desc="Flush if dirty(wbL1 for Store Release)"; 7314184Sgabeblack@google.com Evict, desc="Evict if clean(invL1 for Load Acquire)"; 7414184Sgabeblack@google.com // Mem sys initiated 7514184Sgabeblack@google.com Repl, desc="Replacing block from cache"; 7614184Sgabeblack@google.com 7714184Sgabeblack@google.com // TCC initiated 7814184Sgabeblack@google.com TCC_Ack, desc="TCC Ack to Core Request"; 7914184Sgabeblack@google.com TCC_AckWB, desc="TCC Ack for WB"; 8014184Sgabeblack@google.com // Disable L1 cache 8114184Sgabeblack@google.com Bypass, desc="Bypass the entire L1 cache"; 8214184Sgabeblack@google.com } 8314184Sgabeblack@google.com 8414184Sgabeblack@google.com enumeration(RequestType, 8514184Sgabeblack@google.com desc="To communicate stats from transitions to recordStats") { 8614184Sgabeblack@google.com DataArrayRead, desc="Read the data array"; 8714184Sgabeblack@google.com DataArrayWrite, desc="Write the data array"; 8814184Sgabeblack@google.com TagArrayRead, desc="Read the data array"; 8914184Sgabeblack@google.com TagArrayWrite, desc="Write the data array"; 9014184Sgabeblack@google.com TagArrayFlash, desc="Flash clear the data array"; 9114184Sgabeblack@google.com } 9214184Sgabeblack@google.com 9314184Sgabeblack@google.com 9414184Sgabeblack@google.com structure(Entry, desc="...", interface="AbstractCacheEntry") { 9514184Sgabeblack@google.com State CacheState, desc="cache state"; 9614184Sgabeblack@google.com bool Dirty, desc="Is the data dirty (diff than memory)?"; 9714184Sgabeblack@google.com DataBlock DataBlk, desc="data for the block"; 9814184Sgabeblack@google.com bool FromL2, default="false", desc="block just moved from L2"; 9914184Sgabeblack@google.com WriteMask writeMask, desc="written bytes masks"; 10014184Sgabeblack@google.com } 10114184Sgabeblack@google.com 10214184Sgabeblack@google.com structure(TBE, desc="...") { 10314184Sgabeblack@google.com State TBEState, desc="Transient state"; 10414184Sgabeblack@google.com DataBlock DataBlk, desc="data for the block, required for concurrent writebacks"; 10514184Sgabeblack@google.com bool Dirty, desc="Is the data dirty (different than memory)?"; 10614184Sgabeblack@google.com int NumPendingMsgs,desc="Number of acks/data messages that this processor is waiting for"; 10714184Sgabeblack@google.com bool Shared, desc="Victim hit by shared probe"; 10814184Sgabeblack@google.com } 10914184Sgabeblack@google.com 11014184Sgabeblack@google.com structure(TBETable, external="yes") { 11114184Sgabeblack@google.com TBE lookup(Addr); 11214184Sgabeblack@google.com void allocate(Addr); 11314184Sgabeblack@google.com void deallocate(Addr); 11414184Sgabeblack@google.com bool isPresent(Addr); 11514184Sgabeblack@google.com } 11614184Sgabeblack@google.com 11714184Sgabeblack@google.com TBETable TBEs, template="<TCP_TBE>", constructor="m_number_of_TBEs"; 11814184Sgabeblack@google.com int TCC_select_low_bit, default="RubySystem::getBlockSizeBits()"; 11914184Sgabeblack@google.com int WTcnt, default="0"; 12014184Sgabeblack@google.com int Fcnt, default="0"; 12114184Sgabeblack@google.com bool inFlush, default="false"; 12214184Sgabeblack@google.com 12314184Sgabeblack@google.com void set_cache_entry(AbstractCacheEntry b); 12414184Sgabeblack@google.com void unset_cache_entry(); 12514184Sgabeblack@google.com void set_tbe(TBE b); 12614184Sgabeblack@google.com void unset_tbe(); 12714184Sgabeblack@google.com void wakeUpAllBuffers(); 12814184Sgabeblack@google.com void wakeUpBuffers(Addr a); 12914184Sgabeblack@google.com Cycles curCycle(); 13014184Sgabeblack@google.com 13114184Sgabeblack@google.com // Internal functions 13214184Sgabeblack@google.com Tick clockEdge(); 13314184Sgabeblack@google.com Tick cyclesToTicks(Cycles c); 13414184Sgabeblack@google.com Entry getCacheEntry(Addr address), return_by_pointer="yes" { 13514184Sgabeblack@google.com Entry cache_entry := static_cast(Entry, "pointer", L1cache.lookup(address)); 13614184Sgabeblack@google.com return cache_entry; 13714184Sgabeblack@google.com } 13814184Sgabeblack@google.com 13914184Sgabeblack@google.com DataBlock getDataBlock(Addr addr), return_by_ref="yes" { 14014184Sgabeblack@google.com TBE tbe := TBEs.lookup(addr); 14114184Sgabeblack@google.com if(is_valid(tbe)) { 14214184Sgabeblack@google.com return tbe.DataBlk; 14314184Sgabeblack@google.com } else { 14414184Sgabeblack@google.com return getCacheEntry(addr).DataBlk; 14514184Sgabeblack@google.com } 14614184Sgabeblack@google.com } 14714184Sgabeblack@google.com 14814184Sgabeblack@google.com State getState(TBE tbe, Entry cache_entry, Addr addr) { 14914184Sgabeblack@google.com if (is_valid(tbe)) { 15014184Sgabeblack@google.com return tbe.TBEState; 15114184Sgabeblack@google.com } else if (is_valid(cache_entry)) { 15214184Sgabeblack@google.com return cache_entry.CacheState; 15314184Sgabeblack@google.com } 15414184Sgabeblack@google.com return State:I; 15514184Sgabeblack@google.com } 15614184Sgabeblack@google.com 15714184Sgabeblack@google.com void setState(TBE tbe, Entry cache_entry, Addr addr, State state) { 15814184Sgabeblack@google.com if (is_valid(tbe)) { 15914184Sgabeblack@google.com tbe.TBEState := state; 16014184Sgabeblack@google.com } 16114184Sgabeblack@google.com 16214184Sgabeblack@google.com if (is_valid(cache_entry)) { 16314184Sgabeblack@google.com cache_entry.CacheState := state; 16414184Sgabeblack@google.com } 16514184Sgabeblack@google.com } 16614184Sgabeblack@google.com 16714184Sgabeblack@google.com void functionalRead(Addr addr, Packet *pkt) { 16814184Sgabeblack@google.com TBE tbe := TBEs.lookup(addr); 16914184Sgabeblack@google.com if(is_valid(tbe)) { 17014184Sgabeblack@google.com testAndRead(addr, tbe.DataBlk, pkt); 17114184Sgabeblack@google.com } else { 17214184Sgabeblack@google.com functionalMemoryRead(pkt); 17314184Sgabeblack@google.com } 17414184Sgabeblack@google.com } 17514184Sgabeblack@google.com 17614184Sgabeblack@google.com int functionalWrite(Addr addr, Packet *pkt) { 17714184Sgabeblack@google.com int num_functional_writes := 0; 17814184Sgabeblack@google.com 17914184Sgabeblack@google.com TBE tbe := TBEs.lookup(addr); 18014184Sgabeblack@google.com if(is_valid(tbe)) { 18114184Sgabeblack@google.com num_functional_writes := num_functional_writes + 18214184Sgabeblack@google.com testAndWrite(addr, tbe.DataBlk, pkt); 18314184Sgabeblack@google.com } 18414184Sgabeblack@google.com 18514184Sgabeblack@google.com num_functional_writes := num_functional_writes + 18614184Sgabeblack@google.com functionalMemoryWrite(pkt); 18714184Sgabeblack@google.com return num_functional_writes; 18814184Sgabeblack@google.com } 18914184Sgabeblack@google.com 19014184Sgabeblack@google.com AccessPermission getAccessPermission(Addr addr) { 19114184Sgabeblack@google.com TBE tbe := TBEs.lookup(addr); 19214184Sgabeblack@google.com if(is_valid(tbe)) { 19314184Sgabeblack@google.com return TCP_State_to_permission(tbe.TBEState); 19414184Sgabeblack@google.com } 19514184Sgabeblack@google.com 19614184Sgabeblack@google.com Entry cache_entry := getCacheEntry(addr); 19714184Sgabeblack@google.com if(is_valid(cache_entry)) { 19814184Sgabeblack@google.com return TCP_State_to_permission(cache_entry.CacheState); 19914184Sgabeblack@google.com } 20014184Sgabeblack@google.com 20114184Sgabeblack@google.com return AccessPermission:NotPresent; 20214184Sgabeblack@google.com } 20314184Sgabeblack@google.com 20414184Sgabeblack@google.com bool isValid(Addr addr) { 20514184Sgabeblack@google.com AccessPermission perm := getAccessPermission(addr); 20614184Sgabeblack@google.com if (perm == AccessPermission:NotPresent || 20714184Sgabeblack@google.com perm == AccessPermission:Invalid || 20814184Sgabeblack@google.com perm == AccessPermission:Busy) { 20914184Sgabeblack@google.com return false; 21014184Sgabeblack@google.com } else { 21114184Sgabeblack@google.com return true; 21214184Sgabeblack@google.com } 21314184Sgabeblack@google.com } 21414184Sgabeblack@google.com 21514184Sgabeblack@google.com void setAccessPermission(Entry cache_entry, Addr addr, State state) { 21614184Sgabeblack@google.com if (is_valid(cache_entry)) { 21714184Sgabeblack@google.com cache_entry.changePermission(TCP_State_to_permission(state)); 21814184Sgabeblack@google.com } 21914184Sgabeblack@google.com } 22014184Sgabeblack@google.com 22114184Sgabeblack@google.com void recordRequestType(RequestType request_type, Addr addr) { 22214184Sgabeblack@google.com if (request_type == RequestType:DataArrayRead) { 22314184Sgabeblack@google.com L1cache.recordRequestType(CacheRequestType:DataArrayRead, addr); 22414184Sgabeblack@google.com } else if (request_type == RequestType:DataArrayWrite) { 22514184Sgabeblack@google.com L1cache.recordRequestType(CacheRequestType:DataArrayWrite, addr); 22614184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayRead) { 22714184Sgabeblack@google.com L1cache.recordRequestType(CacheRequestType:TagArrayRead, addr); 22814184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayFlash) { 22914184Sgabeblack@google.com L1cache.recordRequestType(CacheRequestType:TagArrayRead, addr); 23014184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayWrite) { 23114184Sgabeblack@google.com L1cache.recordRequestType(CacheRequestType:TagArrayWrite, addr); 23214184Sgabeblack@google.com } 23314184Sgabeblack@google.com } 23414184Sgabeblack@google.com 23514184Sgabeblack@google.com bool checkResourceAvailable(RequestType request_type, Addr addr) { 23614184Sgabeblack@google.com if (request_type == RequestType:DataArrayRead) { 23714184Sgabeblack@google.com return L1cache.checkResourceAvailable(CacheResourceType:DataArray, addr); 23814184Sgabeblack@google.com } else if (request_type == RequestType:DataArrayWrite) { 23914184Sgabeblack@google.com return L1cache.checkResourceAvailable(CacheResourceType:DataArray, addr); 24014184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayRead) { 24114184Sgabeblack@google.com return L1cache.checkResourceAvailable(CacheResourceType:TagArray, addr); 24214184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayWrite) { 24314184Sgabeblack@google.com return L1cache.checkResourceAvailable(CacheResourceType:TagArray, addr); 24414184Sgabeblack@google.com } else if (request_type == RequestType:TagArrayFlash) { 24514184Sgabeblack@google.com // FIXME should check once per cache, rather than once per cacheline 24614184Sgabeblack@google.com return L1cache.checkResourceAvailable(CacheResourceType:TagArray, addr); 24714184Sgabeblack@google.com } else { 24814184Sgabeblack@google.com error("Invalid RequestType type in checkResourceAvailable"); 24914184Sgabeblack@google.com return true; 25014184Sgabeblack@google.com } 25114184Sgabeblack@google.com } 25214184Sgabeblack@google.com 25314184Sgabeblack@google.com // Out Ports 25414184Sgabeblack@google.com 25514184Sgabeblack@google.com out_port(requestNetwork_out, CPURequestMsg, requestFromTCP); 25614184Sgabeblack@google.com 25714184Sgabeblack@google.com // In Ports 25814184Sgabeblack@google.com 25914184Sgabeblack@google.com in_port(responseToTCP_in, ResponseMsg, responseToTCP) { 26014184Sgabeblack@google.com if (responseToTCP_in.isReady(clockEdge())) { 26114184Sgabeblack@google.com peek(responseToTCP_in, ResponseMsg, block_on="addr") { 26214184Sgabeblack@google.com Entry cache_entry := getCacheEntry(in_msg.addr); 26314184Sgabeblack@google.com TBE tbe := TBEs.lookup(in_msg.addr); 26414184Sgabeblack@google.com if (in_msg.Type == CoherenceResponseType:TDSysResp) { 26514184Sgabeblack@google.com // disable L1 cache 26614184Sgabeblack@google.com if (disableL1) { 26714184Sgabeblack@google.com trigger(Event:Bypass, in_msg.addr, cache_entry, tbe); 26814184Sgabeblack@google.com } else { 26914184Sgabeblack@google.com if (is_valid(cache_entry) || L1cache.cacheAvail(in_msg.addr)) { 27014184Sgabeblack@google.com trigger(Event:TCC_Ack, in_msg.addr, cache_entry, tbe); 27114184Sgabeblack@google.com } else { 27214184Sgabeblack@google.com Addr victim := L1cache.cacheProbe(in_msg.addr); 27314184Sgabeblack@google.com trigger(Event:Repl, victim, getCacheEntry(victim), TBEs.lookup(victim)); 27414184Sgabeblack@google.com } 27514184Sgabeblack@google.com } 27614184Sgabeblack@google.com } else if (in_msg.Type == CoherenceResponseType:TDSysWBAck || 27714184Sgabeblack@google.com in_msg.Type == CoherenceResponseType:NBSysWBAck) { 27814184Sgabeblack@google.com trigger(Event:TCC_AckWB, in_msg.addr, cache_entry, tbe); 27914184Sgabeblack@google.com } else { 28014184Sgabeblack@google.com error("Unexpected Response Message to Core"); 28114184Sgabeblack@google.com } 28214184Sgabeblack@google.com } 28314184Sgabeblack@google.com } 28414184Sgabeblack@google.com } 28514184Sgabeblack@google.com 28614184Sgabeblack@google.com in_port(mandatoryQueue_in, RubyRequest, mandatoryQueue, desc="...") { 28714184Sgabeblack@google.com if (mandatoryQueue_in.isReady(clockEdge())) { 28814184Sgabeblack@google.com peek(mandatoryQueue_in, RubyRequest, block_on="LineAddress") { 28914184Sgabeblack@google.com Entry cache_entry := getCacheEntry(in_msg.LineAddress); 29014184Sgabeblack@google.com TBE tbe := TBEs.lookup(in_msg.LineAddress); 29114184Sgabeblack@google.com DPRINTF(RubySlicc, "%s\n", in_msg); 29214184Sgabeblack@google.com if (in_msg.Type == RubyRequestType:LD) { 29314184Sgabeblack@google.com trigger(Event:Load, in_msg.LineAddress, cache_entry, tbe); 29414184Sgabeblack@google.com } else if (in_msg.Type == RubyRequestType:ATOMIC) { 29514184Sgabeblack@google.com trigger(Event:Atomic, in_msg.LineAddress, cache_entry, tbe); 29614184Sgabeblack@google.com } else if (in_msg.Type == RubyRequestType:ST) { 29714184Sgabeblack@google.com if(disableL1) { 29814184Sgabeblack@google.com trigger(Event:StoreThrough, in_msg.LineAddress, cache_entry, tbe); 29914184Sgabeblack@google.com } else { 30014184Sgabeblack@google.com if (is_valid(cache_entry) || L1cache.cacheAvail(in_msg.LineAddress)) { 30114184Sgabeblack@google.com if (in_msg.segment == HSASegment:SPILL) { 30214184Sgabeblack@google.com trigger(Event:StoreLocal, in_msg.LineAddress, cache_entry, tbe); 30314184Sgabeblack@google.com } else if (WB) { 30414184Sgabeblack@google.com trigger(Event:Store, in_msg.LineAddress, cache_entry, tbe); 30514184Sgabeblack@google.com } else { 30614184Sgabeblack@google.com trigger(Event:StoreThrough, in_msg.LineAddress, cache_entry, tbe); 30714184Sgabeblack@google.com } 30814184Sgabeblack@google.com } else { 30914184Sgabeblack@google.com Addr victim := L1cache.cacheProbe(in_msg.LineAddress); 31014184Sgabeblack@google.com trigger(Event:Repl, victim, getCacheEntry(victim), TBEs.lookup(victim)); 31114184Sgabeblack@google.com } 31214184Sgabeblack@google.com } // end if (disableL1) 31314184Sgabeblack@google.com } else if (in_msg.Type == RubyRequestType:FLUSH) { 31414184Sgabeblack@google.com trigger(Event:Flush, in_msg.LineAddress, cache_entry, tbe); 31514184Sgabeblack@google.com } else if (in_msg.Type == RubyRequestType:REPLACEMENT){ 31614184Sgabeblack@google.com trigger(Event:Evict, in_msg.LineAddress, cache_entry, tbe); 31714184Sgabeblack@google.com } else { 31814184Sgabeblack@google.com error("Unexpected Request Message from VIC"); 31914184Sgabeblack@google.com if (is_valid(cache_entry) || L1cache.cacheAvail(in_msg.LineAddress)) { 32014184Sgabeblack@google.com if (WB) { 32114184Sgabeblack@google.com trigger(Event:Store, in_msg.LineAddress, cache_entry, tbe); 32214184Sgabeblack@google.com } else { 32314184Sgabeblack@google.com trigger(Event:StoreThrough, in_msg.LineAddress, cache_entry, tbe); 32414184Sgabeblack@google.com } 32514184Sgabeblack@google.com } else { 32614184Sgabeblack@google.com Addr victim := L1cache.cacheProbe(in_msg.LineAddress); 32714184Sgabeblack@google.com trigger(Event:Repl, victim, getCacheEntry(victim), TBEs.lookup(victim)); 32814184Sgabeblack@google.com } 32914184Sgabeblack@google.com } 33014184Sgabeblack@google.com } 33114184Sgabeblack@google.com } 33214184Sgabeblack@google.com } 33314184Sgabeblack@google.com 33414184Sgabeblack@google.com // Actions 33514184Sgabeblack@google.com 33614184Sgabeblack@google.com action(ic_invCache, "ic", desc="invalidate cache") { 33714184Sgabeblack@google.com if(is_valid(cache_entry)) { 33814184Sgabeblack@google.com cache_entry.writeMask.clear(); 33914184Sgabeblack@google.com L1cache.deallocate(address); 34014184Sgabeblack@google.com } 34114184Sgabeblack@google.com unset_cache_entry(); 34214184Sgabeblack@google.com } 34314184Sgabeblack@google.com 34414184Sgabeblack@google.com action(n_issueRdBlk, "n", desc="Issue RdBlk") { 34514184Sgabeblack@google.com enqueue(requestNetwork_out, CPURequestMsg, issue_latency) { 34614184Sgabeblack@google.com out_msg.addr := address; 34714184Sgabeblack@google.com out_msg.Type := CoherenceRequestType:RdBlk; 34814184Sgabeblack@google.com out_msg.Requestor := machineID; 34914184Sgabeblack@google.com out_msg.Destination.add(mapAddressToRange(address,MachineType:TCC, 35014184Sgabeblack@google.com TCC_select_low_bit, TCC_select_num_bits)); 35114184Sgabeblack@google.com out_msg.MessageSize := MessageSizeType:Request_Control; 35214184Sgabeblack@google.com out_msg.InitialRequestTime := curCycle(); 35314184Sgabeblack@google.com } 35414184Sgabeblack@google.com } 35514184Sgabeblack@google.com 35614184Sgabeblack@google.com action(rb_bypassDone, "rb", desc="bypass L1 of read access") { 35714184Sgabeblack@google.com peek(responseToTCP_in, ResponseMsg) { 35814184Sgabeblack@google.com DataBlock tmp:= in_msg.DataBlk; 35914184Sgabeblack@google.com if (use_seq_not_coal) { 36014184Sgabeblack@google.com sequencer.readCallback(address, tmp, false, MachineType:L1Cache); 36114184Sgabeblack@google.com } else { 36214184Sgabeblack@google.com coalescer.readCallback(address, MachineType:L1Cache, tmp); 36314184Sgabeblack@google.com } 36414184Sgabeblack@google.com if(is_valid(cache_entry)) { 36514184Sgabeblack@google.com unset_cache_entry(); 36614184Sgabeblack@google.com } 36714184Sgabeblack@google.com } 36814184Sgabeblack@google.com } 36914184Sgabeblack@google.com 37014184Sgabeblack@google.com action(wab_bypassDone, "wab", desc="bypass L1 of write access") { 37114184Sgabeblack@google.com peek(responseToTCP_in, ResponseMsg) { 37214184Sgabeblack@google.com DataBlock tmp := in_msg.DataBlk; 37314184Sgabeblack@google.com if (use_seq_not_coal) { 37414184Sgabeblack@google.com sequencer.writeCallback(address, tmp, false, MachineType:L1Cache); 37514184Sgabeblack@google.com } else { 37614184Sgabeblack@google.com coalescer.writeCallback(address, MachineType:L1Cache, tmp); 37714184Sgabeblack@google.com } 37814184Sgabeblack@google.com } 37914184Sgabeblack@google.com } 38014184Sgabeblack@google.com 38114184Sgabeblack@google.com action(norl_issueRdBlkOrloadDone, "norl", desc="local load done") { 38214184Sgabeblack@google.com peek(mandatoryQueue_in, RubyRequest){ 38314184Sgabeblack@google.com if (cache_entry.writeMask.cmpMask(in_msg.writeMask)) { 38414184Sgabeblack@google.com if (use_seq_not_coal) { 38514184Sgabeblack@google.com sequencer.readCallback(address, cache_entry.DataBlk, false, MachineType:L1Cache); 38614184Sgabeblack@google.com } else { 38714184Sgabeblack@google.com coalescer.readCallback(address, MachineType:L1Cache, cache_entry.DataBlk); 38814184Sgabeblack@google.com } 38914184Sgabeblack@google.com } else { 39014184Sgabeblack@google.com enqueue(requestNetwork_out, CPURequestMsg, issue_latency) { 39114184Sgabeblack@google.com out_msg.addr := address; 39214184Sgabeblack@google.com out_msg.Type := CoherenceRequestType:RdBlk; 39314184Sgabeblack@google.com out_msg.Requestor := machineID; 39414184Sgabeblack@google.com out_msg.Destination.add(mapAddressToRange(address,MachineType:TCC, 39514184Sgabeblack@google.com TCC_select_low_bit, TCC_select_num_bits)); 39614184Sgabeblack@google.com out_msg.MessageSize := MessageSizeType:Request_Control; 39714184Sgabeblack@google.com out_msg.InitialRequestTime := curCycle(); 39814184Sgabeblack@google.com } 39914184Sgabeblack@google.com } 40014184Sgabeblack@google.com } 40114184Sgabeblack@google.com } 40214184Sgabeblack@google.com 40314184Sgabeblack@google.com action(wt_writeThrough, "wt", desc="Flush dirty data") { 40414184Sgabeblack@google.com WTcnt := WTcnt + 1; 40514184Sgabeblack@google.com APPEND_TRANSITION_COMMENT("write++ = "); 40614184Sgabeblack@google.com APPEND_TRANSITION_COMMENT(WTcnt); 40714184Sgabeblack@google.com enqueue(requestNetwork_out, CPURequestMsg, issue_latency) { 40814184Sgabeblack@google.com out_msg.addr := address; 40914184Sgabeblack@google.com out_msg.Requestor := machineID; 41014184Sgabeblack@google.com assert(is_valid(cache_entry)); 41114184Sgabeblack@google.com out_msg.DataBlk := cache_entry.DataBlk; 41214184Sgabeblack@google.com out_msg.writeMask.clear(); 41314184Sgabeblack@google.com out_msg.writeMask.orMask(cache_entry.writeMask); 41414184Sgabeblack@google.com out_msg.Destination.add(mapAddressToRange(address,MachineType:TCC, 41514184Sgabeblack@google.com TCC_select_low_bit, TCC_select_num_bits)); 41614184Sgabeblack@google.com out_msg.MessageSize := MessageSizeType:Data; 41714184Sgabeblack@google.com out_msg.Type := CoherenceRequestType:WriteThrough; 41814184Sgabeblack@google.com out_msg.InitialRequestTime := curCycle(); 41914184Sgabeblack@google.com out_msg.Shared := false; 42014184Sgabeblack@google.com } 42114184Sgabeblack@google.com } 42214184Sgabeblack@google.com 42314184Sgabeblack@google.com action(at_atomicThrough, "at", desc="send Atomic") { 42414184Sgabeblack@google.com peek(mandatoryQueue_in, RubyRequest) { 42514184Sgabeblack@google.com enqueue(requestNetwork_out, CPURequestMsg, issue_latency) { 42614184Sgabeblack@google.com out_msg.addr := address; 42714184Sgabeblack@google.com out_msg.Requestor := machineID; 42814184Sgabeblack@google.com out_msg.writeMask.clear(); 42914184Sgabeblack@google.com out_msg.writeMask.orMask(in_msg.writeMask); 43014184Sgabeblack@google.com out_msg.Destination.add(mapAddressToRange(address,MachineType:TCC, 43114184Sgabeblack@google.com TCC_select_low_bit, TCC_select_num_bits)); 43214184Sgabeblack@google.com out_msg.MessageSize := MessageSizeType:Data; 43314184Sgabeblack@google.com out_msg.Type := CoherenceRequestType:Atomic; 43414184Sgabeblack@google.com out_msg.InitialRequestTime := curCycle(); 43514184Sgabeblack@google.com out_msg.Shared := false; 43614184Sgabeblack@google.com } 43714184Sgabeblack@google.com } 43814184Sgabeblack@google.com } 43914184Sgabeblack@google.com 44014184Sgabeblack@google.com action(a_allocate, "a", desc="allocate block") { 44114184Sgabeblack@google.com if (is_invalid(cache_entry)) { 44214184Sgabeblack@google.com set_cache_entry(L1cache.allocate(address, new Entry)); 44314184Sgabeblack@google.com } 44414184Sgabeblack@google.com cache_entry.writeMask.clear(); 44514184Sgabeblack@google.com } 44614184Sgabeblack@google.com 44714184Sgabeblack@google.com action(t_allocateTBE, "t", desc="allocate TBE Entry") { 44814184Sgabeblack@google.com check_allocate(TBEs); 44914184Sgabeblack@google.com TBEs.allocate(address); 45014184Sgabeblack@google.com set_tbe(TBEs.lookup(address)); 45114184Sgabeblack@google.com } 45214184Sgabeblack@google.com 45314184Sgabeblack@google.com action(d_deallocateTBE, "d", desc="Deallocate TBE") { 45414184Sgabeblack@google.com TBEs.deallocate(address); 45514184Sgabeblack@google.com unset_tbe(); 45614184Sgabeblack@google.com } 45714184Sgabeblack@google.com 45814184Sgabeblack@google.com action(sf_setFlush, "sf", desc="set flush") { 45914184Sgabeblack@google.com inFlush := true; 46014184Sgabeblack@google.com APPEND_TRANSITION_COMMENT(" inFlush is true"); 46114184Sgabeblack@google.com } 46214184Sgabeblack@google.com 46314184Sgabeblack@google.com action(p_popMandatoryQueue, "pm", desc="Pop Mandatory Queue") { 46414184Sgabeblack@google.com mandatoryQueue_in.dequeue(clockEdge()); 46514184Sgabeblack@google.com } 46614184Sgabeblack@google.com 46714184Sgabeblack@google.com action(pr_popResponseQueue, "pr", desc="Pop Response Queue") { 46814184Sgabeblack@google.com responseToTCP_in.dequeue(clockEdge()); 46914184Sgabeblack@google.com } 47014184Sgabeblack@google.com 47114184Sgabeblack@google.com action(l_loadDone, "l", desc="local load done") { 47214184Sgabeblack@google.com assert(is_valid(cache_entry)); 47314184Sgabeblack@google.com if (use_seq_not_coal) { 47414184Sgabeblack@google.com sequencer.readCallback(address, cache_entry.DataBlk, false, MachineType:L1Cache); 47514184Sgabeblack@google.com } else { 47614184Sgabeblack@google.com coalescer.readCallback(address, MachineType:L1Cache, cache_entry.DataBlk); 47714184Sgabeblack@google.com } 47814184Sgabeblack@google.com } 47914184Sgabeblack@google.com 48014184Sgabeblack@google.com action(s_storeDone, "s", desc="local store done") { 48114184Sgabeblack@google.com assert(is_valid(cache_entry)); 48214184Sgabeblack@google.com 48314184Sgabeblack@google.com if (use_seq_not_coal) { 48414184Sgabeblack@google.com sequencer.writeCallback(address, cache_entry.DataBlk, false, MachineType:L1Cache); 48514184Sgabeblack@google.com } else { 48614184Sgabeblack@google.com coalescer.writeCallback(address, MachineType:L1Cache, cache_entry.DataBlk); 48714184Sgabeblack@google.com } 48814184Sgabeblack@google.com cache_entry.Dirty := true; 48914184Sgabeblack@google.com } 49014184Sgabeblack@google.com 49114184Sgabeblack@google.com action(inv_invDone, "inv", desc="local inv done") { 49214184Sgabeblack@google.com if (use_seq_not_coal) { 49314184Sgabeblack@google.com DPRINTF(RubySlicc, "Sequencer does not define invCallback!\n"); 49414184Sgabeblack@google.com assert(false); 49514184Sgabeblack@google.com } else { 49614184Sgabeblack@google.com coalescer.invCallback(address); 49714184Sgabeblack@google.com } 49814184Sgabeblack@google.com } 49914184Sgabeblack@google.com 50014184Sgabeblack@google.com action(wb_wbDone, "wb", desc="local wb done") { 50114184Sgabeblack@google.com if (inFlush == true) { 50214184Sgabeblack@google.com Fcnt := Fcnt + 1; 50314184Sgabeblack@google.com if (Fcnt > WTcnt) { 50414184Sgabeblack@google.com if (use_seq_not_coal) { 50514184Sgabeblack@google.com DPRINTF(RubySlicc, "Sequencer does not define wbCallback!\n"); 50614184Sgabeblack@google.com assert(false); 50714184Sgabeblack@google.com } else { 50814184Sgabeblack@google.com coalescer.wbCallback(address); 50914184Sgabeblack@google.com } 51014184Sgabeblack@google.com Fcnt := Fcnt - 1; 51114184Sgabeblack@google.com } 51214184Sgabeblack@google.com if (WTcnt == 0 && Fcnt == 0) { 51314184Sgabeblack@google.com inFlush := false; 51414184Sgabeblack@google.com APPEND_TRANSITION_COMMENT(" inFlush is false"); 51514184Sgabeblack@google.com } 51614184Sgabeblack@google.com } 51714184Sgabeblack@google.com } 51814184Sgabeblack@google.com 51914184Sgabeblack@google.com action(wd_wtDone, "wd", desc="writethrough done") { 52014184Sgabeblack@google.com WTcnt := WTcnt - 1; 52114184Sgabeblack@google.com if (inFlush == true) { 52214184Sgabeblack@google.com Fcnt := Fcnt -1; 52314184Sgabeblack@google.com } 52414184Sgabeblack@google.com assert(WTcnt >= 0); 52514184Sgabeblack@google.com APPEND_TRANSITION_COMMENT("write-- = "); 52614184Sgabeblack@google.com APPEND_TRANSITION_COMMENT(WTcnt); 52714184Sgabeblack@google.com } 52814184Sgabeblack@google.com 52914184Sgabeblack@google.com action(dw_dirtyWrite, "dw", desc="update write mask"){ 53014184Sgabeblack@google.com peek(mandatoryQueue_in, RubyRequest) { 53114184Sgabeblack@google.com cache_entry.DataBlk.copyPartial(in_msg.WTData,in_msg.writeMask); 53214184Sgabeblack@google.com cache_entry.writeMask.orMask(in_msg.writeMask); 53314184Sgabeblack@google.com } 53414184Sgabeblack@google.com } 53514184Sgabeblack@google.com action(w_writeCache, "w", desc="write data to cache") { 53614184Sgabeblack@google.com peek(responseToTCP_in, ResponseMsg) { 53714184Sgabeblack@google.com assert(is_valid(cache_entry)); 53814184Sgabeblack@google.com DataBlock tmp := in_msg.DataBlk; 53914184Sgabeblack@google.com tmp.copyPartial(cache_entry.DataBlk,cache_entry.writeMask); 54014184Sgabeblack@google.com cache_entry.DataBlk := tmp; 54114184Sgabeblack@google.com } 54214184Sgabeblack@google.com } 54314184Sgabeblack@google.com 54414184Sgabeblack@google.com action(mru_updateMRU, "mru", desc="Touch block for replacement policy") { 54514184Sgabeblack@google.com L1cache.setMRU(address); 54614184Sgabeblack@google.com } 54714184Sgabeblack@google.com 54814184Sgabeblack@google.com// action(zz_recycleMandatoryQueue, "\z", desc="recycle mandatory queue") { 54914184Sgabeblack@google.com// mandatoryQueue_in.recycle(clockEdge(), cyclesToTicks(recycle_latency)); 55014184Sgabeblack@google.com// } 55114184Sgabeblack@google.com 55214184Sgabeblack@google.com action(z_stall, "z", desc="stall; built-in") { 55314184Sgabeblack@google.com // built-int action 55414184Sgabeblack@google.com } 55514184Sgabeblack@google.com 55614184Sgabeblack@google.com // Transitions 55714184Sgabeblack@google.com // ArrayRead/Write assumptions: 55814184Sgabeblack@google.com // All requests read Tag Array 55914184Sgabeblack@google.com // TBE allocation write the TagArray to I 56014184Sgabeblack@google.com // TBE only checked on misses 56114184Sgabeblack@google.com // Stores will also write dirty bits in the tag 56214184Sgabeblack@google.com // WriteThroughs still need to use cache entry as staging buffer for wavefront 56314184Sgabeblack@google.com 56414184Sgabeblack@google.com // Stalling transitions do NOT check the tag array...and if they do, 56514184Sgabeblack@google.com // they can cause a resource stall deadlock! 56614184Sgabeblack@google.com 56714184Sgabeblack@google.com transition({A}, {Load, Store, Atomic, StoreThrough}) { //TagArrayRead} { 56814184Sgabeblack@google.com z_stall; 56914184Sgabeblack@google.com } 57014184Sgabeblack@google.com 57114184Sgabeblack@google.com transition({M, V, L}, Load) {TagArrayRead, DataArrayRead} { 57214184Sgabeblack@google.com l_loadDone; 57314184Sgabeblack@google.com mru_updateMRU; 57414184Sgabeblack@google.com p_popMandatoryQueue; 57514184Sgabeblack@google.com } 57614184Sgabeblack@google.com 57714184Sgabeblack@google.com transition(I, Load) {TagArrayRead} { 57814184Sgabeblack@google.com n_issueRdBlk; 57914184Sgabeblack@google.com p_popMandatoryQueue; 58014184Sgabeblack@google.com } 58114184Sgabeblack@google.com 58214184Sgabeblack@google.com transition({V, I}, Atomic, A) {TagArrayRead, TagArrayWrite} { 58314184Sgabeblack@google.com t_allocateTBE; 58414184Sgabeblack@google.com mru_updateMRU; 58514184Sgabeblack@google.com at_atomicThrough; 58614184Sgabeblack@google.com p_popMandatoryQueue; 58714184Sgabeblack@google.com } 58814184Sgabeblack@google.com 58914184Sgabeblack@google.com transition({M, W}, Atomic, A) {TagArrayRead, TagArrayWrite} { 59014184Sgabeblack@google.com wt_writeThrough; 59114184Sgabeblack@google.com t_allocateTBE; 59214184Sgabeblack@google.com at_atomicThrough; 59314184Sgabeblack@google.com ic_invCache; 59414184Sgabeblack@google.com } 59514184Sgabeblack@google.com 59614184Sgabeblack@google.com transition(W, Load, I) {TagArrayRead, DataArrayRead} { 59714184Sgabeblack@google.com wt_writeThrough; 59814184Sgabeblack@google.com norl_issueRdBlkOrloadDone; 59914184Sgabeblack@google.com p_popMandatoryQueue; 60014184Sgabeblack@google.com } 60114184Sgabeblack@google.com 60214184Sgabeblack@google.com transition({I}, StoreLocal, L) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 60314184Sgabeblack@google.com a_allocate; 60414184Sgabeblack@google.com dw_dirtyWrite; 60514184Sgabeblack@google.com s_storeDone; 60614184Sgabeblack@google.com p_popMandatoryQueue; 60714184Sgabeblack@google.com } 60814184Sgabeblack@google.com 60914184Sgabeblack@google.com transition({L, V}, StoreLocal, L) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 61014184Sgabeblack@google.com dw_dirtyWrite; 61114184Sgabeblack@google.com mru_updateMRU; 61214184Sgabeblack@google.com s_storeDone; 61314184Sgabeblack@google.com p_popMandatoryQueue; 61414184Sgabeblack@google.com } 61514184Sgabeblack@google.com 61614184Sgabeblack@google.com transition(I, Store, W) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 61714184Sgabeblack@google.com a_allocate; 61814184Sgabeblack@google.com dw_dirtyWrite; 61914184Sgabeblack@google.com s_storeDone; 62014184Sgabeblack@google.com p_popMandatoryQueue; 62114184Sgabeblack@google.com } 62214184Sgabeblack@google.com 62314184Sgabeblack@google.com transition(V, Store, M) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 62414184Sgabeblack@google.com dw_dirtyWrite; 62514184Sgabeblack@google.com mru_updateMRU; 62614184Sgabeblack@google.com s_storeDone; 62714184Sgabeblack@google.com p_popMandatoryQueue; 62814184Sgabeblack@google.com } 62914184Sgabeblack@google.com 63014184Sgabeblack@google.com transition({M, W}, Store) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 63114184Sgabeblack@google.com dw_dirtyWrite; 63214184Sgabeblack@google.com mru_updateMRU; 63314184Sgabeblack@google.com s_storeDone; 63414184Sgabeblack@google.com p_popMandatoryQueue; 63514184Sgabeblack@google.com } 63614184Sgabeblack@google.com 63714184Sgabeblack@google.com //M,W should not see storeThrough 63814184Sgabeblack@google.com transition(I, StoreThrough) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 63914184Sgabeblack@google.com a_allocate; 64014184Sgabeblack@google.com dw_dirtyWrite; 64114184Sgabeblack@google.com s_storeDone; 64214184Sgabeblack@google.com wt_writeThrough; 64314184Sgabeblack@google.com ic_invCache; 64414184Sgabeblack@google.com p_popMandatoryQueue; 64514184Sgabeblack@google.com } 64614184Sgabeblack@google.com 64714184Sgabeblack@google.com transition({V,L}, StoreThrough, I) {TagArrayRead, TagArrayWrite, DataArrayWrite} { 64814184Sgabeblack@google.com dw_dirtyWrite; 64914184Sgabeblack@google.com s_storeDone; 65014184Sgabeblack@google.com wt_writeThrough; 65114184Sgabeblack@google.com ic_invCache; 65214184Sgabeblack@google.com p_popMandatoryQueue; 65314184Sgabeblack@google.com } 65414184Sgabeblack@google.com 65514184Sgabeblack@google.com transition(I, TCC_Ack, V) {TagArrayRead, TagArrayWrite, DataArrayRead, DataArrayWrite} { 65614184Sgabeblack@google.com a_allocate; 65714184Sgabeblack@google.com w_writeCache; 65814184Sgabeblack@google.com l_loadDone; 65914184Sgabeblack@google.com pr_popResponseQueue; 66014184Sgabeblack@google.com } 66114184Sgabeblack@google.com 66214184Sgabeblack@google.com transition(I, Bypass, I) { 66314184Sgabeblack@google.com rb_bypassDone; 66414184Sgabeblack@google.com pr_popResponseQueue; 66514184Sgabeblack@google.com } 66614184Sgabeblack@google.com 66714184Sgabeblack@google.com transition(A, Bypass, I){ 66814184Sgabeblack@google.com d_deallocateTBE; 66914184Sgabeblack@google.com wab_bypassDone; 67014184Sgabeblack@google.com pr_popResponseQueue; 67114184Sgabeblack@google.com } 67214184Sgabeblack@google.com 67314184Sgabeblack@google.com transition(A, TCC_Ack, I) {TagArrayRead, DataArrayRead, DataArrayWrite} { 67414184Sgabeblack@google.com d_deallocateTBE; 67514184Sgabeblack@google.com a_allocate; 67614184Sgabeblack@google.com w_writeCache; 67714184Sgabeblack@google.com s_storeDone; 67814184Sgabeblack@google.com pr_popResponseQueue; 67914184Sgabeblack@google.com ic_invCache; 68014184Sgabeblack@google.com } 68114184Sgabeblack@google.com 68214184Sgabeblack@google.com transition(V, TCC_Ack, V) {TagArrayRead, DataArrayRead, DataArrayWrite} { 68314184Sgabeblack@google.com w_writeCache; 68414184Sgabeblack@google.com l_loadDone; 68514184Sgabeblack@google.com pr_popResponseQueue; 68614184Sgabeblack@google.com } 68714184Sgabeblack@google.com 68814184Sgabeblack@google.com transition({W, M}, TCC_Ack, M) {TagArrayRead, TagArrayWrite, DataArrayRead, DataArrayWrite} { 68914184Sgabeblack@google.com w_writeCache; 69014184Sgabeblack@google.com l_loadDone; 69114184Sgabeblack@google.com pr_popResponseQueue; 69214184Sgabeblack@google.com } 69314184Sgabeblack@google.com 69414184Sgabeblack@google.com transition({I, V}, Repl, I) {TagArrayRead, TagArrayWrite} { 69514184Sgabeblack@google.com ic_invCache; 69614184Sgabeblack@google.com } 69714184Sgabeblack@google.com 69814184Sgabeblack@google.com transition({A}, Repl) {TagArrayRead, TagArrayWrite} { 69914184Sgabeblack@google.com ic_invCache; 70014184Sgabeblack@google.com } 70114184Sgabeblack@google.com 70214184Sgabeblack@google.com transition({W, M}, Repl, I) {TagArrayRead, TagArrayWrite, DataArrayRead} { 70314184Sgabeblack@google.com wt_writeThrough; 70414184Sgabeblack@google.com ic_invCache; 70514184Sgabeblack@google.com } 70614184Sgabeblack@google.com 70714184Sgabeblack@google.com transition(L, Repl, I) {TagArrayRead, TagArrayWrite, DataArrayRead} { 70814184Sgabeblack@google.com wt_writeThrough; 70914184Sgabeblack@google.com ic_invCache; 71014184Sgabeblack@google.com } 71114184Sgabeblack@google.com 71214184Sgabeblack@google.com transition({W, M}, Flush, I) {TagArrayRead, TagArrayWrite, DataArrayRead} { 71314184Sgabeblack@google.com sf_setFlush; 71414184Sgabeblack@google.com wt_writeThrough; 71514184Sgabeblack@google.com ic_invCache; 71614184Sgabeblack@google.com p_popMandatoryQueue; 71714184Sgabeblack@google.com } 71814184Sgabeblack@google.com 71914184Sgabeblack@google.com transition({V, I, A, L},Flush) {TagArrayFlash} { 72014184Sgabeblack@google.com sf_setFlush; 72114184Sgabeblack@google.com wb_wbDone; 72214184Sgabeblack@google.com p_popMandatoryQueue; 72314184Sgabeblack@google.com } 72414184Sgabeblack@google.com 72514184Sgabeblack@google.com transition({I, V}, Evict, I) {TagArrayFlash} { 72614184Sgabeblack@google.com inv_invDone; 72714184Sgabeblack@google.com p_popMandatoryQueue; 72814184Sgabeblack@google.com ic_invCache; 72914184Sgabeblack@google.com } 73014184Sgabeblack@google.com 73114184Sgabeblack@google.com transition({W, M}, Evict, W) {TagArrayFlash} { 73214184Sgabeblack@google.com inv_invDone; 73314184Sgabeblack@google.com p_popMandatoryQueue; 73414184Sgabeblack@google.com } 73514184Sgabeblack@google.com 73614184Sgabeblack@google.com transition({A, L}, Evict) {TagArrayFlash} { 73714184Sgabeblack@google.com inv_invDone; 73814184Sgabeblack@google.com p_popMandatoryQueue; 73914184Sgabeblack@google.com } 74014184Sgabeblack@google.com 74114184Sgabeblack@google.com // TCC_AckWB only snoops TBE 74214184Sgabeblack@google.com transition({V, I, A, M, W, L}, TCC_AckWB) { 74314184Sgabeblack@google.com wd_wtDone; 74414184Sgabeblack@google.com wb_wbDone; 74514184Sgabeblack@google.com pr_popResponseQueue; 74614184Sgabeblack@google.com } 74714184Sgabeblack@google.com} 748