Deleted Added
sdiff udiff text old ( 9046:a1104cc13db2 ) new ( 9444:ab47fe7f03f0 )
full compact
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;
9 * redistributions in binary form must reproduce the above copyright

--- 37 unchanged lines hidden (view full) ---

47 : cpu(_cpu),
48 renameToDecodeDelay(params->renameToDecodeDelay),
49 iewToDecodeDelay(params->iewToDecodeDelay),
50 commitToDecodeDelay(params->commitToDecodeDelay),
51 fetchToDecodeDelay(params->fetchToDecodeDelay),
52 decodeWidth(params->decodeWidth),
53 numThreads(params->numThreads)
54{
55 _status = Inactive;
56
57 // Setup status, make sure stall signals are clear.
58 for (ThreadID tid = 0; tid < numThreads; ++tid) {
59 decodeStatus[tid] = Idle;
60
61 stalls[tid].rename = false;
62 stalls[tid].iew = false;
63 stalls[tid].commit = false;
64 }
65
66 // @todo: Make into a parameter
67 skidBufferMax = (fetchToDecodeDelay + 1) * params->fetchWidth;
68}
69
70template <class Impl>
71std::string
72DefaultDecode<Impl>::name() const
73{
74 return cpu->name() + ".decode";
75}

--- 83 unchanged lines hidden (view full) ---

159template<class Impl>
160void
161DefaultDecode<Impl>::setActiveThreads(std::list<ThreadID> *at_ptr)
162{
163 activeThreads = at_ptr;
164}
165
166template <class Impl>
167bool
168DefaultDecode<Impl>::drain()
169{
170 // Decode is done draining at any time.
171 cpu->signalDrained();
172 return true;
173}
174
175template <class Impl>
176void
177DefaultDecode<Impl>::takeOverFrom()
178{
179 _status = Inactive;
180
181 // Be sure to reset state and clear out any old instructions.
182 for (ThreadID tid = 0; tid < numThreads; ++tid) {
183 decodeStatus[tid] = Idle;
184
185 stalls[tid].rename = false;
186 stalls[tid].iew = false;
187 stalls[tid].commit = false;
188 while (!insts[tid].empty())
189 insts[tid].pop();
190 while (!skidBuffer[tid].empty())
191 skidBuffer[tid].pop();
192 branchCount[tid] = 0;
193 }
194 wroteToTimeBuffer = false;
195}
196
197template<class Impl>
198bool
199DefaultDecode<Impl>::checkStall(ThreadID tid) const
200{
201 bool ret_val = false;
202

--- 559 unchanged lines hidden ---