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; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Kevin Lim 29 */ 30 31#include "cpu/o3/decode.hh" 32 |
33template<class Impl> 34DefaultDecode<Impl>::DefaultDecode(Params *params) 35 : renameToDecodeDelay(params->renameToDecodeDelay), 36 iewToDecodeDelay(params->iewToDecodeDelay), 37 commitToDecodeDelay(params->commitToDecodeDelay), 38 fetchToDecodeDelay(params->fetchToDecodeDelay), 39 decodeWidth(params->decodeWidth), 40 numThreads(params->numberOfThreads) --- 112 unchanged lines hidden (view full) --- 153 fetchQueue = fq_ptr; 154 155 // Setup wire to read information from fetch queue. 156 fromFetch = fetchQueue->getWire(-fetchToDecodeDelay); 157} 158 159template<class Impl> 160void |
161DefaultDecode<Impl>::setActiveThreads(std::list<unsigned> *at_ptr) |
162{ 163 DPRINTF(Decode, "Setting active threads list pointer.\n"); 164 activeThreads = at_ptr; 165} 166 167template <class Impl> 168bool 169DefaultDecode<Impl>::drain() --- 249 unchanged lines hidden (view full) --- 419 // fetch past its skidbuffer 420 assert(skidBuffer[tid].size() <= skidBufferMax); 421} 422 423template<class Impl> 424bool 425DefaultDecode<Impl>::skidsEmpty() 426{ |
427 std::list<unsigned>::iterator threads = (*activeThreads).begin(); |
428 429 while (threads != (*activeThreads).end()) { 430 if (!skidBuffer[*threads++].empty()) 431 return false; 432 } 433 434 return true; 435} 436 437template<class Impl> 438void 439DefaultDecode<Impl>::updateStatus() 440{ 441 bool any_unblocking = false; 442 |
443 std::list<unsigned>::iterator threads = (*activeThreads).begin(); |
444 445 threads = (*activeThreads).begin(); 446 447 while (threads != (*activeThreads).end()) { 448 unsigned tid = *threads++; 449 450 if (decodeStatus[tid] == Unblocking) { 451 any_unblocking = true; --- 140 unchanged lines hidden (view full) --- 592DefaultDecode<Impl>::tick() 593{ 594 wroteToTimeBuffer = false; 595 596 bool status_change = false; 597 598 toRenameIndex = 0; 599 |
600 std::list<unsigned>::iterator threads = (*activeThreads).begin(); |
601 602 sortInsts(); 603 604 //Check stall and squash signals. 605 while (threads != (*activeThreads).end()) { 606 unsigned tid = *threads++; 607 608 DPRINTF(Decode,"Processing [tid:%i]\n",tid); --- 210 unchanged lines hidden --- |