decode_impl.hh (2935:d1223a6c9156) decode_impl.hh (2980:eab855f06b79)
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
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
33using namespace std;
34
35template<class Impl>
36DefaultDecode<Impl>::DefaultDecode(Params *params)
37 : renameToDecodeDelay(params->renameToDecodeDelay),
38 iewToDecodeDelay(params->iewToDecodeDelay),
39 commitToDecodeDelay(params->commitToDecodeDelay),
40 fetchToDecodeDelay(params->fetchToDecodeDelay),
41 decodeWidth(params->decodeWidth),
42 numThreads(params->numberOfThreads)

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

155 fetchQueue = fq_ptr;
156
157 // Setup wire to read information from fetch queue.
158 fromFetch = fetchQueue->getWire(-fetchToDecodeDelay);
159}
160
161template<class Impl>
162void
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
163DefaultDecode::setActiveThreads(list *at_ptr)
161DefaultDecode<Impl>::setActiveThreads(std::list<unsigned> *at_ptr)
164{
165 DPRINTF(Decode, "Setting active threads list pointer.\n");
166 activeThreads = at_ptr;
167}
168
169template <class Impl>
170bool
171DefaultDecode<Impl>::drain()

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

421 // fetch past its skidbuffer
422 assert(skidBuffer[tid].size() <= skidBufferMax);
423}
424
425template<class Impl>
426bool
427DefaultDecode<Impl>::skidsEmpty()
428{
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{
429 list::iterator threads = (*activeThreads).begin();
427 std::list<unsigned>::iterator threads = (*activeThreads).begin();
430
431 while (threads != (*activeThreads).end()) {
432 if (!skidBuffer[*threads++].empty())
433 return false;
434 }
435
436 return true;
437}
438
439template<class Impl>
440void
441DefaultDecode<Impl>::updateStatus()
442{
443 bool any_unblocking = false;
444
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
445 list::iterator threads = (*activeThreads).begin();
443 std::list<unsigned>::iterator threads = (*activeThreads).begin();
446
447 threads = (*activeThreads).begin();
448
449 while (threads != (*activeThreads).end()) {
450 unsigned tid = *threads++;
451
452 if (decodeStatus[tid] == Unblocking) {
453 any_unblocking = true;

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

594DefaultDecode<Impl>::tick()
595{
596 wroteToTimeBuffer = false;
597
598 bool status_change = false;
599
600 toRenameIndex = 0;
601
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
602 list::iterator threads = (*activeThreads).begin();
600 std::list<unsigned>::iterator threads = (*activeThreads).begin();
603
604 sortInsts();
605
606 //Check stall and squash signals.
607 while (threads != (*activeThreads).end()) {
608 unsigned tid = *threads++;
609
610 DPRINTF(Decode,"Processing [tid:%i]\n",tid);

--- 210 unchanged lines hidden ---
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 ---