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