1/* 2 * Copyright (c) 2012 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
14 * Copyright (c) 2004-2006 The Regents of The University of Michigan 15 * All rights reserved. 16 * 17 * Redistribution and use in source and binary forms, with or without 18 * modification, are permitted provided that the following conditions are 19 * met: redistributions of source code must retain the above copyright 20 * notice, this list of conditions and the following disclaimer; 21 * redistributions in binary form must reproduce the above copyright --- 37 unchanged lines hidden (view full) --- 59 : cpu(_cpu), 60 renameToDecodeDelay(params->renameToDecodeDelay), 61 iewToDecodeDelay(params->iewToDecodeDelay), 62 commitToDecodeDelay(params->commitToDecodeDelay), 63 fetchToDecodeDelay(params->fetchToDecodeDelay), 64 decodeWidth(params->decodeWidth), 65 numThreads(params->numThreads) 66{ |
67 // @todo: Make into a parameter 68 skidBufferMax = (fetchToDecodeDelay + 1) * params->fetchWidth; 69} 70 71template<class Impl> 72void 73DefaultDecode<Impl>::startupStage() 74{ 75 resetStage(); 76} 77 78template<class Impl> 79void 80DefaultDecode<Impl>::resetStage() 81{ |
82 _status = Inactive; 83 84 // Setup status, make sure stall signals are clear. 85 for (ThreadID tid = 0; tid < numThreads; ++tid) { 86 decodeStatus[tid] = Idle; 87 88 stalls[tid].rename = false; 89 stalls[tid].iew = false; 90 stalls[tid].commit = false; 91 } |
92} 93 94template <class Impl> 95std::string 96DefaultDecode<Impl>::name() const 97{ 98 return cpu->name() + ".decode"; 99} --- 83 unchanged lines hidden (view full) --- 183template<class Impl> 184void 185DefaultDecode<Impl>::setActiveThreads(std::list<ThreadID> *at_ptr) 186{ 187 activeThreads = at_ptr; 188} 189 190template <class Impl> |
191void |
192DefaultDecode<Impl>::drainSanityCheck() const |
193{ |
194 for (ThreadID tid = 0; tid < numThreads; ++tid) { |
195 assert(insts[tid].empty()); 196 assert(skidBuffer[tid].empty()); |
197 } |
198} 199 200template<class Impl> 201bool 202DefaultDecode<Impl>::checkStall(ThreadID tid) const 203{ 204 bool ret_val = false; 205 --- 559 unchanged lines hidden --- |