gem5  v22.1.0.0
cpu.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2013, 2016-2020 ARM Limited
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Copyright (c) 2004-2005 The Regents of The University of Michigan
16  * Copyright (c) 2011 Regents of the University of California
17  * All rights reserved.
18  *
19  * Redistribution and use in source and binary forms, with or without
20  * modification, are permitted provided that the following conditions are
21  * met: redistributions of source code must retain the above copyright
22  * notice, this list of conditions and the following disclaimer;
23  * redistributions in binary form must reproduce the above copyright
24  * notice, this list of conditions and the following disclaimer in the
25  * documentation and/or other materials provided with the distribution;
26  * neither the name of the copyright holders nor the names of its
27  * contributors may be used to endorse or promote products derived from
28  * this software without specific prior written permission.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41  */
42 
43 #ifndef __CPU_O3_CPU_HH__
44 #define __CPU_O3_CPU_HH__
45 
46 #include <iostream>
47 #include <list>
48 #include <queue>
49 #include <set>
50 #include <vector>
51 
52 #include "arch/generic/pcstate.hh"
53 #include "base/statistics.hh"
54 #include "cpu/o3/comm.hh"
55 #include "cpu/o3/commit.hh"
56 #include "cpu/o3/decode.hh"
57 #include "cpu/o3/dyn_inst_ptr.hh"
58 #include "cpu/o3/fetch.hh"
59 #include "cpu/o3/free_list.hh"
60 #include "cpu/o3/iew.hh"
61 #include "cpu/o3/limits.hh"
62 #include "cpu/o3/rename.hh"
63 #include "cpu/o3/rob.hh"
64 #include "cpu/o3/scoreboard.hh"
65 #include "cpu/o3/thread_state.hh"
66 #include "cpu/activity.hh"
67 #include "cpu/base.hh"
68 #include "cpu/simple_thread.hh"
69 #include "cpu/timebuf.hh"
70 #include "params/BaseO3CPU.hh"
71 #include "sim/process.hh"
72 
73 namespace gem5
74 {
75 
76 template <class>
77 class Checker;
78 class ThreadContext;
79 
80 class Checkpoint;
81 class Process;
82 
83 namespace o3
84 {
85 
86 class ThreadContext;
87 
93 class CPU : public BaseCPU
94 {
95  public:
97 
98  friend class ThreadContext;
99 
100  public:
101  enum Status
102  {
108  };
109 
112 
115 
116  private:
117 
120 
123 
125  void
127  {
128  if (tickEvent.squashed())
129  reschedule(tickEvent, clockEdge(delay));
130  else if (!tickEvent.scheduled())
131  schedule(tickEvent, clockEdge(delay));
132  }
133 
135  void
137  {
138  if (tickEvent.scheduled())
139  tickEvent.squash();
140  }
141 
153  bool tryDrain();
154 
164  void drainSanityCheck() const;
165 
167  bool isCpuDrained() const;
168 
169  public:
171  CPU(const BaseO3CPUParams &params);
172 
175 
177  void regProbePoints() override;
178 
179  void
180  demapPage(Addr vaddr, uint64_t asn)
181  {
182  mmu->demapPage(vaddr, asn);
183  }
184 
188  void tick();
189 
191  void init() override;
192 
193  void startup() override;
194 
196  int
198  {
199  return activeThreads.size();
200  }
201 
203  void activateThread(ThreadID tid);
204 
206  void deactivateThread(ThreadID tid);
207 
209  void insertThread(ThreadID tid);
210 
212  void removeThread(ThreadID tid);
213 
215  Counter totalInsts() const override;
216 
218  Counter totalOps() const override;
219 
221  void activateContext(ThreadID tid) override;
222 
224  void suspendContext(ThreadID tid) override;
225 
229  void haltContext(ThreadID tid) override;
230 
232  void updateThreadPriority();
233 
235  bool isDraining() const { return drainState() == DrainState::Draining; }
236 
237  void serializeThread(CheckpointOut &cp, ThreadID tid) const override;
238  void unserializeThread(CheckpointIn &cp, ThreadID tid) override;
239 
242 
244  bool isThreadExiting(ThreadID tid) const;
245 
251 
253  void exitThreads();
254 
255  public:
258  DrainState drain() override;
259 
261  void drainResume() override;
262 
270  void commitDrained(ThreadID tid);
271 
273  void switchOut() override;
274 
276  void takeOverFrom(BaseCPU *oldCPU) override;
277 
278  void verifyMemoryMode() const override;
279 
282 
284  void trap(const Fault &fault, ThreadID tid, const StaticInstPtr &inst);
285 
288 
290  void processInterrupts(const Fault &interrupt);
291 
293  void halt() { panic("Halt not implemented!\n"); }
294 
298  RegVal readMiscRegNoEffect(int misc_reg, ThreadID tid) const;
299 
303  RegVal readMiscReg(int misc_reg, ThreadID tid);
304 
306  void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid);
307 
311  void setMiscReg(int misc_reg, RegVal val, ThreadID tid);
312 
313  RegVal getReg(PhysRegIdPtr phys_reg);
314  void getReg(PhysRegIdPtr phys_reg, void *val);
315  void *getWritableReg(PhysRegIdPtr phys_reg);
316 
317  void setReg(PhysRegIdPtr phys_reg, RegVal val);
318  void setReg(PhysRegIdPtr phys_reg, const void *val);
319 
326  RegVal getArchReg(const RegId &reg, ThreadID tid);
327  void getArchReg(const RegId &reg, void *val, ThreadID tid);
328  void *getWritableArchReg(const RegId &reg, ThreadID tid);
329 
330  void setArchReg(const RegId &reg, RegVal val, ThreadID tid);
331  void setArchReg(const RegId &reg, const void *val, ThreadID tid);
332 
334  void pcState(const PCStateBase &new_pc_state, ThreadID tid);
335 
337  const PCStateBase &pcState(ThreadID tid);
338 
343  void squashFromTC(ThreadID tid);
344 
348  ListIt addInst(const DynInstPtr &inst);
349 
351  void instDone(ThreadID tid, const DynInstPtr &inst);
352 
356  void removeFrontInst(const DynInstPtr &inst);
357 
360  void removeInstsNotInROB(ThreadID tid);
361 
363  void removeInstsUntil(const InstSeqNum &seq_num, ThreadID tid);
364 
366  void squashInstIt(const ListIt &instIt, ThreadID tid);
367 
369  void cleanUpRemovedInsts();
370 
372  void dumpInsts();
373 
374  public:
375 #ifndef NDEBUG
378 #endif
379 
382 
386  std::queue<ListIt> removeList;
387 
388 #ifdef DEBUG
392  std::set<InstSeqNum> snList;
393 #endif
394 
399 
400  protected:
403 
406 
409 
412 
415 
418 
421 
424 
427 
430 
433 
439  std::unordered_map<ThreadID, bool> exitingThreads;
440 
443 
445 
446  public:
451  enum StageIdx
452  {
458  NumStages
459  };
460 
463 
466 
469 
472 
475 
476  private:
482 
483  public:
486 
488  void
490  {
492  }
493 
495  void
497  {
499  }
500 
502  void wakeCPU();
503 
504  virtual void wakeup(ThreadID tid) override;
505 
508 
509  public:
513  {
514  return thread[tid]->getTC();
515  }
516 
518  InstSeqNum globalSeqNum;//[MaxThreads];
519 
525 
528 
531 
534 
537 
540 
542  std::map<ThreadID, unsigned> threadMap;
543 
546 
548  Fault
549  pushRequest(const DynInstPtr& inst, bool isLoad, uint8_t *data,
550  unsigned int size, Addr addr, Request::Flags flags,
551  uint64_t *res, AtomicOpFunctorPtr amo_op = nullptr,
552  const std::vector<bool>& byte_enable=std::vector<bool>())
553 
554  {
555  return iew.ldstQueue.pushRequest(inst, isLoad, data, size, addr,
556  flags, res, std::move(amo_op), byte_enable);
557  }
558 
560  Port &
561  getInstPort() override
562  {
563  return fetch.getInstPort();
564  }
565 
567  Port &
568  getDataPort() override
569  {
570  return iew.ldstQueue.getDataPort();
571  }
572 
573  struct CPUStats : public statistics::Group
574  {
575  CPUStats(CPU *cpu);
576 
597 
598  //number of integer register file accesses
601  //number of float register file accesses
604  //number of vector register file accesses
607  //number of predicate register file accesses
610  //number of CC register file accesses
613  //number of misc
617 
618  public:
619  // hardware transactional memory
620  void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid,
621  HtmFailureFaultCause cause) override;
622 };
623 
624 } // namespace o3
625 } // namespace gem5
626 
627 #endif // __CPU_O3_CPU_HH__
const char data[]
ActivityRecorder helper class that informs the CPU if it can switch over to being idle or not.
Definition: activity.hh:54
void activity()
Records that there is activity this cycle.
Definition: activity.cc:55
void deactivateStage(const int idx)
Deactivates a stage.
Definition: activity.cc:108
void activateStage(const int idx)
Marks a stage as active.
Definition: activity.cc:91
void demapPage(Addr vaddr, uint64_t asn)
Definition: mmu.cc:97
Templated Checker class.
Definition: cpu.hh:448
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:79
Physical register ID.
Definition: reg_class.hh:392
Ports are used to interface objects to each other.
Definition: port.hh:62
ProbePointArg generates a point for the class of Arg.
Definition: probe.hh:264
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:91
ThreadContext is the external interface to all thread state for anything outside of the CPU.
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
Definition: cpu.hh:94
std::vector< BaseISA * > isa
Definition: cpu.hh:444
void instDone(ThreadID tid, const DynInstPtr &inst)
Function to tell the CPU that an instruction has completed.
Definition: cpu.cc:1224
IEW iew
The issue/execute/writeback stages.
Definition: cpu.hh:411
gem5::Checker< DynInstPtr > * checker
Pointer to the checker, which can dynamically verify instruction results at run time.
Definition: cpu.hh:524
void dumpInsts()
Debug function to print all instructions on the list.
Definition: cpu.cc:1372
void drainSanityCheck() const
Perform sanity checks after a drain.
Definition: cpu.cc:887
void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid, HtmFailureFaultCause cause) override
This function is used to instruct the memory subsystem that a transaction should be aborted and the s...
Definition: cpu.cc:1529
std::list< DynInstPtr > instList
List of all the instructions in flight.
Definition: cpu.hh:381
Fault pushRequest(const DynInstPtr &inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op=nullptr, const std::vector< bool > &byte_enable=std::vector< bool >())
CPU pushRequest function, forwards request to LSQ.
Definition: cpu.hh:549
ListIt addInst(const DynInstPtr &inst)
Function to add instruction onto the head of the list of the instructions.
Definition: cpu.cc:1216
void setArchReg(const RegId &reg, RegVal val, ThreadID tid)
Definition: cpu.cc:1181
ROB rob
The re-order buffer.
Definition: cpu.hh:429
InstSeqNum globalSeqNum
The global sequence number counter.
Definition: cpu.hh:518
void haltContext(ThreadID tid) override
Remove Thread from Active Threads List && Remove Thread Context from CPU.
Definition: cpu.cc:656
TimeBuffer< DecodeStruct > decodeQueue
The decode stage's instruction queue.
Definition: cpu.hh:468
EventFunctionWrapper tickEvent
The tick event used for scheduling CPU ticks.
Definition: cpu.hh:119
UnifiedRenameMap commitRenameMap[MaxThreads]
The commit rename map.
Definition: cpu.hh:426
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Serialize a single thread.
Definition: cpu.cc:798
void startup() override
startup() is the final initialization call before simulation.
Definition: cpu.cc:522
void drainResume() override
Resumes execution after a drain.
Definition: cpu.cc:938
RegVal getReg(PhysRegIdPtr phys_reg)
Definition: cpu.cc:1037
Rename rename
The dispatch stage.
Definition: cpu.hh:408
void regProbePoints() override
Register probe points.
Definition: cpu.cc:302
int numActiveThreads()
Returns the Number of Active Threads in the CPU.
Definition: cpu.hh:197
void deactivateThread(ThreadID tid)
Remove Thread from Active Threads List.
Definition: cpu.cc:550
Counter totalInsts() const override
Count the Total Instructions Committed in the CPU.
Definition: cpu.cc:574
void trap(const Fault &fault, ThreadID tid, const StaticInstPtr &inst)
Traps to handle given fault.
Definition: cpu.cc:791
CPU(const BaseO3CPUParams &params)
Constructs a CPU with the given parameters.
Definition: cpu.cc:72
ProbePointArg< PacketPtr > * ppInstAccessComplete
Definition: cpu.hh:173
void * getWritableReg(PhysRegIdPtr phys_reg)
Definition: cpu.cc:1089
void exitThreads()
Terminate all threads that are ready to exit.
Definition: cpu.cc:1506
ThreadID getFreeTid()
Gets a free thread id.
Definition: cpu.cc:1432
std::vector< ThreadState * > thread
Pointers to all of the threads in the CPU.
Definition: cpu.hh:530
void tick()
Ticks CPU, calling tick() on each stage, and checking the overall activity to see if the CPU should d...
Definition: cpu.cc:446
void halt()
Halts the CPU.
Definition: cpu.hh:293
void removeThread(ThreadID tid)
Remove all of a thread's context from CPU.
Definition: cpu.cc:716
void commitDrained(ThreadID tid)
Commit has reached a safe point to drain a thread.
Definition: cpu.cc:935
void unscheduleTickEvent()
Unschedule tick event, regardless of its current state.
Definition: cpu.hh:136
gem5::o3::CPU::CPUStats cpuStats
UnifiedFreeList freeList
The free list.
Definition: cpu.hh:420
Port & getInstPort() override
Used by the fetch unit to get a hold of the instruction port.
Definition: cpu.hh:561
Status _status
Overall CPU status.
Definition: cpu.hh:114
std::list< DynInstPtr >::iterator ListIt
Definition: cpu.hh:96
Port & getDataPort() override
Get the dcache port (used to find block size for translations).
Definition: cpu.hh:568
void activateContext(ThreadID tid) override
Add Thread to Active Threads List.
Definition: cpu.cc:598
virtual void wakeup(ThreadID tid) override
Definition: cpu.cc:1420
bool removeInstsThisCycle
Records if instructions need to be removed this cycle due to being retired or squashed.
Definition: cpu.hh:398
void setMiscReg(int misc_reg, RegVal val, ThreadID tid)
Sets a misc.
Definition: cpu.cc:1030
void activityThisCycle()
Records that there was time buffer activity this cycle.
Definition: cpu.hh:485
std::vector< ThreadID > tids
Available thread ids in the cpu.
Definition: cpu.hh:545
UnifiedRenameMap renameMap[MaxThreads]
The rename map.
Definition: cpu.hh:423
ProbePointArg< std::pair< DynInstPtr, PacketPtr > > * ppDataAccessComplete
Definition: cpu.hh:174
void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid)
Sets a miscellaneous register.
Definition: cpu.cc:1024
void removeInstsUntil(const InstSeqNum &seq_num, ThreadID tid)
Remove all instructions younger than the given sequence number.
Definition: cpu.cc:1300
bool isDraining() const
Is the CPU draining?
Definition: cpu.hh:235
std::queue< ListIt > removeList
List of all the instructions that will be removed at the end of this cycle.
Definition: cpu.hh:386
TimeBuffer< FetchStruct > fetchQueue
The fetch stage's instruction queue.
Definition: cpu.hh:465
void cleanUpRemovedInsts()
Cleans up all instructions on the remove list.
Definition: cpu.cc:1348
@ SwitchedOut
Definition: cpu.hh:107
void setReg(PhysRegIdPtr phys_reg, RegVal val)
Definition: cpu.cc:1105
Commit commit
The commit stage.
Definition: cpu.hh:414
void suspendContext(ThreadID tid) override
Remove Thread from Active Threads List.
Definition: cpu.cc:636
void demapPage(Addr vaddr, uint64_t asn)
Definition: cpu.hh:180
void unserializeThread(CheckpointIn &cp, ThreadID tid) override
Unserialize one thread.
Definition: cpu.cc:804
void removeInstsNotInROB(ThreadID tid)
Remove all instructions that are not currently in the ROB.
Definition: cpu.cc:1256
void takeOverFrom(BaseCPU *oldCPU) override
Takes over from another CPU.
Definition: cpu.cc:981
void switchOut() override
Switches out this CPU.
Definition: cpu.cc:967
PhysRegFile regFile
The register file.
Definition: cpu.hh:417
Cycles lastRunningCycle
The cycle that the CPU was last running, used for statistics.
Definition: cpu.hh:536
bool tryDrain()
Check if the pipeline has drained and signal drain done.
Definition: cpu.cc:872
ActivityRecorder activityRec
The activity recorder; used to tell if the CPU has any activity remaining or if it can go to idle and...
Definition: cpu.hh:481
void processInterrupts(const Fault &interrupt)
Processes any an interrupt fault.
Definition: cpu.cc:775
void squashFromTC(ThreadID tid)
Initiates a squash of all in-flight instructions for a given thread.
Definition: cpu.cc:1209
TimeBuffer< TimeStruct > timeBuffer
The main time buffer to do backwards communication.
Definition: cpu.hh:462
Tick lastActivatedCycle
The cycle that the CPU was last activated by a new thread.
Definition: cpu.hh:539
StageIdx
Enum to give each stage a specific index, so when calling activateStage() or deactivateStage(),...
Definition: cpu.hh:452
@ CommitIdx
Definition: cpu.hh:457
@ DecodeIdx
Definition: cpu.hh:454
@ NumStages
Definition: cpu.hh:458
@ RenameIdx
Definition: cpu.hh:455
@ FetchIdx
Definition: cpu.hh:453
int instcount
Count of total number of dynamic instructions in flight.
Definition: cpu.hh:377
void deactivateStage(const StageIdx idx)
Changes a stage's status to inactive within the activity recorder.
Definition: cpu.hh:496
void squashInstIt(const ListIt &instIt, ThreadID tid)
Removes the instruction pointed to by the iterator.
Definition: cpu.cc:1328
BaseMMU * mmu
Definition: cpu.hh:110
System * system
Pointer to the system.
Definition: cpu.hh:527
Decode decode
The decode stage.
Definition: cpu.hh:405
void verifyMemoryMode() const override
Verify that the system is in a memory mode supported by the CPU.
Definition: cpu.cc:1002
gem5::ThreadContext * tcBase(ThreadID tid)
Returns a pointer to a thread context.
Definition: cpu.hh:512
RegVal getArchReg(const RegId &reg, ThreadID tid)
Architectural register accessors.
Definition: cpu.cc:1157
TimeBuffer< IEWStruct > iewQueue
The IEW stage's instruction queue.
Definition: cpu.hh:474
EventFunctionWrapper threadExitEvent
The exit event used for terminating all ready-to-exit threads.
Definition: cpu.hh:122
DrainState drain() override
Starts draining the CPU's pipeline of all instructions in order to stop all memory accesses.
Definition: cpu.cc:810
std::list< ThreadID > activeThreads
Active Threads List.
Definition: cpu.hh:432
Fault getInterrupts()
Returns the Fault for any valid interrupt.
Definition: cpu.cc:768
InstSeqNum getAndIncrementInstSeq()
Get the current instruction sequence number, and increment it.
Definition: cpu.hh:281
void scheduleTickEvent(Cycles delay)
Schedule tick event, regardless of its current state.
Definition: cpu.hh:126
RegVal readMiscRegNoEffect(int misc_reg, ThreadID tid) const
Register accessors.
Definition: cpu.cc:1011
bool isCpuDrained() const
Check if a system is in a drained state.
Definition: cpu.cc:898
Fetch fetch
The fetch stage.
Definition: cpu.hh:402
void addThreadToExitingList(ThreadID tid)
Insert tid to the list of threads trying to exit.
Definition: cpu.cc:1461
void pcState(const PCStateBase &new_pc_state, ThreadID tid)
Sets the commit PC state of a specific thread.
Definition: cpu.cc:1203
void scheduleThreadExitEvent(ThreadID tid)
If a thread is trying to exit and its corresponding trap event has been completed,...
Definition: cpu.cc:1486
void updateThreadPriority()
Update The Order In Which We Process Threads.
Definition: cpu.cc:1445
bool isThreadExiting(ThreadID tid) const
Is the thread trying to exit?
Definition: cpu.cc:1480
void removeFrontInst(const DynInstPtr &inst)
Remove an instruction from the front end of the list.
Definition: cpu.cc:1243
std::map< ThreadID, unsigned > threadMap
Mapping for system thread id to cpu id.
Definition: cpu.hh:542
void * getWritableArchReg(const RegId &reg, ThreadID tid)
Definition: cpu.cc:1173
RegVal readMiscReg(int misc_reg, ThreadID tid)
Reads a misc.
Definition: cpu.cc:1017
void init() override
Initialize the CPU.
Definition: cpu.cc:504
void activateThread(ThreadID tid)
Add Thread to Active Threads List.
Definition: cpu.cc:534
void activateStage(const StageIdx idx)
Changes a stage's status to active within the activity recorder.
Definition: cpu.hh:489
std::list< int > cpuWaitList
Threads Scheduled to Enter CPU.
Definition: cpu.hh:533
Scoreboard scoreboard
Integer Register Scoreboard.
Definition: cpu.hh:442
std::unordered_map< ThreadID, bool > exitingThreads
This is a list of threads that are trying to exit.
Definition: cpu.hh:439
Counter totalOps() const override
Count the Total Ops (including micro ops) committed in the CPU.
Definition: cpu.cc:586
void wakeCPU()
Wakes the CPU, rescheduling the CPU if it's not already active.
Definition: cpu.cc:1399
void insertThread(ThreadID tid)
Setup CPU to insert a thread's context.
Definition: cpu.cc:678
TimeBuffer< RenameStruct > renameQueue
The rename stage's instruction queue.
Definition: cpu.hh:471
Commit handles single threaded and SMT commit.
Definition: commit.hh:92
Decode class handles both single threaded and SMT decode.
Definition: decode.hh:70
Fetch class handles both single threaded and SMT fetch.
Definition: fetch.hh:79
RequestPort & getInstPort()
Definition: fetch.hh:360
IEW handles both single threaded and SMT IEW (issue/execute/writeback).
Definition: iew.hh:88
LSQ ldstQueue
Load / store queue.
Definition: iew.hh:358
Memory operation metadata.
Definition: lsq.hh:190
RequestPort & getDataPort()
Definition: lsq.hh:892
Fault pushRequest(const DynInstPtr &inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable)
Definition: lsq.cc:783
Simple physical register file class.
Definition: regfile.hh:66
ROB class.
Definition: rob.hh:72
Rename handles both single threaded and SMT rename.
Definition: rename.hh:79
Implements a simple scoreboard to track which registers are ready.
Definition: scoreboard.hh:55
Derived ThreadContext class for use with the O3CPU.
FreeList class that simply holds the list of free integer and floating point registers.
Definition: free_list.hh:125
Unified register rename map for all classes of registers.
Definition: rename_map.hh:169
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2540
Statistics container.
Definition: group.hh:94
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1931
A vector of scalar stats.
Definition: statistics.hh:2007
STL list class.
Definition: stl.hh:51
STL vector class.
Definition: stl.hh:37
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:242
DrainState drainState() const
Return the current drain state of an object.
Definition: drain.hh:324
DrainState
Object drain/handover states.
Definition: drain.hh:75
@ Draining
Draining buffers pending serialization/handover.
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:465
void squash()
Squash the current event.
Definition: eventq.hh:472
void schedule(Event &event, Tick when)
Definition: eventq.hh:1019
void reschedule(Event &event, Tick when, bool always=false)
Definition: eventq.hh:1037
bool squashed() const
Check whether the event is squashed.
Definition: eventq.hh:479
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:178
const Params & params() const
Definition: sim_object.hh:176
uint8_t flags
Definition: helpers.cc:66
Bitfield< 5, 3 > reg
Definition: types.hh:92
Bitfield< 63 > val
Definition: misc.hh:776
Bitfield< 3 > addr
Definition: types.hh:84
static constexpr int MaxThreads
Definition: limits.hh:38
double Counter
All counters are of 64-bit values.
Definition: types.hh:47
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< FaultBase > Fault
Definition: types.hh:248
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:235
std::ostream CheckpointOut
Definition: serialize.hh:66
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
uint64_t Tick
Tick count type.
Definition: types.hh:58
uint64_t RegVal
Definition: types.hh:173
HtmFailureFaultCause
Definition: htm.hh:48
uint64_t InstSeqNum
Definition: inst_seq.hh:40
Declaration of Statistics objects.
statistics::Scalar timesIdled
Stat for total number of times the CPU is descheduled.
Definition: cpu.hh:578
statistics::Scalar ccRegfileReads
Definition: cpu.hh:611
statistics::Scalar ccRegfileWrites
Definition: cpu.hh:612
statistics::Scalar quiesceCycles
Stat for total number of cycles the CPU spends descheduled due to a quiesce operation or waiting for ...
Definition: cpu.hh:583
statistics::Scalar intRegfileReads
Definition: cpu.hh:599
statistics::Scalar vecRegfileWrites
Definition: cpu.hh:606
statistics::Formula ipc
Stat for the IPC per thread.
Definition: cpu.hh:594
statistics::Scalar miscRegfileReads
Definition: cpu.hh:614
statistics::Scalar fpRegfileWrites
Definition: cpu.hh:603
statistics::Scalar vecPredRegfileWrites
Definition: cpu.hh:609
statistics::Formula totalCpi
Stat for the total CPI.
Definition: cpu.hh:592
statistics::Scalar vecPredRegfileReads
Definition: cpu.hh:608
statistics::Scalar vecRegfileReads
Definition: cpu.hh:605
statistics::Vector committedInsts
Stat for the number of committed instructions per thread.
Definition: cpu.hh:585
statistics::Scalar fpRegfileReads
Definition: cpu.hh:602
statistics::Scalar idleCycles
Stat for total number of cycles the CPU spends descheduled.
Definition: cpu.hh:580
statistics::Formula cpi
Stat for the CPI per thread.
Definition: cpu.hh:590
statistics::Scalar intRegfileWrites
Definition: cpu.hh:600
statistics::Scalar miscRegfileWrites
Definition: cpu.hh:615
statistics::Formula totalIpc
Stat for the total IPC.
Definition: cpu.hh:596
CPUStats(CPU *cpu)
Definition: cpu.cc:318
statistics::Vector committedOps
Stat for the number of committed ops (including micro ops) per thread.
Definition: cpu.hh:588

Generated on Wed Dec 21 2022 10:22:24 for gem5 by doxygen 1.9.1