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 */
30
31#ifndef __CPU_O3_COMMIT_HH__
32#define __CPU_O3_COMMIT_HH__
33
34#include "arch/faults.hh"
35#include "base/statistics.hh"
36#include "base/timebuf.hh"

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

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

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

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

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

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

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

312 /** Wire to read information from rename queue. */
313 typename TimeBuffer<RenameStruct>::wire fromRename;
314
315 public:
316 /** ROB interface. */
317 ROB *rob;
318
319 private:
320 /** Pointer to O3CPU. */
321 O3CPU *cpu;
322
323 /** Vector of all of the threads. */
324 std::vector<Thread *> thread;
325
326 Fault fetchFault;
327
328 int fetchTrapWait;
329

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

392 /** The commit PC of each thread. Refers to the instruction that
393 * is currently being processed/committed.
394 */
395 Addr PC[Impl::MaxThreads];
396
397 /** The next PC of each thread. */
398 Addr nextPC[Impl::MaxThreads];
399
400 /** The sequence number of the youngest valid instruction in the ROB. */
401 InstSeqNum youngestSeqNum[Impl::MaxThreads];
402
403 /** Pointer to the list of active threads. */
404 std::list<unsigned> *activeThreads;
405
406 /** Rename map interface. */
407 RenameMap *renameMap[Impl::MaxThreads];

--- 42 unchanged lines hidden ---