Sequencer.cc revision 9104
16145Snate@binkert.org/* 26145Snate@binkert.org * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 36145Snate@binkert.org * All rights reserved. 46145Snate@binkert.org * 56145Snate@binkert.org * Redistribution and use in source and binary forms, with or without 66145Snate@binkert.org * modification, are permitted provided that the following conditions are 76145Snate@binkert.org * met: redistributions of source code must retain the above copyright 86145Snate@binkert.org * notice, this list of conditions and the following disclaimer; 96145Snate@binkert.org * redistributions in binary form must reproduce the above copyright 106145Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 116145Snate@binkert.org * documentation and/or other materials provided with the distribution; 126145Snate@binkert.org * neither the name of the copyright holders nor the names of its 136145Snate@binkert.org * contributors may be used to endorse or promote products derived from 146145Snate@binkert.org * this software without specific prior written permission. 156145Snate@binkert.org * 166145Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176145Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196145Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206145Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216145Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226145Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256145Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266145Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276145Snate@binkert.org */ 286145Snate@binkert.org 298229Snate@binkert.org#include "base/misc.hh" 307056Snate@binkert.org#include "base/str.hh" 318615Snilay@cs.wisc.edu#include "config/the_isa.hh" 328615Snilay@cs.wisc.edu#if THE_ISA == X86_ISA 338615Snilay@cs.wisc.edu#include "arch/x86/insts/microldstop.hh" 348615Snilay@cs.wisc.edu#endif // X86_ISA 357632SBrad.Beckmann@amd.com#include "cpu/testers/rubytest/RubyTester.hh" 368232Snate@binkert.org#include "debug/MemoryAccess.hh" 378232Snate@binkert.org#include "debug/ProtocolTrace.hh" 388615Snilay@cs.wisc.edu#include "debug/RubySequencer.hh" 399104Shestness@cs.utexas.edu#include "debug/RubyStats.hh" 408615Snilay@cs.wisc.edu#include "mem/protocol/PrefetchBit.hh" 418615Snilay@cs.wisc.edu#include "mem/protocol/RubyAccessMode.hh" 427039Snate@binkert.org#include "mem/ruby/buffers/MessageBuffer.hh" 437039Snate@binkert.org#include "mem/ruby/common/Global.hh" 447039Snate@binkert.org#include "mem/ruby/profiler/Profiler.hh" 458229Snate@binkert.org#include "mem/ruby/slicc_interface/RubyRequest.hh" 467039Snate@binkert.org#include "mem/ruby/system/CacheMemory.hh" 476154Snate@binkert.org#include "mem/ruby/system/Sequencer.hh" 486154Snate@binkert.org#include "mem/ruby/system/System.hh" 497550SBrad.Beckmann@amd.com#include "mem/packet.hh" 506876Ssteve.reinhardt@amd.com#include "params/RubySequencer.hh" 516876Ssteve.reinhardt@amd.com 527055Snate@binkert.orgusing namespace std; 537055Snate@binkert.org 546876Ssteve.reinhardt@amd.comSequencer * 556876Ssteve.reinhardt@amd.comRubySequencerParams::create() 566285Snate@binkert.org{ 576876Ssteve.reinhardt@amd.com return new Sequencer(this); 586285Snate@binkert.org} 597039Snate@binkert.org 606876Ssteve.reinhardt@amd.comSequencer::Sequencer(const Params *p) 616886SBrad.Beckmann@amd.com : RubyPort(p), deadlockCheckEvent(this) 626876Ssteve.reinhardt@amd.com{ 636876Ssteve.reinhardt@amd.com m_store_waiting_on_load_cycles = 0; 646876Ssteve.reinhardt@amd.com m_store_waiting_on_store_cycles = 0; 656876Ssteve.reinhardt@amd.com m_load_waiting_on_store_cycles = 0; 666876Ssteve.reinhardt@amd.com m_load_waiting_on_load_cycles = 0; 677039Snate@binkert.org 686876Ssteve.reinhardt@amd.com m_outstanding_count = 0; 696285Snate@binkert.org 706876Ssteve.reinhardt@amd.com m_instCache_ptr = p->icache; 716876Ssteve.reinhardt@amd.com m_dataCache_ptr = p->dcache; 726876Ssteve.reinhardt@amd.com m_max_outstanding_requests = p->max_outstanding_requests; 736876Ssteve.reinhardt@amd.com m_deadlock_threshold = p->deadlock_threshold; 746899SBrad.Beckmann@amd.com 756876Ssteve.reinhardt@amd.com assert(m_max_outstanding_requests > 0); 766876Ssteve.reinhardt@amd.com assert(m_deadlock_threshold > 0); 776876Ssteve.reinhardt@amd.com assert(m_instCache_ptr != NULL); 786876Ssteve.reinhardt@amd.com assert(m_dataCache_ptr != NULL); 798171Stushar@csail.mit.edu 808171Stushar@csail.mit.edu m_usingNetworkTester = p->using_network_tester; 816145Snate@binkert.org} 826145Snate@binkert.org 837039Snate@binkert.orgSequencer::~Sequencer() 847039Snate@binkert.org{ 856145Snate@binkert.org} 866145Snate@binkert.org 877039Snate@binkert.orgvoid 887039Snate@binkert.orgSequencer::wakeup() 897039Snate@binkert.org{ 907039Snate@binkert.org // Check for deadlock of any of the requests 917039Snate@binkert.org Time current_time = g_eventQueue_ptr->getTime(); 926145Snate@binkert.org 937039Snate@binkert.org // Check across all outstanding requests 947039Snate@binkert.org int total_outstanding = 0; 956285Snate@binkert.org 967455Snate@binkert.org RequestTable::iterator read = m_readRequestTable.begin(); 977455Snate@binkert.org RequestTable::iterator read_end = m_readRequestTable.end(); 987455Snate@binkert.org for (; read != read_end; ++read) { 997455Snate@binkert.org SequencerRequest* request = read->second; 1007455Snate@binkert.org if (current_time - request->issue_time < m_deadlock_threshold) 1017455Snate@binkert.org continue; 1027455Snate@binkert.org 1037805Snilay@cs.wisc.edu panic("Possible Deadlock detected. Aborting!\n" 1047921SBrad.Beckmann@amd.com "version: %d request.paddr: 0x%x m_readRequestTable: %d " 1057805Snilay@cs.wisc.edu "current time: %u issue_time: %d difference: %d\n", m_version, 1068615Snilay@cs.wisc.edu Address(request->pkt->getAddr()), m_readRequestTable.size(), 1077805Snilay@cs.wisc.edu current_time, request->issue_time, 1087805Snilay@cs.wisc.edu current_time - request->issue_time); 1096145Snate@binkert.org } 1106145Snate@binkert.org 1117455Snate@binkert.org RequestTable::iterator write = m_writeRequestTable.begin(); 1127455Snate@binkert.org RequestTable::iterator write_end = m_writeRequestTable.end(); 1137455Snate@binkert.org for (; write != write_end; ++write) { 1147455Snate@binkert.org SequencerRequest* request = write->second; 1157455Snate@binkert.org if (current_time - request->issue_time < m_deadlock_threshold) 1167455Snate@binkert.org continue; 1177455Snate@binkert.org 1187805Snilay@cs.wisc.edu panic("Possible Deadlock detected. Aborting!\n" 1197921SBrad.Beckmann@amd.com "version: %d request.paddr: 0x%x m_writeRequestTable: %d " 1207805Snilay@cs.wisc.edu "current time: %u issue_time: %d difference: %d\n", m_version, 1218615Snilay@cs.wisc.edu Address(request->pkt->getAddr()), m_writeRequestTable.size(), 1227805Snilay@cs.wisc.edu current_time, request->issue_time, 1237805Snilay@cs.wisc.edu current_time - request->issue_time); 1246145Snate@binkert.org } 1256285Snate@binkert.org 1267039Snate@binkert.org total_outstanding += m_writeRequestTable.size(); 1277039Snate@binkert.org total_outstanding += m_readRequestTable.size(); 1286145Snate@binkert.org 1297039Snate@binkert.org assert(m_outstanding_count == total_outstanding); 1307039Snate@binkert.org 1317039Snate@binkert.org if (m_outstanding_count > 0) { 1327039Snate@binkert.org // If there are still outstanding requests, keep checking 1337039Snate@binkert.org schedule(deadlockCheckEvent, 1347039Snate@binkert.org m_deadlock_threshold * g_eventQueue_ptr->getClock() + 1357823Ssteve.reinhardt@amd.com curTick()); 1367039Snate@binkert.org } 1376145Snate@binkert.org} 1386145Snate@binkert.org 1397039Snate@binkert.orgvoid 1407039Snate@binkert.orgSequencer::printStats(ostream & out) const 1417039Snate@binkert.org{ 1427039Snate@binkert.org out << "Sequencer: " << m_name << endl 1437039Snate@binkert.org << " store_waiting_on_load_cycles: " 1447039Snate@binkert.org << m_store_waiting_on_load_cycles << endl 1457039Snate@binkert.org << " store_waiting_on_store_cycles: " 1467039Snate@binkert.org << m_store_waiting_on_store_cycles << endl 1477039Snate@binkert.org << " load_waiting_on_load_cycles: " 1487039Snate@binkert.org << m_load_waiting_on_load_cycles << endl 1497039Snate@binkert.org << " load_waiting_on_store_cycles: " 1507039Snate@binkert.org << m_load_waiting_on_store_cycles << endl; 1516859Sdrh5@cs.wisc.edu} 1526859Sdrh5@cs.wisc.edu 1537039Snate@binkert.orgvoid 1547039Snate@binkert.orgSequencer::printProgress(ostream& out) const 1557039Snate@binkert.org{ 1567039Snate@binkert.org#if 0 1577039Snate@binkert.org int total_demand = 0; 1587039Snate@binkert.org out << "Sequencer Stats Version " << m_version << endl; 1597039Snate@binkert.org out << "Current time = " << g_eventQueue_ptr->getTime() << endl; 1607039Snate@binkert.org out << "---------------" << endl; 1617039Snate@binkert.org out << "outstanding requests" << endl; 1626145Snate@binkert.org 1637455Snate@binkert.org out << "proc " << m_Read 1647455Snate@binkert.org << " version Requests = " << m_readRequestTable.size() << endl; 1656145Snate@binkert.org 1667039Snate@binkert.org // print the request table 1677455Snate@binkert.org RequestTable::iterator read = m_readRequestTable.begin(); 1687455Snate@binkert.org RequestTable::iterator read_end = m_readRequestTable.end(); 1697455Snate@binkert.org for (; read != read_end; ++read) { 1707455Snate@binkert.org SequencerRequest* request = read->second; 1717039Snate@binkert.org out << "\tRequest[ " << i << " ] = " << request->type 1727039Snate@binkert.org << " Address " << rkeys[i] 1737039Snate@binkert.org << " Posted " << request->issue_time 1747039Snate@binkert.org << " PF " << PrefetchBit_No << endl; 1756145Snate@binkert.org total_demand++; 1767039Snate@binkert.org } 1776145Snate@binkert.org 1787455Snate@binkert.org out << "proc " << m_version 1797455Snate@binkert.org << " Write Requests = " << m_writeRequestTable.size << endl; 1806285Snate@binkert.org 1817039Snate@binkert.org // print the request table 1827455Snate@binkert.org RequestTable::iterator write = m_writeRequestTable.begin(); 1837455Snate@binkert.org RequestTable::iterator write_end = m_writeRequestTable.end(); 1847455Snate@binkert.org for (; write != write_end; ++write) { 1857455Snate@binkert.org SequencerRequest* request = write->second; 1867039Snate@binkert.org out << "\tRequest[ " << i << " ] = " << request.getType() 1877039Snate@binkert.org << " Address " << wkeys[i] 1887039Snate@binkert.org << " Posted " << request.getTime() 1897039Snate@binkert.org << " PF " << request.getPrefetch() << endl; 1907039Snate@binkert.org if (request.getPrefetch() == PrefetchBit_No) { 1917039Snate@binkert.org total_demand++; 1927039Snate@binkert.org } 1937039Snate@binkert.org } 1947039Snate@binkert.org 1957039Snate@binkert.org out << endl; 1967039Snate@binkert.org 1977039Snate@binkert.org out << "Total Number Outstanding: " << m_outstanding_count << endl 1987039Snate@binkert.org << "Total Number Demand : " << total_demand << endl 1997039Snate@binkert.org << "Total Number Prefetches : " << m_outstanding_count - total_demand 2007039Snate@binkert.org << endl << endl << endl; 2017039Snate@binkert.org#endif 2026145Snate@binkert.org} 2036145Snate@binkert.org 2047039Snate@binkert.orgvoid 2057039Snate@binkert.orgSequencer::printConfig(ostream& out) const 2067039Snate@binkert.org{ 2077039Snate@binkert.org out << "Seqeuncer config: " << m_name << endl 2087039Snate@binkert.org << " controller: " << m_controller->getName() << endl 2097039Snate@binkert.org << " version: " << m_version << endl 2107039Snate@binkert.org << " max_outstanding_requests: " << m_max_outstanding_requests << endl 2117039Snate@binkert.org << " deadlock_threshold: " << m_deadlock_threshold << endl; 2126145Snate@binkert.org} 2136145Snate@binkert.org 2146145Snate@binkert.org// Insert the request on the correct request table. Return true if 2156145Snate@binkert.org// the entry was already present. 2168615Snilay@cs.wisc.eduRequestStatus 2178615Snilay@cs.wisc.eduSequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) 2187039Snate@binkert.org{ 2198641Snate@binkert.org assert(m_outstanding_count == 2208641Snate@binkert.org (m_writeRequestTable.size() + m_readRequestTable.size())); 2216145Snate@binkert.org 2227039Snate@binkert.org // See if we should schedule a deadlock check 2237039Snate@binkert.org if (deadlockCheckEvent.scheduled() == false) { 2249011Snilay@cs.wisc.edu schedule(deadlockCheckEvent, 2259011Snilay@cs.wisc.edu m_deadlock_threshold * g_eventQueue_ptr->getClock() 2269011Snilay@cs.wisc.edu + curTick()); 2277039Snate@binkert.org } 2286145Snate@binkert.org 2298615Snilay@cs.wisc.edu Address line_addr(pkt->getAddr()); 2307039Snate@binkert.org line_addr.makeLineAddress(); 2318615Snilay@cs.wisc.edu if ((request_type == RubyRequestType_ST) || 2328615Snilay@cs.wisc.edu (request_type == RubyRequestType_RMW_Read) || 2338615Snilay@cs.wisc.edu (request_type == RubyRequestType_RMW_Write) || 2348615Snilay@cs.wisc.edu (request_type == RubyRequestType_Load_Linked) || 2358615Snilay@cs.wisc.edu (request_type == RubyRequestType_Store_Conditional) || 2368615Snilay@cs.wisc.edu (request_type == RubyRequestType_Locked_RMW_Read) || 2378615Snilay@cs.wisc.edu (request_type == RubyRequestType_Locked_RMW_Write) || 2388615Snilay@cs.wisc.edu (request_type == RubyRequestType_FLUSH)) { 2398615Snilay@cs.wisc.edu 2408615Snilay@cs.wisc.edu // Check if there is any outstanding read request for the same 2418615Snilay@cs.wisc.edu // cache line. 2428615Snilay@cs.wisc.edu if (m_readRequestTable.count(line_addr) > 0) { 2438615Snilay@cs.wisc.edu m_store_waiting_on_load_cycles++; 2448615Snilay@cs.wisc.edu return RequestStatus_Aliased; 2458615Snilay@cs.wisc.edu } 2468615Snilay@cs.wisc.edu 2477455Snate@binkert.org pair<RequestTable::iterator, bool> r = 2487455Snate@binkert.org m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0)); 2498615Snilay@cs.wisc.edu if (r.second) { 2508615Snilay@cs.wisc.edu RequestTable::iterator i = r.first; 2518615Snilay@cs.wisc.edu i->second = new SequencerRequest(pkt, request_type, 2528615Snilay@cs.wisc.edu g_eventQueue_ptr->getTime()); 2538615Snilay@cs.wisc.edu m_outstanding_count++; 2548615Snilay@cs.wisc.edu } else { 2558615Snilay@cs.wisc.edu // There is an outstanding write request for the cache line 2568615Snilay@cs.wisc.edu m_store_waiting_on_store_cycles++; 2578615Snilay@cs.wisc.edu return RequestStatus_Aliased; 2588615Snilay@cs.wisc.edu } 2598615Snilay@cs.wisc.edu } else { 2608615Snilay@cs.wisc.edu // Check if there is any outstanding write request for the same 2618615Snilay@cs.wisc.edu // cache line. 2628615Snilay@cs.wisc.edu if (m_writeRequestTable.count(line_addr) > 0) { 2638615Snilay@cs.wisc.edu m_load_waiting_on_store_cycles++; 2648615Snilay@cs.wisc.edu return RequestStatus_Aliased; 2658615Snilay@cs.wisc.edu } 2667039Snate@binkert.org 2677455Snate@binkert.org pair<RequestTable::iterator, bool> r = 2687455Snate@binkert.org m_readRequestTable.insert(RequestTable::value_type(line_addr, 0)); 2697039Snate@binkert.org 2708615Snilay@cs.wisc.edu if (r.second) { 2718615Snilay@cs.wisc.edu RequestTable::iterator i = r.first; 2728615Snilay@cs.wisc.edu i->second = new SequencerRequest(pkt, request_type, 2738615Snilay@cs.wisc.edu g_eventQueue_ptr->getTime()); 2748615Snilay@cs.wisc.edu m_outstanding_count++; 2758615Snilay@cs.wisc.edu } else { 2768615Snilay@cs.wisc.edu // There is an outstanding read request for the cache line 2778615Snilay@cs.wisc.edu m_load_waiting_on_load_cycles++; 2788615Snilay@cs.wisc.edu return RequestStatus_Aliased; 2797039Snate@binkert.org } 2806145Snate@binkert.org } 2816145Snate@binkert.org 2827039Snate@binkert.org g_system_ptr->getProfiler()->sequencerRequests(m_outstanding_count); 2838641Snate@binkert.org assert(m_outstanding_count == 2848641Snate@binkert.org (m_writeRequestTable.size() + m_readRequestTable.size())); 2856145Snate@binkert.org 2868615Snilay@cs.wisc.edu return RequestStatus_Ready; 2876145Snate@binkert.org} 2886145Snate@binkert.org 2897039Snate@binkert.orgvoid 2907455Snate@binkert.orgSequencer::markRemoved() 2917455Snate@binkert.org{ 2927455Snate@binkert.org m_outstanding_count--; 2937455Snate@binkert.org assert(m_outstanding_count == 2947455Snate@binkert.org m_writeRequestTable.size() + m_readRequestTable.size()); 2957455Snate@binkert.org} 2967455Snate@binkert.org 2977455Snate@binkert.orgvoid 2987039Snate@binkert.orgSequencer::removeRequest(SequencerRequest* srequest) 2997039Snate@binkert.org{ 3007039Snate@binkert.org assert(m_outstanding_count == 3017039Snate@binkert.org m_writeRequestTable.size() + m_readRequestTable.size()); 3026145Snate@binkert.org 3038615Snilay@cs.wisc.edu Address line_addr(srequest->pkt->getAddr()); 3047039Snate@binkert.org line_addr.makeLineAddress(); 3058615Snilay@cs.wisc.edu if ((srequest->m_type == RubyRequestType_ST) || 3068615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_RMW_Read) || 3078615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_RMW_Write) || 3088615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_Load_Linked) || 3098615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_Store_Conditional) || 3108615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_Locked_RMW_Read) || 3118615Snilay@cs.wisc.edu (srequest->m_type == RubyRequestType_Locked_RMW_Write)) { 3127455Snate@binkert.org m_writeRequestTable.erase(line_addr); 3137039Snate@binkert.org } else { 3147455Snate@binkert.org m_readRequestTable.erase(line_addr); 3157039Snate@binkert.org } 3166285Snate@binkert.org 3177455Snate@binkert.org markRemoved(); 3186145Snate@binkert.org} 3196145Snate@binkert.org 3207560SBrad.Beckmann@amd.combool 3217560SBrad.Beckmann@amd.comSequencer::handleLlsc(const Address& address, SequencerRequest* request) 3227550SBrad.Beckmann@amd.com{ 3237560SBrad.Beckmann@amd.com // 3247560SBrad.Beckmann@amd.com // The success flag indicates whether the LLSC operation was successful. 3257560SBrad.Beckmann@amd.com // LL ops will always succeed, but SC may fail if the cache line is no 3267560SBrad.Beckmann@amd.com // longer locked. 3277560SBrad.Beckmann@amd.com // 3287560SBrad.Beckmann@amd.com bool success = true; 3298615Snilay@cs.wisc.edu if (request->m_type == RubyRequestType_Store_Conditional) { 3307550SBrad.Beckmann@amd.com if (!m_dataCache_ptr->isLocked(address, m_version)) { 3317550SBrad.Beckmann@amd.com // 3327550SBrad.Beckmann@amd.com // For failed SC requests, indicate the failure to the cpu by 3337550SBrad.Beckmann@amd.com // setting the extra data to zero. 3347550SBrad.Beckmann@amd.com // 3358615Snilay@cs.wisc.edu request->pkt->req->setExtraData(0); 3367560SBrad.Beckmann@amd.com success = false; 3377550SBrad.Beckmann@amd.com } else { 3387550SBrad.Beckmann@amd.com // 3397550SBrad.Beckmann@amd.com // For successful SC requests, indicate the success to the cpu by 3407550SBrad.Beckmann@amd.com // setting the extra data to one. 3417550SBrad.Beckmann@amd.com // 3428615Snilay@cs.wisc.edu request->pkt->req->setExtraData(1); 3437550SBrad.Beckmann@amd.com } 3447560SBrad.Beckmann@amd.com // 3457560SBrad.Beckmann@amd.com // Independent of success, all SC operations must clear the lock 3467560SBrad.Beckmann@amd.com // 3477550SBrad.Beckmann@amd.com m_dataCache_ptr->clearLocked(address); 3488615Snilay@cs.wisc.edu } else if (request->m_type == RubyRequestType_Load_Linked) { 3497550SBrad.Beckmann@amd.com // 3507550SBrad.Beckmann@amd.com // Note: To fully follow Alpha LLSC semantics, should the LL clear any 3517550SBrad.Beckmann@amd.com // previously locked cache lines? 3527550SBrad.Beckmann@amd.com // 3537550SBrad.Beckmann@amd.com m_dataCache_ptr->setLocked(address, m_version); 3548615Snilay@cs.wisc.edu } else if ((m_dataCache_ptr->isTagPresent(address)) && 3558615Snilay@cs.wisc.edu (m_dataCache_ptr->isLocked(address, m_version))) { 3567550SBrad.Beckmann@amd.com // 3577550SBrad.Beckmann@amd.com // Normal writes should clear the locked address 3587550SBrad.Beckmann@amd.com // 3597550SBrad.Beckmann@amd.com m_dataCache_ptr->clearLocked(address); 3607550SBrad.Beckmann@amd.com } 3617560SBrad.Beckmann@amd.com return success; 3627550SBrad.Beckmann@amd.com} 3637550SBrad.Beckmann@amd.com 3647550SBrad.Beckmann@amd.comvoid 3657039Snate@binkert.orgSequencer::writeCallback(const Address& address, DataBlock& data) 3667039Snate@binkert.org{ 3677546SBrad.Beckmann@amd.com writeCallback(address, GenericMachineType_NULL, data); 3687546SBrad.Beckmann@amd.com} 3697546SBrad.Beckmann@amd.com 3707546SBrad.Beckmann@amd.comvoid 3717546SBrad.Beckmann@amd.comSequencer::writeCallback(const Address& address, 3727546SBrad.Beckmann@amd.com GenericMachineType mach, 3737546SBrad.Beckmann@amd.com DataBlock& data) 3747546SBrad.Beckmann@amd.com{ 3757565SBrad.Beckmann@amd.com writeCallback(address, mach, data, 0, 0, 0); 3767565SBrad.Beckmann@amd.com} 3777565SBrad.Beckmann@amd.com 3787565SBrad.Beckmann@amd.comvoid 3797565SBrad.Beckmann@amd.comSequencer::writeCallback(const Address& address, 3807565SBrad.Beckmann@amd.com GenericMachineType mach, 3817565SBrad.Beckmann@amd.com DataBlock& data, 3827565SBrad.Beckmann@amd.com Time initialRequestTime, 3837565SBrad.Beckmann@amd.com Time forwardRequestTime, 3847565SBrad.Beckmann@amd.com Time firstResponseTime) 3857565SBrad.Beckmann@amd.com{ 3867039Snate@binkert.org assert(address == line_address(address)); 3877455Snate@binkert.org assert(m_writeRequestTable.count(line_address(address))); 3886145Snate@binkert.org 3897455Snate@binkert.org RequestTable::iterator i = m_writeRequestTable.find(address); 3907455Snate@binkert.org assert(i != m_writeRequestTable.end()); 3917455Snate@binkert.org SequencerRequest* request = i->second; 3926145Snate@binkert.org 3937455Snate@binkert.org m_writeRequestTable.erase(i); 3947455Snate@binkert.org markRemoved(); 3956846Spdudnik@cs.wisc.edu 3968615Snilay@cs.wisc.edu assert((request->m_type == RubyRequestType_ST) || 3978615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_ATOMIC) || 3988615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_RMW_Read) || 3998615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_RMW_Write) || 4008615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_Load_Linked) || 4018615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_Store_Conditional) || 4028615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_Locked_RMW_Read) || 4038615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_Locked_RMW_Write) || 4048615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_FLUSH)); 4058184Ssomayeh@cs.wisc.edu 4066145Snate@binkert.org 4077550SBrad.Beckmann@amd.com // 4087550SBrad.Beckmann@amd.com // For Alpha, properly handle LL, SC, and write requests with respect to 4097550SBrad.Beckmann@amd.com // locked cache blocks. 4107550SBrad.Beckmann@amd.com // 4118171Stushar@csail.mit.edu // Not valid for Network_test protocl 4128171Stushar@csail.mit.edu // 4138171Stushar@csail.mit.edu bool success = true; 4148171Stushar@csail.mit.edu if(!m_usingNetworkTester) 4158171Stushar@csail.mit.edu success = handleLlsc(address, request); 4167550SBrad.Beckmann@amd.com 4178615Snilay@cs.wisc.edu if (request->m_type == RubyRequestType_Locked_RMW_Read) { 4187039Snate@binkert.org m_controller->blockOnQueue(address, m_mandatory_q_ptr); 4198615Snilay@cs.wisc.edu } else if (request->m_type == RubyRequestType_Locked_RMW_Write) { 4207039Snate@binkert.org m_controller->unblock(address); 4217039Snate@binkert.org } 4226863Sdrh5@cs.wisc.edu 4237565SBrad.Beckmann@amd.com hitCallback(request, mach, data, success, 4247565SBrad.Beckmann@amd.com initialRequestTime, forwardRequestTime, firstResponseTime); 4256145Snate@binkert.org} 4266145Snate@binkert.org 4277039Snate@binkert.orgvoid 4287039Snate@binkert.orgSequencer::readCallback(const Address& address, DataBlock& data) 4297039Snate@binkert.org{ 4307546SBrad.Beckmann@amd.com readCallback(address, GenericMachineType_NULL, data); 4317546SBrad.Beckmann@amd.com} 4327546SBrad.Beckmann@amd.com 4337546SBrad.Beckmann@amd.comvoid 4347546SBrad.Beckmann@amd.comSequencer::readCallback(const Address& address, 4357546SBrad.Beckmann@amd.com GenericMachineType mach, 4367546SBrad.Beckmann@amd.com DataBlock& data) 4377546SBrad.Beckmann@amd.com{ 4387565SBrad.Beckmann@amd.com readCallback(address, mach, data, 0, 0, 0); 4397565SBrad.Beckmann@amd.com} 4407565SBrad.Beckmann@amd.com 4417565SBrad.Beckmann@amd.comvoid 4427565SBrad.Beckmann@amd.comSequencer::readCallback(const Address& address, 4437565SBrad.Beckmann@amd.com GenericMachineType mach, 4447565SBrad.Beckmann@amd.com DataBlock& data, 4457565SBrad.Beckmann@amd.com Time initialRequestTime, 4467565SBrad.Beckmann@amd.com Time forwardRequestTime, 4477565SBrad.Beckmann@amd.com Time firstResponseTime) 4487565SBrad.Beckmann@amd.com{ 4497039Snate@binkert.org assert(address == line_address(address)); 4507455Snate@binkert.org assert(m_readRequestTable.count(line_address(address))); 4516145Snate@binkert.org 4527455Snate@binkert.org RequestTable::iterator i = m_readRequestTable.find(address); 4537455Snate@binkert.org assert(i != m_readRequestTable.end()); 4547455Snate@binkert.org SequencerRequest* request = i->second; 4557455Snate@binkert.org 4567455Snate@binkert.org m_readRequestTable.erase(i); 4577455Snate@binkert.org markRemoved(); 4586145Snate@binkert.org 4598615Snilay@cs.wisc.edu assert((request->m_type == RubyRequestType_LD) || 4608615Snilay@cs.wisc.edu (request->m_type == RubyRequestType_IFETCH)); 4616285Snate@binkert.org 4627565SBrad.Beckmann@amd.com hitCallback(request, mach, data, true, 4637565SBrad.Beckmann@amd.com initialRequestTime, forwardRequestTime, firstResponseTime); 4646145Snate@binkert.org} 4656145Snate@binkert.org 4667039Snate@binkert.orgvoid 4677546SBrad.Beckmann@amd.comSequencer::hitCallback(SequencerRequest* srequest, 4687546SBrad.Beckmann@amd.com GenericMachineType mach, 4697560SBrad.Beckmann@amd.com DataBlock& data, 4707565SBrad.Beckmann@amd.com bool success, 4717565SBrad.Beckmann@amd.com Time initialRequestTime, 4727565SBrad.Beckmann@amd.com Time forwardRequestTime, 4737565SBrad.Beckmann@amd.com Time firstResponseTime) 4747039Snate@binkert.org{ 4758615Snilay@cs.wisc.edu PacketPtr pkt = srequest->pkt; 4768615Snilay@cs.wisc.edu Address request_address(pkt->getAddr()); 4778615Snilay@cs.wisc.edu Address request_line_address(pkt->getAddr()); 4787039Snate@binkert.org request_line_address.makeLineAddress(); 4798615Snilay@cs.wisc.edu RubyRequestType type = srequest->m_type; 4807039Snate@binkert.org Time issued_time = srequest->issue_time; 4816145Snate@binkert.org 4827039Snate@binkert.org // Set this cache entry to the most recently used 4837039Snate@binkert.org if (type == RubyRequestType_IFETCH) { 4848828Snilay@cs.wisc.edu m_instCache_ptr->setMRU(request_line_address); 4857039Snate@binkert.org } else { 4868828Snilay@cs.wisc.edu m_dataCache_ptr->setMRU(request_line_address); 4877039Snate@binkert.org } 4886145Snate@binkert.org 4897039Snate@binkert.org assert(g_eventQueue_ptr->getTime() >= issued_time); 4907039Snate@binkert.org Time miss_latency = g_eventQueue_ptr->getTime() - issued_time; 4916145Snate@binkert.org 4927039Snate@binkert.org // Profile the miss latency for all non-zero demand misses 4937039Snate@binkert.org if (miss_latency != 0) { 4947546SBrad.Beckmann@amd.com g_system_ptr->getProfiler()->missLatency(miss_latency, type, mach); 4956285Snate@binkert.org 4967565SBrad.Beckmann@amd.com if (mach == GenericMachineType_L1Cache_wCC) { 4977565SBrad.Beckmann@amd.com g_system_ptr->getProfiler()->missLatencyWcc(issued_time, 4987565SBrad.Beckmann@amd.com initialRequestTime, 4997565SBrad.Beckmann@amd.com forwardRequestTime, 5007565SBrad.Beckmann@amd.com firstResponseTime, 5017565SBrad.Beckmann@amd.com g_eventQueue_ptr->getTime()); 5027565SBrad.Beckmann@amd.com } 5037565SBrad.Beckmann@amd.com 5047565SBrad.Beckmann@amd.com if (mach == GenericMachineType_Directory) { 5057565SBrad.Beckmann@amd.com g_system_ptr->getProfiler()->missLatencyDir(issued_time, 5067565SBrad.Beckmann@amd.com initialRequestTime, 5077565SBrad.Beckmann@amd.com forwardRequestTime, 5087565SBrad.Beckmann@amd.com firstResponseTime, 5097565SBrad.Beckmann@amd.com g_eventQueue_ptr->getTime()); 5107565SBrad.Beckmann@amd.com } 5117565SBrad.Beckmann@amd.com 5128266Sksewell@umich.edu DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %d cycles\n", 5138266Sksewell@umich.edu curTick(), m_version, "Seq", 5148266Sksewell@umich.edu success ? "Done" : "SC_Failed", "", "", 5158615Snilay@cs.wisc.edu request_address, miss_latency); 5166285Snate@binkert.org } 5176285Snate@binkert.org 5187039Snate@binkert.org // update the data 5198688Snilay@cs.wisc.edu if (g_system_ptr->m_warmup_enabled) { 5208688Snilay@cs.wisc.edu assert(pkt->getPtr<uint8_t>(false) != NULL); 5218688Snilay@cs.wisc.edu data.setData(pkt->getPtr<uint8_t>(false), 5228688Snilay@cs.wisc.edu request_address.getOffset(), pkt->getSize()); 5238688Snilay@cs.wisc.edu } else if (pkt->getPtr<uint8_t>(true) != NULL) { 5247039Snate@binkert.org if ((type == RubyRequestType_LD) || 5257039Snate@binkert.org (type == RubyRequestType_IFETCH) || 5267039Snate@binkert.org (type == RubyRequestType_RMW_Read) || 5277908Shestness@cs.utexas.edu (type == RubyRequestType_Locked_RMW_Read) || 5287907Shestness@cs.utexas.edu (type == RubyRequestType_Load_Linked)) { 5298615Snilay@cs.wisc.edu memcpy(pkt->getPtr<uint8_t>(true), 5308615Snilay@cs.wisc.edu data.getData(request_address.getOffset(), pkt->getSize()), 5318615Snilay@cs.wisc.edu pkt->getSize()); 5327039Snate@binkert.org } else { 5338615Snilay@cs.wisc.edu data.setData(pkt->getPtr<uint8_t>(true), 5348615Snilay@cs.wisc.edu request_address.getOffset(), pkt->getSize()); 5357039Snate@binkert.org } 5366285Snate@binkert.org } else { 5377039Snate@binkert.org DPRINTF(MemoryAccess, 5387039Snate@binkert.org "WARNING. Data not transfered from Ruby to M5 for type %s\n", 5397039Snate@binkert.org RubyRequestType_to_string(type)); 5407039Snate@binkert.org } 5417023SBrad.Beckmann@amd.com 5427039Snate@binkert.org // If using the RubyTester, update the RubyTester sender state's 5437039Snate@binkert.org // subBlock with the recieved data. The tester will later access 5447039Snate@binkert.org // this state. 5457039Snate@binkert.org // Note: RubyPort will access it's sender state before the 5467039Snate@binkert.org // RubyTester. 5477039Snate@binkert.org if (m_usingRubyTester) { 5487039Snate@binkert.org RubyPort::SenderState *requestSenderState = 5498615Snilay@cs.wisc.edu safe_cast<RubyPort::SenderState*>(pkt->senderState); 5507039Snate@binkert.org RubyTester::SenderState* testerSenderState = 5517039Snate@binkert.org safe_cast<RubyTester::SenderState*>(requestSenderState->saved); 5527039Snate@binkert.org testerSenderState->subBlock->mergeFrom(data); 5537039Snate@binkert.org } 5547023SBrad.Beckmann@amd.com 5557039Snate@binkert.org delete srequest; 5568688Snilay@cs.wisc.edu 5578688Snilay@cs.wisc.edu if (g_system_ptr->m_warmup_enabled) { 5588688Snilay@cs.wisc.edu delete pkt; 5598688Snilay@cs.wisc.edu g_system_ptr->m_cache_recorder->enqueueNextFetchRequest(); 5608688Snilay@cs.wisc.edu } else if (g_system_ptr->m_cooldown_enabled) { 5618688Snilay@cs.wisc.edu delete pkt; 5628688Snilay@cs.wisc.edu g_system_ptr->m_cache_recorder->enqueueNextFlushRequest(); 5638688Snilay@cs.wisc.edu } else { 5648688Snilay@cs.wisc.edu ruby_hit_callback(pkt); 5658688Snilay@cs.wisc.edu } 5666285Snate@binkert.org} 5676285Snate@binkert.org 5687039Snate@binkert.orgbool 5697039Snate@binkert.orgSequencer::empty() const 5707039Snate@binkert.org{ 5717455Snate@binkert.org return m_writeRequestTable.empty() && m_readRequestTable.empty(); 5726145Snate@binkert.org} 5736145Snate@binkert.org 5747039Snate@binkert.orgRequestStatus 5758615Snilay@cs.wisc.eduSequencer::makeRequest(PacketPtr pkt) 5767039Snate@binkert.org{ 5778615Snilay@cs.wisc.edu if (m_outstanding_count >= m_max_outstanding_requests) { 5788615Snilay@cs.wisc.edu return RequestStatus_BufferFull; 5798615Snilay@cs.wisc.edu } 5808615Snilay@cs.wisc.edu 5818615Snilay@cs.wisc.edu RubyRequestType primary_type = RubyRequestType_NULL; 5828615Snilay@cs.wisc.edu RubyRequestType secondary_type = RubyRequestType_NULL; 5838615Snilay@cs.wisc.edu 5848615Snilay@cs.wisc.edu if (pkt->isLLSC()) { 5858615Snilay@cs.wisc.edu // 5868615Snilay@cs.wisc.edu // Alpha LL/SC instructions need to be handled carefully by the cache 5878615Snilay@cs.wisc.edu // coherence protocol to ensure they follow the proper semantics. In 5888615Snilay@cs.wisc.edu // particular, by identifying the operations as atomic, the protocol 5898615Snilay@cs.wisc.edu // should understand that migratory sharing optimizations should not 5908615Snilay@cs.wisc.edu // be performed (i.e. a load between the LL and SC should not steal 5918615Snilay@cs.wisc.edu // away exclusive permission). 5928615Snilay@cs.wisc.edu // 5938615Snilay@cs.wisc.edu if (pkt->isWrite()) { 5948615Snilay@cs.wisc.edu DPRINTF(RubySequencer, "Issuing SC\n"); 5958615Snilay@cs.wisc.edu primary_type = RubyRequestType_Store_Conditional; 5968615Snilay@cs.wisc.edu } else { 5978615Snilay@cs.wisc.edu DPRINTF(RubySequencer, "Issuing LL\n"); 5988615Snilay@cs.wisc.edu assert(pkt->isRead()); 5998615Snilay@cs.wisc.edu primary_type = RubyRequestType_Load_Linked; 6008615Snilay@cs.wisc.edu } 6018615Snilay@cs.wisc.edu secondary_type = RubyRequestType_ATOMIC; 6028615Snilay@cs.wisc.edu } else if (pkt->req->isLocked()) { 6038615Snilay@cs.wisc.edu // 6048615Snilay@cs.wisc.edu // x86 locked instructions are translated to store cache coherence 6058615Snilay@cs.wisc.edu // requests because these requests should always be treated as read 6068615Snilay@cs.wisc.edu // exclusive operations and should leverage any migratory sharing 6078615Snilay@cs.wisc.edu // optimization built into the protocol. 6088615Snilay@cs.wisc.edu // 6098615Snilay@cs.wisc.edu if (pkt->isWrite()) { 6108615Snilay@cs.wisc.edu DPRINTF(RubySequencer, "Issuing Locked RMW Write\n"); 6118615Snilay@cs.wisc.edu primary_type = RubyRequestType_Locked_RMW_Write; 6128615Snilay@cs.wisc.edu } else { 6138615Snilay@cs.wisc.edu DPRINTF(RubySequencer, "Issuing Locked RMW Read\n"); 6148615Snilay@cs.wisc.edu assert(pkt->isRead()); 6158615Snilay@cs.wisc.edu primary_type = RubyRequestType_Locked_RMW_Read; 6168615Snilay@cs.wisc.edu } 6178615Snilay@cs.wisc.edu secondary_type = RubyRequestType_ST; 6188615Snilay@cs.wisc.edu } else { 6198615Snilay@cs.wisc.edu if (pkt->isRead()) { 6208615Snilay@cs.wisc.edu if (pkt->req->isInstFetch()) { 6218615Snilay@cs.wisc.edu primary_type = secondary_type = RubyRequestType_IFETCH; 6228615Snilay@cs.wisc.edu } else { 6238615Snilay@cs.wisc.edu#if THE_ISA == X86_ISA 6248615Snilay@cs.wisc.edu uint32_t flags = pkt->req->getFlags(); 6258615Snilay@cs.wisc.edu bool storeCheck = flags & 6268615Snilay@cs.wisc.edu (TheISA::StoreCheck << TheISA::FlagShift); 6278615Snilay@cs.wisc.edu#else 6288615Snilay@cs.wisc.edu bool storeCheck = false; 6298615Snilay@cs.wisc.edu#endif // X86_ISA 6308615Snilay@cs.wisc.edu if (storeCheck) { 6318615Snilay@cs.wisc.edu primary_type = RubyRequestType_RMW_Read; 6328615Snilay@cs.wisc.edu secondary_type = RubyRequestType_ST; 6338615Snilay@cs.wisc.edu } else { 6348615Snilay@cs.wisc.edu primary_type = secondary_type = RubyRequestType_LD; 6358615Snilay@cs.wisc.edu } 6368615Snilay@cs.wisc.edu } 6378615Snilay@cs.wisc.edu } else if (pkt->isWrite()) { 6388615Snilay@cs.wisc.edu // 6398615Snilay@cs.wisc.edu // Note: M5 packets do not differentiate ST from RMW_Write 6408615Snilay@cs.wisc.edu // 6418615Snilay@cs.wisc.edu primary_type = secondary_type = RubyRequestType_ST; 6428615Snilay@cs.wisc.edu } else if (pkt->isFlush()) { 6438615Snilay@cs.wisc.edu primary_type = secondary_type = RubyRequestType_FLUSH; 6448615Snilay@cs.wisc.edu } else { 6458615Snilay@cs.wisc.edu panic("Unsupported ruby packet type\n"); 6468615Snilay@cs.wisc.edu } 6478615Snilay@cs.wisc.edu } 6488615Snilay@cs.wisc.edu 6498615Snilay@cs.wisc.edu RequestStatus status = insertRequest(pkt, primary_type); 6507039Snate@binkert.org if (status != RequestStatus_Ready) 6517039Snate@binkert.org return status; 6526349Spdudnik@gmail.com 6538615Snilay@cs.wisc.edu issueRequest(pkt, secondary_type); 6546145Snate@binkert.org 6557039Snate@binkert.org // TODO: issue hardware prefetches here 6567039Snate@binkert.org return RequestStatus_Issued; 6576145Snate@binkert.org} 6586145Snate@binkert.org 6597039Snate@binkert.orgvoid 6608615Snilay@cs.wisc.eduSequencer::issueRequest(PacketPtr pkt, RubyRequestType secondary_type) 6617039Snate@binkert.org{ 6628615Snilay@cs.wisc.edu int proc_id = -1; 6638615Snilay@cs.wisc.edu if (pkt != NULL && pkt->req->hasContextId()) { 6648615Snilay@cs.wisc.edu proc_id = pkt->req->contextId(); 6657039Snate@binkert.org } 6666285Snate@binkert.org 6678615Snilay@cs.wisc.edu // If valid, copy the pc to the ruby request 6688615Snilay@cs.wisc.edu Addr pc = 0; 6698615Snilay@cs.wisc.edu if (pkt->req->hasPC()) { 6708615Snilay@cs.wisc.edu pc = pkt->req->getPC(); 6717039Snate@binkert.org } 6726285Snate@binkert.org 6738615Snilay@cs.wisc.edu RubyRequest *msg = new RubyRequest(pkt->getAddr(), 6748615Snilay@cs.wisc.edu pkt->getPtr<uint8_t>(true), 6758615Snilay@cs.wisc.edu pkt->getSize(), pc, secondary_type, 6768615Snilay@cs.wisc.edu RubyAccessMode_Supervisor, pkt, 6778188SLisa.Hsu@amd.com PrefetchBit_No, proc_id); 6786285Snate@binkert.org 6798266Sksewell@umich.edu DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\n", 6808266Sksewell@umich.edu curTick(), m_version, "Seq", "Begin", "", "", 6818615Snilay@cs.wisc.edu msg->getPhysicalAddress(), 6828615Snilay@cs.wisc.edu RubyRequestType_to_string(secondary_type)); 6836285Snate@binkert.org 6847039Snate@binkert.org Time latency = 0; // initialzed to an null value 6856285Snate@binkert.org 6868615Snilay@cs.wisc.edu if (secondary_type == RubyRequestType_IFETCH) 6877039Snate@binkert.org latency = m_instCache_ptr->getLatency(); 6887039Snate@binkert.org else 6897039Snate@binkert.org latency = m_dataCache_ptr->getLatency(); 6906285Snate@binkert.org 6917039Snate@binkert.org // Send the message to the cache controller 6927039Snate@binkert.org assert(latency > 0); 6936145Snate@binkert.org 6947039Snate@binkert.org assert(m_mandatory_q_ptr != NULL); 6957039Snate@binkert.org m_mandatory_q_ptr->enqueue(msg, latency); 6966145Snate@binkert.org} 6976145Snate@binkert.org 6987455Snate@binkert.orgtemplate <class KEY, class VALUE> 6997455Snate@binkert.orgstd::ostream & 7007455Snate@binkert.orgoperator<<(ostream &out, const m5::hash_map<KEY, VALUE> &map) 7017455Snate@binkert.org{ 7027455Snate@binkert.org typename m5::hash_map<KEY, VALUE>::const_iterator i = map.begin(); 7037455Snate@binkert.org typename m5::hash_map<KEY, VALUE>::const_iterator end = map.end(); 7047455Snate@binkert.org 7057455Snate@binkert.org out << "["; 7067455Snate@binkert.org for (; i != end; ++i) 7077455Snate@binkert.org out << " " << i->first << "=" << i->second; 7087455Snate@binkert.org out << " ]"; 7097455Snate@binkert.org 7107455Snate@binkert.org return out; 7117455Snate@binkert.org} 7127455Snate@binkert.org 7137039Snate@binkert.orgvoid 7147039Snate@binkert.orgSequencer::print(ostream& out) const 7157039Snate@binkert.org{ 7167039Snate@binkert.org out << "[Sequencer: " << m_version 7177039Snate@binkert.org << ", outstanding requests: " << m_outstanding_count 7187039Snate@binkert.org << ", read request table: " << m_readRequestTable 7197039Snate@binkert.org << ", write request table: " << m_writeRequestTable 7207039Snate@binkert.org << "]"; 7217039Snate@binkert.org} 7227039Snate@binkert.org 7237039Snate@binkert.org// this can be called from setState whenever coherence permissions are 7247039Snate@binkert.org// upgraded when invoked, coherence violations will be checked for the 7257039Snate@binkert.org// given block 7267039Snate@binkert.orgvoid 7277039Snate@binkert.orgSequencer::checkCoherence(const Address& addr) 7287039Snate@binkert.org{ 7296145Snate@binkert.org#ifdef CHECK_COHERENCE 7307039Snate@binkert.org g_system_ptr->checkGlobalCoherenceInvariant(addr); 7316145Snate@binkert.org#endif 7326145Snate@binkert.org} 7338717Snilay@cs.wisc.edu 7348717Snilay@cs.wisc.eduvoid 7359104Shestness@cs.utexas.eduSequencer::recordRequestType(SequencerRequestType requestType) { 7369104Shestness@cs.utexas.edu DPRINTF(RubyStats, "Recorded statistic: %s\n", 7379104Shestness@cs.utexas.edu SequencerRequestType_to_string(requestType)); 7389104Shestness@cs.utexas.edu} 7399104Shestness@cs.utexas.edu 7409104Shestness@cs.utexas.edu 7419104Shestness@cs.utexas.eduvoid 7428717Snilay@cs.wisc.eduSequencer::evictionCallback(const Address& address) 7438717Snilay@cs.wisc.edu{ 7448717Snilay@cs.wisc.edu ruby_eviction_callback(address); 7458717Snilay@cs.wisc.edu} 746