1/* |
2 * Copyright (c) 2012-2013 ARM Limited |
3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 48 unchanged lines hidden (view full) --- 59#include "mem/cache/mshr.hh" 60#include "sim/core.hh" 61 62using namespace std; 63 64MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false), 65 pendingDirty(false), postInvalidate(false), 66 postDowngrade(false), queue(NULL), order(0), addr(0), size(0), |
67 isSecure(false), inService(false), isForward(false), 68 threadNum(InvalidThreadID), data(NULL) |
69{ 70} 71 72 73MSHR::TargetList::TargetList() 74 : needsExclusive(false), hasUpgrade(false) 75{} 76 --- 119 unchanged lines hidden (view full) --- 196 } 197 ccprintf(os, "%s%s: ", prefix, s); 198 i->pkt->print(os, verbosity, ""); 199 } 200} 201 202 203void |
204MSHR::allocate(Addr _addr, int _size, PacketPtr target, Tick whenReady, 205 Counter _order) |
206{ 207 addr = _addr; 208 size = _size; |
209 isSecure = target->isSecure(); |
210 readyTime = whenReady; 211 order = _order; 212 assert(target); 213 isForward = false; 214 _isUncacheable = target->req->isUncacheable(); 215 inService = false; 216 downstreamPending = false; 217 threadNum = 0; --- 218 unchanged lines hidden (view full) --- 436 437bool 438MSHR::checkFunctional(PacketPtr pkt) 439{ 440 // For printing, we treat the MSHR as a whole as single entity. 441 // For other requests, we iterate over the individual targets 442 // since that's where the actual data lies. 443 if (pkt->isPrint()) { |
444 pkt->checkFunctional(this, addr, isSecure, size, NULL); |
445 return false; 446 } else { 447 return (targets.checkFunctional(pkt) || 448 deferredTargets.checkFunctional(pkt)); 449 } 450} 451 452 453void 454MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const 455{ |
456 ccprintf(os, "%s[%x:%x](%s) %s %s %s state: %s %s %s %s %s\n", |
457 prefix, addr, addr+size-1, |
458 isSecure ? "s" : "ns", |
459 isForward ? "Forward" : "", 460 isForwardNoResponse() ? "ForwNoResp" : "", 461 needsExclusive() ? "Excl" : "", 462 _isUncacheable ? "Unc" : "", 463 inService ? "InSvc" : "", 464 downstreamPending ? "DwnPend" : "", 465 hasPostInvalidate() ? "PostInv" : "", 466 hasPostDowngrade() ? "PostDowngr" : ""); --- 16 unchanged lines hidden --- |