void StridePrefetcher::read(MemRequest *mreq) { uint paddr = mreq->getPAddr() & defaultMask; bLine *l = buff->readLine(paddr); if(l) { //hit LOG("SP: hit on %08lx", paddr); hit.inc(); mreq->goUpAbs(nextBuffSlot() + hitDelay); learnHit(paddr); return; } penFetchSet::iterator it = pendingFetches.find(paddr); if(it != pendingFetches.end()) { // half-miss LOG("SP: half-miss on %08lx", paddr); halfMiss.inc(); penReqMapper::iterator itR = pendingRequests.find(paddr); if (itR == pendingRequests.end()) { pendingRequests[paddr] = activeMemReqPool.out(); itR = pendingRequests.find(paddr); } I(itR != pendingRequests.end()); (*itR).second->push(mreq); learnHit(paddr); // half-miss is a hit from the learning point of view return; } LOG("SP:miss on %08lx", paddr); miss.inc(); learnMiss(paddr); mreq->goDownAbs(nextBuffSlot() + missDelay, lowerLevel[0]); }
static PBTestAckMsg *create(const ProtocolBase *srcPB, const ProtocolBase *dstPB) { PBTestAckMsg *msg = msgPool.out(); msg->setupMessage(srcPB,dstPB,TestAckMsg); return msg; }