1/* 2 * Copyright (c) 2010-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 --- 149 unchanged lines hidden (view full) --- 158std::string 159DefaultFetch<Impl>::name() const 160{ 161 return cpu->name() + ".fetch"; 162} 163 164template <class Impl> 165void |
166DefaultFetch<Impl>::regProbePoints() 167{ 168 ppFetch = new ProbePointArg<DynInstPtr>(cpu->getProbeManager(), "Fetch"); 169} 170 171template <class Impl> 172void |
173DefaultFetch<Impl>::regStats() 174{ 175 icacheStallCycles 176 .name(name() + ".icacheStallCycles") 177 .desc("Number of cycles fetch is stalled on an Icache miss") 178 .prereq(icacheStallCycles); 179 180 fetchedInsts --- 222 unchanged lines hidden (view full) --- 403 // Only switch to IcacheAccessComplete if we're not stalled as well. 404 if (checkStall(tid)) { 405 fetchStatus[tid] = Blocked; 406 } else { 407 fetchStatus[tid] = IcacheAccessComplete; 408 } 409 410 pkt->req->setAccessLatency(); |
411 cpu->ppInstAccessComplete->notify(pkt); |
412 // Reset the mem req to NULL. 413 delete pkt->req; 414 delete pkt; 415 memReq[tid] = NULL; 416} 417 418template <class Impl> 419void --- 249 unchanged lines hidden (view full) --- 669 fetchStatus[tid] = IcacheWaitRetry; 670 retryPkt = data_pkt; 671 retryTid = tid; 672 cacheBlocked = true; 673 } else { 674 DPRINTF(Fetch, "[tid:%i]: Doing Icache access.\n", tid); 675 DPRINTF(Activity, "[tid:%i]: Activity: Waiting on I-cache " 676 "response.\n", tid); |
677 lastIcacheStall[tid] = curTick(); 678 fetchStatus[tid] = IcacheWaitResponse; 679 } 680 } else { 681 if (!(numInst < fetchWidth)) { 682 assert(!finishTranslationEvent.scheduled()); 683 finishTranslationEvent.setFault(fault); 684 finishTranslationEvent.setReq(mem_req); --- 629 unchanged lines hidden (view full) --- 1314 } 1315 newMacro |= staticInst->isLastMicroop(); 1316 } 1317 1318 DynInstPtr instruction = 1319 buildInst(tid, staticInst, curMacroop, 1320 thisPC, nextPC, true); 1321 |
1322 ppFetch->notify(instruction); |
1323 numInst++; 1324 1325#if TRACING_ON 1326 if (DTRACE(O3PipeView)) { 1327 instruction->fetchTick = curTick(); 1328 } 1329#endif 1330 --- 327 unchanged lines hidden --- |