1/* 2 * Copyright (c) 2012-2013, 2015 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 --- 52 unchanged lines hidden (view full) --- 61 62using namespace std; 63 64MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false), 65 pendingDirty(false), 66 postInvalidate(false), postDowngrade(false), 67 queue(NULL), order(0), blkAddr(0), 68 blkSize(0), isSecure(false), inService(false), |
69 isForward(false), allocOnFill(false), 70 threadNum(InvalidThreadID), data(NULL) |
71{ 72} 73 74 75MSHR::TargetList::TargetList() 76 : needsExclusive(false), hasUpgrade(false) 77{} 78 --- 119 unchanged lines hidden (view full) --- 198 ccprintf(os, "%s%s: ", prefix, s); 199 t.pkt->print(os, verbosity, ""); 200 } 201} 202 203 204void 205MSHR::allocate(Addr blk_addr, unsigned blk_size, PacketPtr target, |
206 Tick when_ready, Counter _order, bool alloc_on_fill) |
207{ 208 blkAddr = blk_addr; 209 blkSize = blk_size; 210 isSecure = target->isSecure(); 211 readyTime = when_ready; 212 order = _order; 213 assert(target); 214 isForward = false; |
215 allocOnFill = alloc_on_fill; |
216 _isUncacheable = target->req->isUncacheable(); 217 inService = false; 218 downstreamPending = false; 219 threadNum = 0; 220 assert(targets.isReset()); 221 // Don't know of a case where we would allocate a new MSHR for a 222 // snoop (mem-side request), so set source according to request here 223 Target::Source source = (target->cmd == MemCmd::HardPFReq) ? --- 47 unchanged lines hidden (view full) --- 271 assert(deferredTargets.isReset()); 272 inService = false; 273} 274 275/* 276 * Adds a target to an MSHR 277 */ 278void |
279MSHR::allocateTarget(PacketPtr pkt, Tick whenReady, Counter _order, 280 bool alloc_on_fill) |
281{ 282 // assume we'd never issue a prefetch when we've got an 283 // outstanding miss 284 assert(pkt->cmd != MemCmd::HardPFReq); 285 286 // uncacheable accesses always allocate a new MSHR, and cacheable 287 // accesses ignore any uncacheable MSHRs, thus we should never 288 // have targets addded if originally allocated uncacheable 289 assert(!_isUncacheable); 290 |
291 // potentially re-evaluate whether we should allocate on a fill or 292 // not 293 allocOnFill = allocOnFill || alloc_on_fill; 294 |
295 // if there's a request already in service for this MSHR, we will 296 // have to defer the new target until after the response if any of 297 // the following are true: 298 // - there are other targets already deferred 299 // - there's a pending invalidate to be applied after the response 300 // comes back (but before this target is processed) 301 // - this target requires an exclusive block and either we're not 302 // getting an exclusive block back or we have already snooped --- 177 unchanged lines hidden (view full) --- 480 481void 482MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const 483{ 484 ccprintf(os, "%s[%#llx:%#llx](%s) %s %s %s state: %s %s %s %s %s\n", 485 prefix, blkAddr, blkAddr + blkSize - 1, 486 isSecure ? "s" : "ns", 487 isForward ? "Forward" : "", |
488 allocOnFill ? "AllocOnFill" : "", |
489 isForwardNoResponse() ? "ForwNoResp" : "", 490 needsExclusive() ? "Excl" : "", 491 _isUncacheable ? "Unc" : "", 492 inService ? "InSvc" : "", 493 downstreamPending ? "DwnPend" : "", 494 hasPostInvalidate() ? "PostInv" : "", 495 hasPostDowngrade() ? "PostDowngr" : ""); 496 --- 15 unchanged lines hidden --- |