iew_impl.hh (4318:eb4241362a80) iew_impl.hh (4329:52057dbec096)
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;

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

34
35#include <queue>
36
37#include "base/timebuf.hh"
38#include "cpu/o3/fu_pool.hh"
39#include "cpu/o3/iew.hh"
40
41template<class Impl>
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;

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

34
35#include <queue>
36
37#include "base/timebuf.hh"
38#include "cpu/o3/fu_pool.hh"
39#include "cpu/o3/iew.hh"
40
41template<class Impl>
42DefaultIEW::DefaultIEW(Params *params)
42DefaultIEW<Impl>::DefaultIEW(O3CPU *_cpu, Params *params)
43 : issueToExecQueue(params->backComSize, params->forwardComSize),
43 : issueToExecQueue(params->backComSize, params->forwardComSize),
44 instQueue(params),
45 ldstQueue(params),
44 cpu(_cpu),
45 instQueue(_cpu, this, params),
46 ldstQueue(_cpu, this, params),
46 fuPool(params->fuPool),
47 commitToIEWDelay(params->commitToIEWDelay),
48 renameToIEWDelay(params->renameToIEWDelay),
49 issueToExecuteDelay(params->issueToExecuteDelay),
50 dispatchWidth(params->dispatchWidth),
51 issueWidth(params->issueWidth),
52 wbOutstanding(0),
53 wbWidth(params->wbWidth),

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

59 wbStatus = Idle;
60
61 // Setup wire to read instructions coming from issue.
62 fromIssue = issueToExecQueue.getWire(-issueToExecuteDelay);
63
64 // Instruction queue needs the queue between issue and execute.
65 instQueue.setIssueToExecuteQueue(&issueToExecQueue);
66
47 fuPool(params->fuPool),
48 commitToIEWDelay(params->commitToIEWDelay),
49 renameToIEWDelay(params->renameToIEWDelay),
50 issueToExecuteDelay(params->issueToExecuteDelay),
51 dispatchWidth(params->dispatchWidth),
52 issueWidth(params->issueWidth),
53 wbOutstanding(0),
54 wbWidth(params->wbWidth),

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

60 wbStatus = Idle;
61
62 // Setup wire to read instructions coming from issue.
63 fromIssue = issueToExecQueue.getWire(-issueToExecuteDelay);
64
65 // Instruction queue needs the queue between issue and execute.
66 instQueue.setIssueToExecuteQueue(&issueToExecQueue);
67
67 instQueue.setIEW(this);
68 ldstQueue.setIEW(this);
69
70 for (int i=0; i < numThreads; i++) {
71 dispatchStatus[i] = Running;
72 stalls[i].commit = false;
73 fetchRedirect[i] = false;
74 bdelayDoneSeqNum[i] = 0;
75 }
76
77 wbMax = wbWidth * params->wbDepth;

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

271 toRename->iewInfo[tid].usedIQ = true;
272 toRename->iewInfo[tid].freeIQEntries =
273 instQueue.numFreeEntries(tid);
274
275 toRename->iewInfo[tid].usedLSQ = true;
276 toRename->iewInfo[tid].freeLSQEntries =
277 ldstQueue.numFreeEntries(tid);
278 }
68 for (int i=0; i < numThreads; i++) {
69 dispatchStatus[i] = Running;
70 stalls[i].commit = false;
71 fetchRedirect[i] = false;
72 bdelayDoneSeqNum[i] = 0;
73 }
74
75 wbMax = wbWidth * params->wbDepth;

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

269 toRename->iewInfo[tid].usedIQ = true;
270 toRename->iewInfo[tid].freeIQEntries =
271 instQueue.numFreeEntries(tid);
272
273 toRename->iewInfo[tid].usedLSQ = true;
274 toRename->iewInfo[tid].freeLSQEntries =
275 ldstQueue.numFreeEntries(tid);
276 }
279}
280
277
281template<class Impl>
282void
283DefaultIEW<Impl>::setCPU(O3CPU *cpu_ptr)
284{
285 cpu = cpu_ptr;
286 DPRINTF(IEW, "Setting CPU pointer.\n");
287
288 instQueue.setCPU(cpu_ptr);
289 ldstQueue.setCPU(cpu_ptr);
290
291 cpu->activateStage(O3CPU::IEWIdx);
292}
293
294template<class Impl>
295void
296DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
297{
298 timeBuffer = tb_ptr;

--- 1366 unchanged lines hidden ---
278 cpu->activateStage(O3CPU::IEWIdx);
279}
280
281template<class Impl>
282void
283DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
284{
285 timeBuffer = tb_ptr;

--- 1366 unchanged lines hidden ---