Deleted Added
sdiff udiff text old ( 2733:e0eac8fc5774 ) new ( 2756:7bf0d6481df9 )
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;

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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 * Korey Sewell
30 */
31
32#ifndef __CPU_O3_COMMIT_HH__
33#define __CPU_O3_COMMIT_HH__
34
35#include "arch/faults.hh"
36#include "base/statistics.hh"
37#include "base/timebuf.hh"

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

63 * supports multiple cycle squashing, to model a ROB that can only
64 * remove a certain number of instructions per cycle.
65 */
66template<class Impl>
67class DefaultCommit
68{
69 public:
70 // Typedefs from the Impl.
71 typedef typename Impl::FullCPU FullCPU;
72 typedef typename Impl::DynInstPtr DynInstPtr;
73 typedef typename Impl::Params Params;
74 typedef typename Impl::CPUPol CPUPol;
75
76 typedef typename CPUPol::RenameMap RenameMap;
77 typedef typename CPUPol::ROB ROB;
78
79 typedef typename CPUPol::TimeStruct TimeStruct;

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

141
142 /** Returns the name of the DefaultCommit. */
143 std::string name() const;
144
145 /** Registers statistics. */
146 void regStats();
147
148 /** Sets the CPU pointer. */
149 void setCPU(FullCPU *cpu_ptr);
150
151 /** Sets the list of threads. */
152 void setThreads(std::vector<Thread *> &threads);
153
154 /** Sets the main time buffer pointer, used for backwards communication. */
155 void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
156
157 void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);

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

276 uint64_t readPC() { return PC[0]; }
277
278 /** Returns the PC of a specific thread. */
279 uint64_t readPC(unsigned tid) { return PC[tid]; }
280
281 /** Sets the PC of a specific thread. */
282 void setPC(uint64_t val, unsigned tid) { PC[tid] = val; }
283
284 /** Reads the next PC of a specific thread. */
285 uint64_t readNextPC(unsigned tid) { return nextPC[tid]; }
286
287 /** Sets the next PC of a specific thread. */
288 void setNextPC(uint64_t val, unsigned tid) { nextPC[tid] = val; }
289
290#if THE_ISA != ALPHA_ISA
291 /** Reads the next NPC of a specific thread. */
292 uint64_t readNextPC(unsigned tid) { return nextNPC[tid]; }
293
294 /** Sets the next NPC of a specific thread. */
295 void setNextPC(uint64_t val, unsigned tid) { nextNPC[tid] = val; }
296#endif
297
298 private:
299 /** Time buffer interface. */
300 TimeBuffer<TimeStruct> *timeBuffer;
301
302 /** Wire to write information heading to previous stages. */
303 typename TimeBuffer<TimeStruct>::wire toIEW;
304
305 /** Wire to read information from IEW (for ROB). */

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

321 /** Wire to read information from rename queue. */
322 typename TimeBuffer<RenameStruct>::wire fromRename;
323
324 public:
325 /** ROB interface. */
326 ROB *rob;
327
328 private:
329 /** Pointer to FullCPU. */
330 FullCPU *cpu;
331
332 /** Vector of all of the threads. */
333 std::vector<Thread *> thread;
334
335 Fault fetchFault;
336
337 int fetchTrapWait;
338

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

401 /** The commit PC of each thread. Refers to the instruction that
402 * is currently being processed/committed.
403 */
404 Addr PC[Impl::MaxThreads];
405
406 /** The next PC of each thread. */
407 Addr nextPC[Impl::MaxThreads];
408
409 /** The next NPC of each thread. */
410 Addr nextNPC[Impl::MaxThreads];
411
412 /** The sequence number of the youngest valid instruction in the ROB. */
413 InstSeqNum youngestSeqNum[Impl::MaxThreads];
414
415 /** Pointer to the list of active threads. */
416 std::list<unsigned> *activeThreads;
417
418 /** Rename map interface. */
419 RenameMap *renameMap[Impl::MaxThreads];

--- 42 unchanged lines hidden ---