inorder: fetch thread bug
[gem5.git] / src / cpu / inorder / cpu.hh
1 /*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
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
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
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: Korey Sewell
29 *
30 */
31
32 #ifndef __CPU_INORDER_CPU_HH__
33 #define __CPU_INORDER_CPU_HH__
34
35 #include <iostream>
36 #include <list>
37 #include <queue>
38 #include <set>
39 #include <vector>
40
41 #include "arch/isa_traits.hh"
42 #include "arch/types.hh"
43 #include "arch/registers.hh"
44 #include "base/statistics.hh"
45 #include "base/timebuf.hh"
46 #include "base/types.hh"
47 #include "config/full_system.hh"
48 #include "config/the_isa.hh"
49 #include "cpu/activity.hh"
50 #include "cpu/base.hh"
51 #include "cpu/simple_thread.hh"
52 #include "cpu/inorder/inorder_dyn_inst.hh"
53 #include "cpu/inorder/pipeline_traits.hh"
54 #include "cpu/inorder/pipeline_stage.hh"
55 #include "cpu/inorder/thread_state.hh"
56 #include "cpu/inorder/reg_dep_map.hh"
57 #include "cpu/o3/dep_graph.hh"
58 #include "cpu/o3/rename_map.hh"
59 #include "mem/packet.hh"
60 #include "mem/port.hh"
61 #include "mem/request.hh"
62 #include "sim/eventq.hh"
63 #include "sim/process.hh"
64
65 class ThreadContext;
66 class MemInterface;
67 class MemObject;
68 class Process;
69 class ResourcePool;
70
71 class InOrderCPU : public BaseCPU
72 {
73
74 protected:
75 typedef ThePipeline::Params Params;
76 typedef InOrderThreadState Thread;
77
78 //ISA TypeDefs
79 typedef TheISA::IntReg IntReg;
80 typedef TheISA::FloatReg FloatReg;
81 typedef TheISA::FloatRegBits FloatRegBits;
82 typedef TheISA::MiscReg MiscReg;
83
84 //DynInstPtr TypeDefs
85 typedef ThePipeline::DynInstPtr DynInstPtr;
86 typedef std::list<DynInstPtr>::iterator ListIt;
87
88 //TimeBuffer TypeDefs
89 typedef TimeBuffer<InterStageStruct> StageQueue;
90
91 friend class Resource;
92
93 public:
94 /** Constructs a CPU with the given parameters. */
95 InOrderCPU(Params *params);
96
97 /** CPU ID */
98 int cpu_id;
99
100 /** Type of core that this is */
101 std::string coreType;
102
103 // Only need for SE MODE
104 enum ThreadModel {
105 Single,
106 SMT,
107 SwitchOnCacheMiss
108 };
109
110 ThreadModel threadModel;
111
112 int readCpuId() { return cpu_id; }
113
114 void setCpuId(int val) { cpu_id = val; }
115
116 Params *cpu_params;
117
118 public:
119 enum Status {
120 Running,
121 Idle,
122 Halted,
123 Blocked,
124 SwitchedOut
125 };
126
127 /** Overall CPU status. */
128 Status _status;
129 private:
130 /** Define TickEvent for the CPU */
131 class TickEvent : public Event
132 {
133 private:
134 /** Pointer to the CPU. */
135 InOrderCPU *cpu;
136
137 public:
138 /** Constructs a tick event. */
139 TickEvent(InOrderCPU *c);
140
141 /** Processes a tick event, calling tick() on the CPU. */
142 void process();
143
144 /** Returns the description of the tick event. */
145 const char *description();
146 };
147
148 /** The tick event used for scheduling CPU ticks. */
149 TickEvent tickEvent;
150
151 /** Schedule tick event, regardless of its current state. */
152 void scheduleTickEvent(int delay)
153 {
154 if (tickEvent.squashed())
155 mainEventQueue.reschedule(&tickEvent,
156 nextCycle(curTick + ticks(delay)));
157 else if (!tickEvent.scheduled())
158 mainEventQueue.schedule(&tickEvent,
159 nextCycle(curTick + ticks(delay)));
160 }
161
162 /** Unschedule tick event, regardless of its current state. */
163 void unscheduleTickEvent()
164 {
165 if (tickEvent.scheduled())
166 tickEvent.squash();
167 }
168
169 public:
170 // List of Events That can be scheduled from
171 // within the CPU.
172 // NOTE(1): The Resource Pool also uses this event list
173 // to schedule events broadcast to all resources interfaces
174 // NOTE(2): CPU Events usually need to schedule a corresponding resource
175 // pool event.
176 enum CPUEventType {
177 ActivateThread,
178 ActivateNextReadyThread,
179 DeactivateThread,
180 DeallocateThread,
181 SuspendThread,
182 Trap,
183 InstGraduated,
184 SquashFromMemStall,
185 UpdatePCs,
186 NumCPUEvents
187 };
188
189 static std::string eventNames[NumCPUEvents];
190
191 /** Define CPU Event */
192 class CPUEvent : public Event
193 {
194 protected:
195 InOrderCPU *cpu;
196
197 public:
198 CPUEventType cpuEventType;
199 ThreadID tid;
200 DynInstPtr inst;
201 Fault fault;
202 unsigned vpe;
203
204 public:
205 /** Constructs a CPU event. */
206 CPUEvent(InOrderCPU *_cpu, CPUEventType e_type, Fault fault,
207 ThreadID _tid, DynInstPtr inst, unsigned event_pri_offset);
208
209 /** Set Type of Event To Be Scheduled */
210 void setEvent(CPUEventType e_type, Fault _fault, ThreadID _tid,
211 DynInstPtr _inst)
212 {
213 fault = _fault;
214 cpuEventType = e_type;
215 tid = _tid;
216 inst = _inst;
217 vpe = 0;
218 }
219
220 /** Processes a resource event. */
221 virtual void process();
222
223 /** Returns the description of the resource event. */
224 const char *description();
225
226 /** Schedule Event */
227 void scheduleEvent(int delay);
228
229 /** Unschedule This Event */
230 void unscheduleEvent();
231 };
232
233 /** Schedule a CPU Event */
234 void scheduleCpuEvent(CPUEventType cpu_event, Fault fault, ThreadID tid,
235 DynInstPtr inst, unsigned delay = 0,
236 unsigned event_pri_offset = 0);
237
238 public:
239 /** Interface between the CPU and CPU resources. */
240 ResourcePool *resPool;
241
242 /** Instruction used to signify that there is no *real* instruction in
243 buffer slot */
244 DynInstPtr dummyInst;
245
246 /** Used by resources to signify a denied access to a resource. */
247 ResourceRequest *dummyReq;
248
249 /** Identifies the resource id that identifies a fetch
250 * access unit.
251 */
252 unsigned fetchPortIdx;
253
254 /** Identifies the resource id that identifies a ITB */
255 unsigned itbIdx;
256
257 /** Identifies the resource id that identifies a data
258 * access unit.
259 */
260 unsigned dataPortIdx;
261
262 /** Identifies the resource id that identifies a DTB */
263 unsigned dtbIdx;
264
265 /** The Pipeline Stages for the CPU */
266 PipelineStage *pipelineStage[ThePipeline::NumStages];
267
268 /** Program Counters */
269 TheISA::IntReg PC[ThePipeline::MaxThreads];
270 TheISA::IntReg nextPC[ThePipeline::MaxThreads];
271 TheISA::IntReg nextNPC[ThePipeline::MaxThreads];
272
273 /** The Register File for the CPU */
274 union {
275 FloatReg f[ThePipeline::MaxThreads][TheISA::NumFloatRegs];
276 FloatRegBits i[ThePipeline::MaxThreads][TheISA::NumFloatRegs];
277 } floatRegs;
278 TheISA::IntReg intRegs[ThePipeline::MaxThreads][TheISA::NumIntRegs];
279
280 /** ISA state */
281 TheISA::ISA isa[ThePipeline::MaxThreads];
282
283 /** Dependency Tracker for Integer & Floating Point Regs */
284 RegDepMap archRegDepMap[ThePipeline::MaxThreads];
285
286 /** Global communication structure */
287 TimeBuffer<TimeStruct> timeBuffer;
288
289 /** Communication structure that sits in between pipeline stages */
290 StageQueue *stageQueue[ThePipeline::NumStages-1];
291
292 TheISA::TLB *getITBPtr();
293 TheISA::TLB *getDTBPtr();
294
295 public:
296
297 /** Registers statistics. */
298 void regStats();
299
300 /** Ticks CPU, calling tick() on each stage, and checking the overall
301 * activity to see if the CPU should deschedule itself.
302 */
303 void tick();
304
305 /** Initialize the CPU */
306 void init();
307
308 /** Reset State in the CPU */
309 void reset();
310
311 /** Get a Memory Port */
312 Port* getPort(const std::string &if_name, int idx = 0);
313
314 #if FULL_SYSTEM
315 /** HW return from error interrupt. */
316 Fault hwrei(ThreadID tid);
317
318 bool simPalCheck(int palFunc, ThreadID tid);
319
320 /** Returns the Fault for any valid interrupt. */
321 Fault getInterrupts();
322
323 /** Processes any an interrupt fault. */
324 void processInterrupts(Fault interrupt);
325
326 /** Halts the CPU. */
327 void halt() { panic("Halt not implemented!\n"); }
328
329 /** Update the Virt and Phys ports of all ThreadContexts to
330 * reflect change in memory connections. */
331 void updateMemPorts();
332
333 /** Check if this address is a valid instruction address. */
334 bool validInstAddr(Addr addr) { return true; }
335
336 /** Check if this address is a valid data address. */
337 bool validDataAddr(Addr addr) { return true; }
338 #endif
339
340 /** trap() - sets up a trap event on the cpuTraps to handle given fault.
341 * trapCPU() - Traps to handle given fault
342 */
343 void trap(Fault fault, ThreadID tid, int delay = 0);
344 void trapCPU(Fault fault, ThreadID tid);
345
346 /** Add Thread to Active Threads List. */
347 void activateContext(ThreadID tid, int delay = 0);
348 void activateThread(ThreadID tid);
349
350 /** Add Thread to Active Threads List. */
351 void activateNextReadyContext(int delay = 0);
352 void activateNextReadyThread();
353
354 /** Remove from Active Thread List */
355 void deactivateContext(ThreadID tid, int delay = 0);
356 void deactivateThread(ThreadID tid);
357
358 /** Suspend Thread, Remove from Active Threads List, Add to Suspend List */
359 void haltContext(ThreadID tid, int delay = 0);
360 void suspendContext(ThreadID tid, int delay = 0);
361 void suspendThread(ThreadID tid);
362
363 /** Remove Thread from Active Threads List, Remove Any Loaded Thread State */
364 void deallocateContext(ThreadID tid, int delay = 0);
365 void deallocateThread(ThreadID tid);
366
367 /** squashFromMemStall() - sets up a squash event
368 * squashDueToMemStall() - squashes pipeline
369 */
370 void squashFromMemStall(DynInstPtr inst, ThreadID tid, int delay = 0);
371 void squashDueToMemStall(int stage_num, InstSeqNum seq_num, ThreadID tid);
372
373 void removePipelineStalls(ThreadID tid);
374 void squashThreadInPipeline(ThreadID tid);
375 void squashBehindMemStall(int stage_num, InstSeqNum seq_num, ThreadID tid);
376
377 PipelineStage* getPipeStage(int stage_num);
378
379 int
380 contextId()
381 {
382 hack_once("return a bogus context id");
383 return 0;
384 }
385
386 /** Update The Order In Which We Process Threads. */
387 void updateThreadPriority();
388
389 /** Switches a Pipeline Stage to Active. (Unused currently) */
390 void switchToActive(int stage_idx)
391 { /*pipelineStage[stage_idx]->switchToActive();*/ }
392
393 /** Get the current instruction sequence number, and increment it. */
394 InstSeqNum getAndIncrementInstSeq(ThreadID tid)
395 { return globalSeqNum[tid]++; }
396
397 /** Get the current instruction sequence number, and increment it. */
398 InstSeqNum nextInstSeqNum(ThreadID tid)
399 { return globalSeqNum[tid]; }
400
401 /** Increment Instruction Sequence Number */
402 void incrInstSeqNum(ThreadID tid)
403 { globalSeqNum[tid]++; }
404
405 /** Set Instruction Sequence Number */
406 void setInstSeqNum(ThreadID tid, InstSeqNum seq_num)
407 {
408 globalSeqNum[tid] = seq_num;
409 }
410
411 /** Get & Update Next Event Number */
412 InstSeqNum getNextEventNum()
413 {
414 #ifdef DEBUG
415 return cpuEventNum++;
416 #else
417 return 0;
418 #endif
419 }
420
421 /** Register file accessors */
422 uint64_t readIntReg(int reg_idx, ThreadID tid);
423
424 FloatReg readFloatReg(int reg_idx, ThreadID tid);
425
426 FloatRegBits readFloatRegBits(int reg_idx, ThreadID tid);
427
428 void setIntReg(int reg_idx, uint64_t val, ThreadID tid);
429
430 void setFloatReg(int reg_idx, FloatReg val, ThreadID tid);
431
432 void setFloatRegBits(int reg_idx, FloatRegBits val, ThreadID tid);
433
434 /** Reads a miscellaneous register. */
435 MiscReg readMiscRegNoEffect(int misc_reg, ThreadID tid = 0);
436
437 /** Reads a misc. register, including any side effects the read
438 * might have as defined by the architecture.
439 */
440 MiscReg readMiscReg(int misc_reg, ThreadID tid = 0);
441
442 /** Sets a miscellaneous register. */
443 void setMiscRegNoEffect(int misc_reg, const MiscReg &val,
444 ThreadID tid = 0);
445
446 /** Sets a misc. register, including any side effects the write
447 * might have as defined by the architecture.
448 */
449 void setMiscReg(int misc_reg, const MiscReg &val, ThreadID tid = 0);
450
451 /** Reads a int/fp/misc reg. from another thread depending on ISA-defined
452 * target thread
453 */
454 uint64_t readRegOtherThread(unsigned misc_reg,
455 ThreadID tid = InvalidThreadID);
456
457 /** Sets a int/fp/misc reg. from another thread depending on an ISA-defined
458 * target thread
459 */
460 void setRegOtherThread(unsigned misc_reg, const MiscReg &val,
461 ThreadID tid);
462
463 /** Reads the commit PC of a specific thread. */
464 uint64_t readPC(ThreadID tid);
465
466 /** Sets the commit PC of a specific thread. */
467 void setPC(Addr new_PC, ThreadID tid);
468
469 /** Reads the next PC of a specific thread. */
470 uint64_t readNextPC(ThreadID tid);
471
472 /** Sets the next PC of a specific thread. */
473 void setNextPC(uint64_t val, ThreadID tid);
474
475 /** Reads the next NPC of a specific thread. */
476 uint64_t readNextNPC(ThreadID tid);
477
478 /** Sets the next NPC of a specific thread. */
479 void setNextNPC(uint64_t val, ThreadID tid);
480
481 /** Function to add instruction onto the head of the list of the
482 * instructions. Used when new instructions are fetched.
483 */
484 ListIt addInst(DynInstPtr &inst);
485
486 /** Function to tell the CPU that an instruction has completed. */
487 void instDone(DynInstPtr inst, ThreadID tid);
488
489 /** Add Instructions to the CPU Remove List*/
490 void addToRemoveList(DynInstPtr &inst);
491
492 /** Remove an instruction from CPU */
493 void removeInst(DynInstPtr &inst);
494
495 /** Remove all instructions younger than the given sequence number. */
496 void removeInstsUntil(const InstSeqNum &seq_num,ThreadID tid);
497
498 /** Removes the instruction pointed to by the iterator. */
499 inline void squashInstIt(const ListIt &instIt, ThreadID tid);
500
501 /** Cleans up all instructions on the instruction remove list. */
502 void cleanUpRemovedInsts();
503
504 /** Cleans up all instructions on the request remove list. */
505 void cleanUpRemovedReqs();
506
507 /** Cleans up all instructions on the CPU event remove list. */
508 void cleanUpRemovedEvents();
509
510 /** Debug function to print all instructions on the list. */
511 void dumpInsts();
512
513 /** Forwards an instruction read to the appropriate data
514 * resource (indexes into Resource Pool thru "dataPortIdx")
515 */
516 template <class T>
517 Fault read(DynInstPtr inst, Addr addr, T &data, unsigned flags);
518
519 /** Forwards an instruction write. to the appropriate data
520 * resource (indexes into Resource Pool thru "dataPortIdx")
521 */
522 template <class T>
523 Fault write(DynInstPtr inst, T data, Addr addr, unsigned flags,
524 uint64_t *write_res = NULL);
525
526 /** Forwards an instruction prefetch to the appropriate data
527 * resource (indexes into Resource Pool thru "dataPortIdx")
528 */
529 void prefetch(DynInstPtr inst);
530
531 /** Forwards an instruction writeHint to the appropriate data
532 * resource (indexes into Resource Pool thru "dataPortIdx")
533 */
534 void writeHint(DynInstPtr inst);
535
536 /** Executes a syscall.*/
537 void syscall(int64_t callnum, ThreadID tid);
538
539 public:
540 /** Per-Thread List of all the instructions in flight. */
541 std::list<DynInstPtr> instList[ThePipeline::MaxThreads];
542
543 /** List of all the instructions that will be removed at the end of this
544 * cycle.
545 */
546 std::queue<ListIt> removeList;
547
548 /** List of all the resource requests that will be removed at the end
549 * of this cycle.
550 */
551 std::queue<ResourceRequest*> reqRemoveList;
552
553 /** List of all the cpu event requests that will be removed at the end of
554 * the current cycle.
555 */
556 std::queue<Event*> cpuEventRemoveList;
557
558 /** Records if instructions need to be removed this cycle due to
559 * being retired or squashed.
560 */
561 bool removeInstsThisCycle;
562
563 /** True if there is non-speculative Inst Active In Pipeline. Lets any
564 * execution unit know, NOT to execute while the instruction is active.
565 */
566 bool nonSpecInstActive[ThePipeline::MaxThreads];
567
568 /** Instruction Seq. Num of current non-speculative instruction. */
569 InstSeqNum nonSpecSeqNum[ThePipeline::MaxThreads];
570
571 /** Instruction Seq. Num of last instruction squashed in pipeline */
572 InstSeqNum squashSeqNum[ThePipeline::MaxThreads];
573
574 /** Last Cycle that the CPU squashed instruction end. */
575 Tick lastSquashCycle[ThePipeline::MaxThreads];
576
577 std::list<ThreadID> fetchPriorityList;
578
579 protected:
580 /** Active Threads List */
581 std::list<ThreadID> activeThreads;
582
583 /** Ready Threads List */
584 std::list<ThreadID> readyThreads;
585
586 /** Suspended Threads List */
587 std::list<ThreadID> suspendedThreads;
588
589 /** Thread Status Functions */
590 bool isThreadActive(ThreadID tid);
591 bool isThreadReady(ThreadID tid);
592 bool isThreadSuspended(ThreadID tid);
593
594 private:
595 /** The activity recorder; used to tell if the CPU has any
596 * activity remaining or if it can go to idle and deschedule
597 * itself.
598 */
599 ActivityRecorder activityRec;
600
601 public:
602 /** Number of Active Threads in the CPU */
603 ThreadID numActiveThreads() { return activeThreads.size(); }
604
605 /** Thread id of active thread
606 * Only used for SwitchOnCacheMiss model.
607 * Assumes only 1 thread active
608 */
609 ThreadID activeThreadId()
610 {
611 if (numActiveThreads() > 0)
612 return activeThreads.front();
613 else
614 return InvalidThreadID;
615 }
616
617
618 /** Records that there was time buffer activity this cycle. */
619 void activityThisCycle() { activityRec.activity(); }
620
621 /** Changes a stage's status to active within the activity recorder. */
622 void activateStage(const int idx)
623 { activityRec.activateStage(idx); }
624
625 /** Changes a stage's status to inactive within the activity recorder. */
626 void deactivateStage(const int idx)
627 { activityRec.deactivateStage(idx); }
628
629 /** Wakes the CPU, rescheduling the CPU if it's not already active. */
630 void wakeCPU();
631
632 #if FULL_SYSTEM
633 virtual void wakeup();
634 #endif
635
636 // LL/SC debug functionality
637 unsigned stCondFails;
638
639 unsigned readStCondFailures()
640 { return stCondFails; }
641
642 unsigned setStCondFailures(unsigned st_fails)
643 { return stCondFails = st_fails; }
644
645 /** Returns a pointer to a thread context. */
646 ThreadContext *tcBase(ThreadID tid = 0)
647 {
648 return thread[tid]->getTC();
649 }
650
651 /** Count the Total Instructions Committed in the CPU. */
652 virtual Counter totalInstructions() const
653 {
654 Counter total(0);
655
656 for (ThreadID tid = 0; tid < (ThreadID)thread.size(); tid++)
657 total += thread[tid]->numInst;
658
659 return total;
660 }
661
662 #if FULL_SYSTEM
663 /** Pointer to the system. */
664 System *system;
665
666 /** Pointer to physical memory. */
667 PhysicalMemory *physmem;
668 #endif
669
670 /** The global sequence number counter. */
671 InstSeqNum globalSeqNum[ThePipeline::MaxThreads];
672
673 #ifdef DEBUG
674 /** The global event number counter. */
675 InstSeqNum cpuEventNum;
676
677 /** Number of resource requests active in CPU **/
678 unsigned resReqCount;
679
680 Stats::Scalar maxResReqCount;
681 #endif
682
683 /** Counter of how many stages have completed switching out. */
684 int switchCount;
685
686 /** Pointers to all of the threads in the CPU. */
687 std::vector<Thread *> thread;
688
689 /** Pointer to the icache interface. */
690 MemInterface *icacheInterface;
691
692 /** Pointer to the dcache interface. */
693 MemInterface *dcacheInterface;
694
695 /** Whether or not the CPU should defer its registration. */
696 bool deferRegistration;
697
698 /** Per-Stage Instruction Tracing */
699 bool stageTracing;
700
701 /** The cycle that the CPU was last running, used for statistics. */
702 Tick lastRunningCycle;
703
704 /** Update Thread , used for statistic purposes*/
705 inline void tickThreadStats();
706
707 /** Per-Thread Tick */
708 Stats::Vector threadCycles;
709
710 /** Tick for SMT */
711 Stats::Scalar smtCycles;
712
713 /** Stat for total number of times the CPU is descheduled. */
714 Stats::Scalar timesIdled;
715
716 /** Stat for total number of cycles the CPU spends descheduled. */
717 Stats::Scalar idleCycles;
718
719 /** Stat for the number of committed instructions per thread. */
720 Stats::Vector committedInsts;
721
722 /** Stat for the number of committed instructions per thread. */
723 Stats::Vector smtCommittedInsts;
724
725 /** Stat for the total number of committed instructions. */
726 Stats::Scalar totalCommittedInsts;
727
728 /** Stat for the CPI per thread. */
729 Stats::Formula cpi;
730
731 /** Stat for the SMT-CPI per thread. */
732 Stats::Formula smtCpi;
733
734 /** Stat for the total CPI. */
735 Stats::Formula totalCpi;
736
737 /** Stat for the IPC per thread. */
738 Stats::Formula ipc;
739
740 /** Stat for the total IPC. */
741 Stats::Formula smtIpc;
742
743 /** Stat for the total IPC. */
744 Stats::Formula totalIpc;
745 };
746
747 #endif // __CPU_O3_CPU_HH__