1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 137 unchanged lines hidden (view full) --- 146 } else if (policy == "lsqcount") { 147 fetchPolicy = LSQ; 148 DPRINTF(Fetch, "Fetch policy set to LSQ count\n"); 149 } else { 150 fatal("Invalid Fetch Policy. Options Are: {SingleThread," 151 " RoundRobin,LSQcount,IQcount}\n"); 152 } 153 |
154 // Get the size of an instruction. 155 instSize = sizeof(TheISA::MachInst); 156} 157 158template <class Impl> 159std::string 160DefaultFetch<Impl>::name() const 161{ --- 156 unchanged lines hidden (view full) --- 318 // Setup PC and nextPC with initial state. 319 for (int tid = 0; tid < numThreads; tid++) { 320 PC[tid] = cpu->readPC(tid); 321 nextPC[tid] = cpu->readNextPC(tid); 322#if ISA_HAS_DELAY_SLOT 323 nextNPC[tid] = cpu->readNextNPC(tid); 324#endif 325 } |
326 327 // Size of cache block. 328 cacheBlkSize = icachePort->peerBlockSize(); 329 330 // Create mask to get rid of offset bits. 331 cacheBlkMask = (cacheBlkSize - 1); 332 333 for (int tid=0; tid < numThreads; tid++) { 334 335 fetchStatus[tid] = Running; 336 337 priorityList.push_back(tid); 338 339 memReq[tid] = NULL; 340 341 // Create space to store a cache line. 342 cacheData[tid] = new uint8_t[cacheBlkSize]; 343 cacheDataPC[tid] = 0; 344 cacheDataValid[tid] = false; 345 346 delaySlotInfo[tid].branchSeqNum = -1; 347 delaySlotInfo[tid].numInsts = 0; 348 delaySlotInfo[tid].targetAddr = 0; 349 delaySlotInfo[tid].targetReady = false; 350 351 stalls[tid].decode = false; 352 stalls[tid].rename = false; 353 stalls[tid].iew = false; 354 stalls[tid].commit = false; 355 } |
356} 357 358template<class Impl> 359void 360DefaultFetch<Impl>::processCacheCompletion(PacketPtr pkt) 361{ 362 unsigned tid = pkt->req->getThreadNum(); 363 --- 1117 unchanged lines hidden --- |