gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::o3::CPU Class Reference

O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buffers between stages. More...

#include <cpu.hh>

Inheritance diagram for gem5::o3::CPU:
gem5::BaseCPU gem5::ClockedObject gem5::SimObject gem5::Clocked gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

Classes

struct  CPUStats
 

Public Types

enum  Status {
  Running , Idle , Halted , Blocked ,
  SwitchedOut
}
 
enum  StageIdx {
  FetchIdx , DecodeIdx , RenameIdx , IEWIdx ,
  CommitIdx , NumStages
}
 Enum to give each stage a specific index, so when calling activateStage() or deactivateStage(), they can specify which stage is being activated/deactivated. More...
 
typedef std::list< DynInstPtr >::iterator ListIt
 
using LSQRequest = LSQ::LSQRequest
 
using PerThreadUnifiedRenameMap
 
- Public Types inherited from gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject.
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 

Public Member Functions

 CPU (const BaseO3CPUParams &params)
 Constructs a CPU with the given parameters.
 
void regProbePoints () override
 Register probe points.
 
void demapPage (Addr vaddr, uint64_t asn)
 
void tick ()
 Ticks CPU, calling tick() on each stage, and checking the overall activity to see if the CPU should deschedule itself.
 
void init () override
 Initialize the CPU.
 
void startup () override
 startup() is the final initialization call before simulation.
 
int numActiveThreads ()
 Returns the Number of Active Threads in the CPU.
 
void activateThread (ThreadID tid)
 Add Thread to Active Threads List.
 
void deactivateThread (ThreadID tid)
 Remove Thread from Active Threads List.
 
void insertThread (ThreadID tid)
 Setup CPU to insert a thread's context.
 
void removeThread (ThreadID tid)
 Remove all of a thread's context from CPU.
 
Counter totalInsts () const override
 Count the Total Instructions Committed in the CPU.
 
Counter totalOps () const override
 Count the Total Ops (including micro ops) committed in the CPU.
 
void activateContext (ThreadID tid) override
 Add Thread to Active Threads List.
 
void suspendContext (ThreadID tid) override
 Remove Thread from Active Threads List.
 
void haltContext (ThreadID tid) override
 Remove Thread from Active Threads List && Remove Thread Context from CPU.
 
void updateThreadPriority ()
 Update The Order In Which We Process Threads.
 
bool isDraining () const
 Is the CPU draining?
 
void serializeThread (CheckpointOut &cp, ThreadID tid) const override
 Serialize a single thread.
 
void unserializeThread (CheckpointIn &cp, ThreadID tid) override
 Unserialize one thread.
 
void addThreadToExitingList (ThreadID tid)
 Insert tid to the list of threads trying to exit.
 
bool isThreadExiting (ThreadID tid) const
 Is the thread trying to exit?
 
void scheduleThreadExitEvent (ThreadID tid)
 If a thread is trying to exit and its corresponding trap event has been completed, schedule an event to terminate the thread.
 
void exitThreads ()
 Terminate all threads that are ready to exit.
 
DrainState drain () override
 Starts draining the CPU's pipeline of all instructions in order to stop all memory accesses.
 
void drainResume () override
 Resumes execution after a drain.
 
void commitDrained (ThreadID tid)
 Commit has reached a safe point to drain a thread.
 
void switchOut () override
 Switches out this CPU.
 
void takeOverFrom (BaseCPU *oldCPU) override
 Takes over from another CPU.
 
void verifyMemoryMode () const override
 Verify that the system is in a memory mode supported by the CPU.
 
InstSeqNum getAndIncrementInstSeq ()
 Get the current instruction sequence number, and increment it.
 
void trap (const Fault &fault, ThreadID tid, const StaticInstPtr &inst)
 Traps to handle given fault.
 
Fault getInterrupts ()
 Returns the Fault for any valid interrupt.
 
void processInterrupts (const Fault &interrupt)
 Processes any an interrupt fault.
 
void halt ()
 Halts the CPU.
 
RegVal readMiscRegNoEffect (int misc_reg, ThreadID tid) const
 Register accessors.
 
RegVal readMiscReg (int misc_reg, ThreadID tid)
 Reads a misc.
 
void setMiscRegNoEffect (int misc_reg, RegVal val, ThreadID tid)
 Sets a miscellaneous register.
 
void setMiscReg (int misc_reg, RegVal val, ThreadID tid)
 Sets a misc.
 
RegVal getReg (PhysRegIdPtr phys_reg, ThreadID tid)
 
void getReg (PhysRegIdPtr phys_reg, void *val, ThreadID tid)
 
void * getWritableReg (PhysRegIdPtr phys_reg, ThreadID tid)
 
void setReg (PhysRegIdPtr phys_reg, RegVal val, ThreadID tid)
 
void setReg (PhysRegIdPtr phys_reg, const void *val, ThreadID tid)
 
RegVal getArchReg (const RegId &reg, ThreadID tid)
 Architectural register accessors.
 
void getArchReg (const RegId &reg, void *val, ThreadID tid)
 
void * getWritableArchReg (const RegId &reg, ThreadID tid)
 
void setArchReg (const RegId &reg, RegVal val, ThreadID tid)
 
void setArchReg (const RegId &reg, const void *val, ThreadID tid)
 
void pcState (const PCStateBase &new_pc_state, ThreadID tid)
 Sets the commit PC state of a specific thread.
 
const PCStateBasepcState (ThreadID tid)
 Reads the commit PC state of a specific thread.
 
void squashFromTC (ThreadID tid)
 Initiates a squash of all in-flight instructions for a given thread.
 
ListIt addInst (const DynInstPtr &inst)
 Function to add instruction onto the head of the list of the instructions.
 
void instDone (ThreadID tid, const DynInstPtr &inst)
 Function to tell the CPU that an instruction has completed.
 
void removeFrontInst (const DynInstPtr &inst)
 Remove an instruction from the front end of the list.
 
void removeInstsNotInROB (ThreadID tid)
 Remove all instructions that are not currently in the ROB.
 
void removeInstsUntil (const InstSeqNum &seq_num, ThreadID tid)
 Remove all instructions younger than the given sequence number.
 
void squashInstIt (const ListIt &instIt, ThreadID tid)
 Removes the instruction pointed to by the iterator.
 
void cleanUpRemovedInsts ()
 Cleans up all instructions on the remove list.
 
void dumpInsts ()
 Debug function to print all instructions on the list.
 
void activityThisCycle ()
 Records that there was time buffer activity this cycle.
 
void activateStage (const StageIdx idx)
 Changes a stage's status to active within the activity recorder.
 
void deactivateStage (const StageIdx idx)
 Changes a stage's status to inactive within the activity recorder.
 
void wakeCPU ()
 Wakes the CPU, rescheduling the CPU if it's not already active.
 
virtual void wakeup (ThreadID tid) override
 
ThreadID getFreeTid ()
 Gets a free thread id.
 
gem5::ThreadContexttcBase (ThreadID tid)
 Returns a pointer to a thread context.
 
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.
 
PortgetInstPort () override
 Used by the fetch unit to get a hold of the instruction port.
 
PortgetDataPort () override
 Get the dcache port (used to find block size for translations).
 
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 speculative state should be thrown away.
 
- Public Member Functions inherited from gem5::BaseCPU
int cpuId () const
 Reads this CPU's ID.
 
uint32_t socketId () const
 Reads this CPU's Socket ID.
 
RequestorID dataRequestorId () const
 Reads this CPU's unique data requestor ID.
 
RequestorID instRequestorId () const
 Reads this CPU's unique instruction requestor ID.
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port on this CPU.
 
uint32_t taskId () const
 Get cpu task id.
 
void taskId (uint32_t id)
 Set cpu task id.
 
uint32_t getPid () const
 
void setPid (uint32_t pid)
 
void workItemBegin ()
 
void workItemEnd ()
 
Tick instCount ()
 
BaseInterruptsgetInterruptController (ThreadID tid)
 
void postInterrupt (ThreadID tid, int int_num, int index)
 
void clearInterrupt (ThreadID tid, int int_num, int index)
 
void clearInterrupts (ThreadID tid)
 
bool checkInterrupts (ThreadID tid) const
 
trace::InstTracergetTracer ()
 Provide access to the tracer pointer.
 
int findContext (ThreadContext *tc)
 Given a Thread Context pointer return the thread num.
 
virtual ThreadContextgetContext (int tn)
 Given a thread num get tho thread context for it.
 
unsigned numContexts ()
 Get the number of thread contexts available.
 
ThreadID contextToThread (ContextID cid)
 Convert ContextID to threadID.
 
 PARAMS (BaseCPU)
 
 BaseCPU (const Params &params, bool is_checker=false)
 
virtual ~BaseCPU ()
 
void regStats () override
 Callback to set stat parameters.
 
void registerThreadContexts ()
 
void deschedulePowerGatingEvent ()
 
void schedulePowerGatingEvent ()
 
virtual void setReset (bool state)
 Set the reset of the CPU to be either asserted or deasserted.
 
void flushTLBs ()
 Flush all TLBs in the CPU.
 
bool switchedOut () const
 Determine if the CPU is switched out.
 
Addr cacheLineSize () const
 Get the cache line size of the system.
 
void serialize (CheckpointOut &cp) const override
 Serialize this object to the given output stream.
 
void unserialize (CheckpointIn &cp) override
 Reconstruct the state of this object from a checkpoint.
 
void scheduleInstStop (ThreadID tid, Counter insts, std::string cause)
 Schedule an event that exits the simulation loops after a predefined number of instructions.
 
void scheduleSimpointsInstStop (std::vector< Counter > inst_starts)
 Schedule simpoint events using the scheduleInstStop function.
 
void scheduleInstStopAnyThread (Counter max_insts)
 Schedule an exit event when any threads in the core reach the max_insts instructions using the scheduleInstStop function.
 
uint64_t getCurrentInstCount (ThreadID tid)
 Get the number of instructions executed by the specified thread on this CPU.
 
void traceFunctions (Addr pc)
 
void armMonitor (ThreadID tid, Addr address)
 
bool mwait (ThreadID tid, PacketPtr pkt)
 
void mwaitAtomic (ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
 
AddressMonitorgetCpuAddrMonitor (ThreadID tid)
 
virtual void probeInstCommit (const StaticInstPtr &inst, Addr pc)
 Helper method to trigger PMU probes for a committed instruction.
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint.
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint.
 
virtual void regProbeListeners ()
 Register probe listeners for this object.
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object.
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining.
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes.
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers.
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::EventManager
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers.
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue.
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object.
 
virtual void notifyFork ()
 Notify a child process of a fork.
 
- Public Member Functions inherited from gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group.
 
virtual ~Group ()
 
virtual void resetStats ()
 Callback to reset stats.
 
virtual void preDumpStats ()
 Callback before stats are dumped.
 
void addStat (statistics::Info *info)
 Register a stat with this group.
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object.
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object.
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block.
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group.
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block.
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 
- Public Member Functions inherited from gem5::Clocked
void updateClockPeriod ()
 Update the tick to the current tick.
 
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 caller to determine a future cycle.
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge.
 
Tick nextCycle () const
 Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future.
 
uint64_t frequency () const
 
Tick clockPeriod () const
 
double voltage () const
 
Cycles ticksToCycles (Tick t) const
 
Tick cyclesToTicks (Cycles c) const
 

Public Attributes

BaseMMUmmu
 
Status _status
 Overall CPU status.
 
ProbePointArg< PacketPtr > * ppInstAccessComplete
 
ProbePointArg< std::pair< DynInstPtr, PacketPtr > > * ppDataAccessComplete
 
int instcount
 Count of total number of dynamic instructions in flight.
 
std::list< DynInstPtrinstList
 List of all the instructions in flight.
 
std::queue< ListItremoveList
 List of all the instructions that will be removed at the end of this cycle.
 
bool removeInstsThisCycle
 Records if instructions need to be removed this cycle due to being retired or squashed.
 
TimeBuffer< TimeStructtimeBuffer
 The main time buffer to do backwards communication.
 
TimeBuffer< FetchStructfetchQueue
 The fetch stage's instruction queue.
 
TimeBuffer< DecodeStructdecodeQueue
 The decode stage's instruction queue.
 
TimeBuffer< RenameStructrenameQueue
 The rename stage's instruction queue.
 
TimeBuffer< IEWStructiewQueue
 The IEW stage's instruction queue.
 
InstSeqNum globalSeqNum
 The global sequence number counter.
 
gem5::Checker< DynInstPtr > * checker
 Pointer to the checker, which can dynamically verify instruction results at run time.
 
Systemsystem
 Pointer to the system.
 
std::vector< ThreadState * > thread
 Pointers to all of the threads in the CPU.
 
std::list< int > cpuWaitList
 Threads Scheduled to Enter CPU.
 
Cycles lastRunningCycle
 The cycle that the CPU was last running, used for statistics.
 
Tick lastActivatedCycle
 The cycle that the CPU was last activated by a new thread.
 
std::map< ThreadID, unsigned > threadMap
 Mapping for system thread id to cpu id.
 
std::vector< ThreadIDtids
 Available thread ids in the cpu.
 
gem5::o3::CPU::CPUStats cpuStats
 
- Public Attributes inherited from gem5::BaseCPU
ThreadID numThreads
 Number of threads we're actually simulating (<= SMT_MAX_THREADS).
 
Systemsystem
 
gem5::BaseCPU::BaseCPUStats baseStats
 
Cycles syscallRetryLatency
 
std::vector< std::unique_ptr< FetchCPUStats > > fetchStats
 
std::vector< std::unique_ptr< ExecuteCPUStats > > executeStats
 
std::vector< std::unique_ptr< CommitCPUStats > > commitStats
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 

Protected Attributes

Fetch fetch
 The fetch stage.
 
Decode decode
 The decode stage.
 
Rename rename
 The dispatch stage.
 
IEW iew
 The issue/execute/writeback stages.
 
Commit commit
 The commit stage.
 
PhysRegFile regFile
 The register file.
 
UnifiedFreeList freeList
 The free list.
 
PerThreadUnifiedRenameMap renameMap
 The rename map.
 
PerThreadUnifiedRenameMap commitRenameMap
 The commit rename map.
 
ROB rob
 The re-order buffer.
 
std::list< ThreadIDactiveThreads
 Active Threads List.
 
std::unordered_map< ThreadID, bool > exitingThreads
 This is a list of threads that are trying to exit.
 
Scoreboard scoreboard
 Integer Register Scoreboard.
 
std::vector< BaseISA * > isa
 
- Protected Attributes inherited from gem5::BaseCPU
Tick instCnt
 Instruction count used for SPARC misc register.
 
int _cpuId
 
const uint32_t _socketId
 Each cpu will have a socket ID that corresponds to its physical location in the system.
 
RequestorID _instRequestorId
 instruction side request id that must be placed in all requests
 
RequestorID _dataRequestorId
 data side request id that must be placed in all requests
 
uint32_t _taskId
 An intrenal representation of a task identifier within gem5.
 
uint32_t _pid
 The current OS process ID that is executing on this processor.
 
bool _switchedOut
 Is the CPU switched out or active?
 
const Addr _cacheLineSize
 Cache the cache line size that we get from the system.
 
SignalSinkPort< bool > modelResetPort
 
std::vector< BaseInterrupts * > interrupts
 
std::vector< ThreadContext * > threadContexts
 
trace::InstTracertracer
 
Cycles previousCycle
 
CPUState previousState
 
const Cycles pwrGatingLatency
 
const bool powerGatingOnIdle
 
EventFunctionWrapper enterPwrGatingEvent
 
probing::PMUUPtr ppRetiredInsts
 Instruction commit probe point.
 
probing::PMUUPtr ppRetiredInstsPC
 
probing::PMUUPtr ppRetiredLoads
 Retired load instructions.
 
probing::PMUUPtr ppRetiredStores
 Retired store instructions.
 
probing::PMUUPtr ppRetiredBranches
 Retired branches (any type)
 
probing::PMUUPtr ppAllCycles
 CPU cycle counter even if any thread Context is suspended.
 
probing::PMUUPtr ppActiveCycles
 CPU cycle counter, only counts if any thread contexts is active.
 
ProbePointArg< bool > * ppSleeping
 ProbePoint that signals transitions of threadContexts sets.
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters.
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue.
 

Private Member Functions

void scheduleTickEvent (Cycles delay)
 Schedule tick event, regardless of its current state.
 
void unscheduleTickEvent ()
 Unschedule tick event, regardless of its current state.
 
bool tryDrain ()
 Check if the pipeline has drained and signal drain done.
 
void drainSanityCheck () const
 Perform sanity checks after a drain.
 
bool isCpuDrained () const
 Check if a system is in a drained state.
 

Private Attributes

EventFunctionWrapper tickEvent
 The tick event used for scheduling CPU ticks.
 
EventFunctionWrapper threadExitEvent
 The exit event used for terminating all ready-to-exit threads.
 
ActivityRecorder activityRec
 The activity recorder; used to tell if the CPU has any activity remaining or if it can go to idle and deschedule itself.
 

Friends

class ThreadContext
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::BaseCPU
static int numSimulatedCPUs ()
 
static Counter numSimulatedInsts ()
 
static Counter numSimulatedOps ()
 
- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing all SimObjects in the system.
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it.
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints.
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 
- Static Public Attributes inherited from gem5::BaseCPU
static const uint32_t invldPid = std::numeric_limits<uint32_t>::max()
 Invalid or unknown Pid.
 
- Protected Types inherited from gem5::BaseCPU
enum  CPUState { CPU_STATE_ON , CPU_STATE_SLEEP , CPU_STATE_WAKEUP }
 
- Protected Member Functions inherited from gem5::BaseCPU
void updateCycleCounters (CPUState state)
 base method keeping track of cycle progression
 
void enterPwrGating ()
 
probing::PMUUPtr pmuProbePoint (const char *name)
 Helper method to instantiate probe points belonging to this object.
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained.
 
- Protected Member Functions inherited from gem5::Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters.
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance.
 
void resetClock () const
 Reset the object's clock using the current global tick value.
 
virtual void clockPeriodUpdated ()
 A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed.
 
- Static Protected Attributes inherited from gem5::BaseCPU
static std::unique_ptr< GlobalStatsglobalStats
 Pointer to the global stat structure.
 

Detailed Description

O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buffers between stages.

The tick() function for the CPU is defined here.

Definition at line 93 of file cpu.hh.

Member Typedef Documentation

◆ ListIt

Definition at line 96 of file cpu.hh.

◆ LSQRequest

Definition at line 111 of file cpu.hh.

◆ PerThreadUnifiedRenameMap

Initial value:
std::array< UnifiedRenameMap, MaxThreads > PerThreadUnifiedRenameMap

Definition at line 113 of file cpu.hh.

Member Enumeration Documentation

◆ StageIdx

Enum to give each stage a specific index, so when calling activateStage() or deactivateStage(), they can specify which stage is being activated/deactivated.

Enumerator
FetchIdx 
DecodeIdx 
RenameIdx 
IEWIdx 
CommitIdx 
NumStages 

Definition at line 454 of file cpu.hh.

◆ Status

Enumerator
Running 
Idle 
Halted 
Blocked 
SwitchedOut 

Definition at line 101 of file cpu.hh.

Constructor & Destructor Documentation

◆ CPU()

gem5::o3::CPU::CPU ( const BaseO3CPUParams & params)

Constructs a CPU with the given parameters.

Definition at line 72 of file cpu.cc.

References tick().

Member Function Documentation

◆ activateContext()

◆ activateStage()

◆ activateThread()

void gem5::o3::CPU::activateThread ( ThreadID tid)

Add Thread to Active Threads List.

Definition at line 451 of file cpu.cc.

References activeThreads, DPRINTF, and gem5::BaseCPU::switchedOut().

Referenced by activateContext(), and drainResume().

◆ activityThisCycle()

◆ addInst()

CPU::ListIt gem5::o3::CPU::addInst ( const DynInstPtr & inst)

Function to add instruction onto the head of the list of the instructions.

Used when new instructions are fetched.

Definition at line 1133 of file cpu.cc.

References instList.

Referenced by gem5::o3::Fetch::buildInst().

◆ addThreadToExitingList()

void gem5::o3::CPU::addThreadToExitingList ( ThreadID tid)

Insert tid to the list of threads trying to exit.

Definition at line 1378 of file cpu.cc.

References DPRINTF, exitingThreads, gem5::ThreadContext::Halted, gem5::ArmISA::status, and tcBase().

Referenced by gem5::o3::ThreadContext::halt().

◆ cleanUpRemovedInsts()

void gem5::o3::CPU::cleanUpRemovedInsts ( )

Cleans up all instructions on the remove list.

Definition at line 1265 of file cpu.cc.

References DPRINTF, instList, removeInstsThisCycle, and removeList.

Referenced by tick().

◆ commitDrained()

void gem5::o3::CPU::commitDrained ( ThreadID tid)

Commit has reached a safe point to drain a thread.

Commit calls this method to inform the pipeline that it has reached a point where it is not executed microcode and is about to squash uncommitted instructions to fully drain the pipeline.

Definition at line 852 of file cpu.cc.

References gem5::o3::Fetch::drainStall(), and fetch.

Referenced by gem5::o3::Commit::commitInsts().

◆ deactivateStage()

void gem5::o3::CPU::deactivateStage ( const StageIdx idx)
inline

◆ deactivateThread()

void gem5::o3::CPU::deactivateThread ( ThreadID tid)

◆ demapPage()

void gem5::o3::CPU::demapPage ( Addr vaddr,
uint64_t asn )
inline

Definition at line 183 of file cpu.hh.

References gem5::BaseMMU::demapPage(), mmu, and gem5::MipsISA::vaddr.

Referenced by gem5::o3::DynInst::demapPage().

◆ drain()

◆ drainResume()

◆ drainSanityCheck()

void gem5::o3::CPU::drainSanityCheck ( ) const
private

Perform sanity checks after a drain.

This method is called from drain() when it has determined that the CPU is fully drained when gem5 is compiled with the NDEBUG macro undefined. The intention of this method is to do more extensive tests than the isDrained() method to weed out any draining bugs.

Definition at line 804 of file cpu.cc.

References commit, decode, gem5::o3::Commit::drainSanityCheck(), gem5::o3::Decode::drainSanityCheck(), gem5::o3::Fetch::drainSanityCheck(), gem5::o3::IEW::drainSanityCheck(), gem5::o3::Rename::drainSanityCheck(), fetch, iew, isCpuDrained(), and rename.

Referenced by drain().

◆ dumpInsts()

void gem5::o3::CPU::dumpInsts ( )

Debug function to print all instructions on the list.

Definition at line 1289 of file cpu.cc.

References gem5::cprintf(), and instList.

Referenced by gem5::o3::DynInst::DynInst().

◆ exitThreads()

void gem5::o3::CPU::exitThreads ( )

Terminate all threads that are ready to exit.

Definition at line 1423 of file cpu.cc.

References DPRINTF, exitingThreads, haltContext(), gem5::ThreadContext::Halted, gem5::ThreadContext::setStatus(), and tcBase().

◆ getAndIncrementInstSeq()

InstSeqNum gem5::o3::CPU::getAndIncrementInstSeq ( )
inline

Get the current instruction sequence number, and increment it.

Definition at line 284 of file cpu.hh.

References globalSeqNum.

Referenced by gem5::o3::Fetch::buildInst().

◆ getArchReg() [1/2]

RegVal gem5::o3::CPU::getArchReg ( const RegId & reg,
ThreadID tid )

Architectural register accessors.

Looks up in the commit rename table to obtain the true physical index of the architected register first, then accesses that physical register.

Definition at line 1074 of file cpu.cc.

References commitRenameMap, gem5::RegId::flatten(), gem5::o3::PhysRegFile::getReg(), isa, gem5::X86ISA::reg, and regFile.

Referenced by gem5::o3::ThreadContext::getReg(), and gem5::o3::ThreadContext::getReg().

◆ getArchReg() [2/2]

void gem5::o3::CPU::getArchReg ( const RegId & reg,
void * val,
ThreadID tid )

◆ getDataPort()

Port & gem5::o3::CPU::getDataPort ( )
inlineoverridevirtual

Get the dcache port (used to find block size for translations).

Implements gem5::BaseCPU.

Definition at line 571 of file cpu.hh.

References gem5::o3::LSQ::getDataPort(), iew, and gem5::o3::IEW::ldstQueue.

◆ getFreeTid()

ThreadID gem5::o3::CPU::getFreeTid ( )

Gets a free thread id.

Use if thread ids change across system.

Definition at line 1349 of file cpu.cc.

References gem5::InvalidThreadID, gem5::BaseCPU::numThreads, and tids.

◆ getInstPort()

Port & gem5::o3::CPU::getInstPort ( )
inlineoverridevirtual

Used by the fetch unit to get a hold of the instruction port.

Implements gem5::BaseCPU.

Definition at line 564 of file cpu.hh.

References fetch, and gem5::o3::Fetch::getInstPort().

Referenced by gem5::o3::Fetch::takeOverFrom().

◆ getInterrupts()

Fault gem5::o3::CPU::getInterrupts ( )

Returns the Fault for any valid interrupt.

Definition at line 685 of file cpu.cc.

References gem5::BaseCPU::interrupts.

Referenced by gem5::o3::Commit::handleInterrupt(), and gem5::o3::Commit::propagateInterrupt().

◆ getReg() [1/2]

◆ getReg() [2/2]

◆ getWritableArchReg()

void * gem5::o3::CPU::getWritableArchReg ( const RegId & reg,
ThreadID tid )

◆ getWritableReg()

◆ halt()

void gem5::o3::CPU::halt ( )
inline

Halts the CPU.

Definition at line 296 of file cpu.hh.

References panic.

◆ haltContext()

void gem5::o3::CPU::haltContext ( ThreadID tid)
overridevirtual

◆ htmSendAbortSignal()

void gem5::o3::CPU::htmSendAbortSignal ( ThreadID tid,
uint64_t htm_uid,
HtmFailureFaultCause cause )
overridevirtual

This function is used to instruct the memory subsystem that a transaction should be aborted and the speculative state should be thrown away.

This is called in the transaction's very last breath in the core. Afterwards, the core throws away its speculative state and resumes execution at the point the transaction started, i.e. reverses time. When instruction execution resumes, the core expects the memory subsystem to be in a stable, i.e. pre-speculative, state as well.

Reimplemented from gem5::BaseCPU.

Definition at line 1446 of file cpu.cc.

References gem5::BaseCPU::_dataRequestorId, gem5::X86ISA::addr, commit, gem5::Packet::createRead(), gem5::Packet::dataStatic(), flags, gem5::o3::LSQ::getDataPort(), gem5::Request::HTM_ABORT, iew, gem5::o3::IEW::ldstQueue, panic, gem5::Request::PHYSICAL, gem5::o3::Commit::resetHtmStartsStops(), gem5::o3::LSQ::resetHtmStartsStops(), gem5::RequestPort::sendTimingReq(), gem5::Packet::setHtmTransactional(), gem5::Request::STRICT_ORDER, gem5::BaseCPU::taskId(), and thread.

Referenced by gem5::o3::ThreadContext::htmAbortTransaction().

◆ init()

void gem5::o3::CPU::init ( )
overridevirtual

Initialize the CPU.

Reimplemented from gem5::BaseCPU.

Definition at line 421 of file cpu.cc.

References commit, gem5::BaseCPU::init(), gem5::BaseCPU::numThreads, gem5::o3::Commit::setThreads(), and thread.

◆ insertThread()

◆ instDone()

void gem5::o3::CPU::instDone ( ThreadID tid,
const DynInstPtr & inst )

Function to tell the CPU that an instruction has completed.

Definition at line 1141 of file cpu.cc.

References gem5::BaseCPU::commitStats, gem5::BaseCPU::probeInstCommit(), and thread.

Referenced by gem5::o3::Commit::updateComInstStats().

◆ isCpuDrained()

bool gem5::o3::CPU::isCpuDrained ( ) const
private

◆ isDraining()

bool gem5::o3::CPU::isDraining ( ) const
inline

◆ isThreadExiting()

bool gem5::o3::CPU::isThreadExiting ( ThreadID tid) const

Is the thread trying to exit?

Definition at line 1397 of file cpu.cc.

References exitingThreads.

Referenced by gem5::o3::Commit::commit(), gem5::o3::ROB::doSquash(), and gem5::o3::Commit::getCommittingThread().

◆ numActiveThreads()

int gem5::o3::CPU::numActiveThreads ( )
inline

Returns the Number of Active Threads in the CPU.

Definition at line 200 of file cpu.hh.

References activeThreads.

◆ pcState() [1/2]

void gem5::o3::CPU::pcState ( const PCStateBase & new_pc_state,
ThreadID tid )

◆ pcState() [2/2]

const PCStateBase & gem5::o3::CPU::pcState ( ThreadID tid)

Reads the commit PC state of a specific thread.

Definition at line 1114 of file cpu.cc.

References commit, and gem5::o3::Commit::pcState().

◆ processInterrupts()

void gem5::o3::CPU::processInterrupts ( const Fault & interrupt)

Processes any an interrupt fault.

Definition at line 692 of file cpu.cc.

References DPRINTF, gem5::BaseCPU::interrupts, gem5::NoFault, and trap().

Referenced by gem5::o3::Commit::handleInterrupt().

◆ pushRequest()

Fault gem5::o3::CPU::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>() )
inline

◆ readMiscReg()

RegVal gem5::o3::CPU::readMiscReg ( int misc_reg,
ThreadID tid )

Reads a misc.

register, including any side effects the read might have as defined by the architecture.

Definition at line 934 of file cpu.cc.

References gem5::BaseCPU::executeStats, and isa.

Referenced by gem5::o3::DynInst::readMiscReg(), gem5::o3::ThreadContext::readMiscReg(), and gem5::o3::DynInst::readMiscRegOperand().

◆ readMiscRegNoEffect()

RegVal gem5::o3::CPU::readMiscRegNoEffect ( int misc_reg,
ThreadID tid ) const

Register accessors.

Index refers to the physical register index. Reads a miscellaneous register.

Definition at line 928 of file cpu.cc.

References isa.

Referenced by gem5::o3::ThreadContext::readMiscRegNoEffect().

◆ regProbePoints()

◆ removeFrontInst()

void gem5::o3::CPU::removeFrontInst ( const DynInstPtr & inst)

Remove an instruction from the front end of the list.

There's no restriction on location of the instruction.

Definition at line 1160 of file cpu.cc.

References DPRINTF, removeInstsThisCycle, and removeList.

Referenced by gem5::o3::ROB::retireHead().

◆ removeInstsNotInROB()

void gem5::o3::CPU::removeInstsNotInROB ( ThreadID tid)

Remove all instructions that are not currently in the ROB.

There's also an option to not squash delay slot instructions.

Definition at line 1173 of file cpu.cc.

References DPRINTF, instList, gem5::o3::ROB::isEmpty(), gem5::o3::ROB::readTailInst(), removeInstsThisCycle, rob, and squashInstIt().

Referenced by gem5::o3::Fetch::squash().

◆ removeInstsUntil()

void gem5::o3::CPU::removeInstsUntil ( const InstSeqNum & seq_num,
ThreadID tid )

Remove all instructions younger than the given sequence number.

Definition at line 1217 of file cpu.cc.

References DPRINTF, instList, removeInstsThisCycle, and squashInstIt().

Referenced by gem5::o3::Decode::squash(), and gem5::o3::Fetch::squashFromDecode().

◆ removeThread()

◆ scheduleThreadExitEvent()

void gem5::o3::CPU::scheduleThreadExitEvent ( ThreadID tid)

If a thread is trying to exit and its corresponding trap event has been completed, schedule an event to terminate the thread.

Definition at line 1403 of file cpu.cc.

References exitingThreads, gem5::Clocked::nextCycle(), gem5::EventManager::schedule(), gem5::Event::scheduled(), and threadExitEvent.

Referenced by gem5::o3::Commit::commit().

◆ scheduleTickEvent()

void gem5::o3::CPU::scheduleTickEvent ( Cycles delay)
inlineprivate

Schedule tick event, regardless of its current state.

Definition at line 129 of file cpu.hh.

References gem5::Clocked::clockEdge(), gem5::EventManager::reschedule(), gem5::EventManager::schedule(), gem5::Event::scheduled(), gem5::Event::squashed(), and tickEvent.

Referenced by activateContext().

◆ serializeThread()

void gem5::o3::CPU::serializeThread ( CheckpointOut & cp,
ThreadID tid ) const
overridevirtual

Serialize a single thread.

Parameters
cpThe stream to serialize to.
tidID of the current thread.

Reimplemented from gem5::BaseCPU.

Definition at line 715 of file cpu.cc.

References thread.

◆ setArchReg() [1/2]

void gem5::o3::CPU::setArchReg ( const RegId & reg,
const void * val,
ThreadID tid )

◆ setArchReg() [2/2]

void gem5::o3::CPU::setArchReg ( const RegId & reg,
RegVal val,
ThreadID tid )

◆ setMiscReg()

void gem5::o3::CPU::setMiscReg ( int misc_reg,
RegVal val,
ThreadID tid )

Sets a misc.

register, including any side effects the write might have as defined by the architecture.

Definition at line 947 of file cpu.cc.

References gem5::BaseCPU::executeStats, isa, and gem5::X86ISA::val.

Referenced by gem5::o3::ThreadContext::setMiscReg(), and gem5::o3::DynInst::updateMiscRegs().

◆ setMiscRegNoEffect()

void gem5::o3::CPU::setMiscRegNoEffect ( int misc_reg,
RegVal val,
ThreadID tid )

Sets a miscellaneous register.

Definition at line 941 of file cpu.cc.

References isa, and gem5::X86ISA::val.

Referenced by gem5::o3::ThreadContext::setMiscRegNoEffect().

◆ setReg() [1/2]

◆ setReg() [2/2]

◆ squashFromTC()

void gem5::o3::CPU::squashFromTC ( ThreadID tid)

Initiates a squash of all in-flight instructions for a given thread.

The source of the squash is an external update of state through the TC.

Definition at line 1126 of file cpu.cc.

References commit, gem5::o3::Commit::generateTCEvent(), and thread.

Referenced by gem5::o3::ThreadContext::conditionalSquash().

◆ squashInstIt()

void gem5::o3::CPU::squashInstIt ( const ListIt & instIt,
ThreadID tid )

Removes the instruction pointed to by the iterator.

Definition at line 1245 of file cpu.cc.

References DPRINTF, and removeList.

Referenced by removeInstsNotInROB(), and removeInstsUntil().

◆ startup()

void gem5::o3::CPU::startup ( )
overridevirtual

startup() is the final initialization call before simulation.

All state is initialized (including unserialized state, if any, such as the curTick() value), so this is the appropriate place to schedule initial event(s) for objects that need them.

Reimplemented from gem5::BaseCPU.

Definition at line 439 of file cpu.cc.

References commit, decode, fetch, iew, rename, gem5::BaseCPU::startup(), gem5::o3::Commit::startupStage(), gem5::o3::Decode::startupStage(), gem5::o3::Fetch::startupStage(), gem5::o3::IEW::startupStage(), and gem5::o3::Rename::startupStage().

◆ suspendContext()

void gem5::o3::CPU::suspendContext ( ThreadID tid)
overridevirtual

◆ switchOut()

void gem5::o3::CPU::switchOut ( )
overridevirtual

◆ takeOverFrom()

◆ tcBase()

◆ tick()

◆ totalInsts()

Counter gem5::o3::CPU::totalInsts ( ) const
overridevirtual

Count the Total Instructions Committed in the CPU.

Implements gem5::BaseCPU.

Definition at line 491 of file cpu.cc.

References gem5::ArmISA::i, thread, and gem5::statistics::total.

◆ totalOps()

Counter gem5::o3::CPU::totalOps ( ) const
overridevirtual

Count the Total Ops (including micro ops) committed in the CPU.

Implements gem5::BaseCPU.

Definition at line 503 of file cpu.cc.

References gem5::ArmISA::i, thread, and gem5::statistics::total.

◆ trap()

void gem5::o3::CPU::trap ( const Fault & fault,
ThreadID tid,
const StaticInstPtr & inst )

Traps to handle given fault.

Definition at line 708 of file cpu.cc.

References gem5::BaseCPU::threadContexts.

Referenced by gem5::o3::Commit::commitHead(), processInterrupts(), and gem5::o3::DynInst::trap().

◆ tryDrain()

bool gem5::o3::CPU::tryDrain ( )
private

Check if the pipeline has drained and signal drain done.

This method checks if a drain has been requested and if the CPU has drained successfully (i.e., there are no instructions in the pipeline). If the CPU has drained, it deschedules the tick event and signals the drain manager.

Returns
False if a drain hasn't been requested or the CPU hasn't drained, true otherwise.

Definition at line 789 of file cpu.cc.

References gem5::EventManager::deschedule(), DPRINTF, gem5::Draining, gem5::Drainable::drainState(), isCpuDrained(), gem5::Event::scheduled(), gem5::Drainable::signalDrainDone(), and tickEvent.

Referenced by tick().

◆ unscheduleTickEvent()

void gem5::o3::CPU::unscheduleTickEvent ( )
inlineprivate

Unschedule tick event, regardless of its current state.

Definition at line 139 of file cpu.hh.

References gem5::Event::scheduled(), gem5::Event::squash(), and tickEvent.

Referenced by haltContext(), and suspendContext().

◆ unserializeThread()

void gem5::o3::CPU::unserializeThread ( CheckpointIn & cp,
ThreadID tid )
overridevirtual

Unserialize one thread.

Parameters
cpThe checkpoint use.
tidID of the current thread.

Reimplemented from gem5::BaseCPU.

Definition at line 721 of file cpu.cc.

References thread.

◆ updateThreadPriority()

void gem5::o3::CPU::updateThreadPriority ( )

Update The Order In Which We Process Threads.

Definition at line 1362 of file cpu.cc.

References activeThreads.

Referenced by tick().

◆ verifyMemoryMode()

void gem5::o3::CPU::verifyMemoryMode ( ) const
overridevirtual

Verify that the system is in a memory mode supported by the CPU.

Implementations are expected to query the system for the current memory mode and ensure that it is what the CPU model expects. If the check fails, the implementation should terminate the simulation using fatal().

Reimplemented from gem5::BaseCPU.

Definition at line 919 of file cpu.cc.

References fatal, gem5::System::isTimingMode(), and system.

Referenced by drainResume().

◆ wakeCPU()

◆ wakeup()

void gem5::o3::CPU::wakeup ( ThreadID tid)
overridevirtual

Friends And Related Symbol Documentation

◆ ThreadContext

friend class ThreadContext
friend

Definition at line 98 of file cpu.hh.

Member Data Documentation

◆ _status

Status gem5::o3::CPU::_status

Overall CPU status.

Definition at line 117 of file cpu.hh.

Referenced by activateContext(), drainResume(), haltContext(), suspendContext(), switchOut(), takeOverFrom(), and tick().

◆ activeThreads

std::list<ThreadID> gem5::o3::CPU::activeThreads
protected

Active Threads List.

Definition at line 435 of file cpu.hh.

Referenced by activateThread(), deactivateThread(), haltContext(), numActiveThreads(), suspendContext(), and updateThreadPriority().

◆ activityRec

ActivityRecorder gem5::o3::CPU::activityRec
private

The activity recorder; used to tell if the CPU has any activity remaining or if it can go to idle and deschedule itself.

Definition at line 484 of file cpu.hh.

Referenced by activateContext(), activateStage(), activityThisCycle(), deactivateStage(), drain(), switchOut(), tick(), and wakeCPU().

◆ checker

gem5::Checker<DynInstPtr>* gem5::o3::CPU::checker

Pointer to the checker, which can dynamically verify instruction results at run time.

This can be set to NULL if it is not being used.

Definition at line 527 of file cpu.hh.

Referenced by gem5::o3::Commit::commitHead(), gem5::o3::Commit::commitInsts(), gem5::o3::DynInst::completeAcc(), gem5::o3::LSQUnit::completeStore(), gem5::o3::Commit::handleInterrupt(), gem5::o3::LSQ::pushRequest(), gem5::o3::IEW::startupStage(), gem5::o3::LSQUnit::storePostSend(), and switchOut().

◆ commit

◆ commitRenameMap

PerThreadUnifiedRenameMap gem5::o3::CPU::commitRenameMap
protected

The commit rename map.

Definition at line 429 of file cpu.hh.

Referenced by getArchReg(), getArchReg(), getWritableArchReg(), setArchReg(), and setArchReg().

◆ cpuStats

gem5::o3::CPU::CPUStats gem5::o3::CPU::cpuStats

Referenced by activateContext(), tick(), and wakeCPU().

◆ cpuWaitList

std::list<int> gem5::o3::CPU::cpuWaitList

Threads Scheduled to Enter CPU.

Definition at line 536 of file cpu.hh.

◆ decode

Decode gem5::o3::CPU::decode
protected

The decode stage.

Definition at line 408 of file cpu.hh.

Referenced by drainSanityCheck(), isCpuDrained(), removeThread(), startup(), takeOverFrom(), and tick().

◆ decodeQueue

TimeBuffer<DecodeStruct> gem5::o3::CPU::decodeQueue

The decode stage's instruction queue.

Definition at line 471 of file cpu.hh.

Referenced by drain(), removeThread(), and tick().

◆ exitingThreads

std::unordered_map<ThreadID, bool> gem5::o3::CPU::exitingThreads
protected

This is a list of threads that are trying to exit.

Each thread id is mapped to a boolean value denoting whether the thread is ready to exit.

Definition at line 442 of file cpu.hh.

Referenced by addThreadToExitingList(), exitThreads(), isThreadExiting(), and scheduleThreadExitEvent().

◆ fetch

◆ fetchQueue

TimeBuffer<FetchStruct> gem5::o3::CPU::fetchQueue

The fetch stage's instruction queue.

Definition at line 468 of file cpu.hh.

Referenced by drain(), removeThread(), and tick().

◆ freeList

UnifiedFreeList gem5::o3::CPU::freeList
protected

The free list.

Definition at line 423 of file cpu.hh.

Referenced by insertThread().

◆ globalSeqNum

InstSeqNum gem5::o3::CPU::globalSeqNum

The global sequence number counter.

Definition at line 521 of file cpu.hh.

Referenced by getAndIncrementInstSeq(), and takeOverFrom().

◆ iew

IEW gem5::o3::CPU::iew
protected

The issue/execute/writeback stages.

Definition at line 414 of file cpu.hh.

Referenced by drainSanityCheck(), getDataPort(), htmSendAbortSignal(), isCpuDrained(), pushRequest(), regProbePoints(), removeThread(), startup(), takeOverFrom(), and tick().

◆ iewQueue

TimeBuffer<IEWStruct> gem5::o3::CPU::iewQueue

The IEW stage's instruction queue.

Definition at line 477 of file cpu.hh.

Referenced by drain(), removeThread(), and tick().

◆ instcount

int gem5::o3::CPU::instcount

Count of total number of dynamic instructions in flight.

Definition at line 380 of file cpu.hh.

Referenced by gem5::o3::DynInst::DynInst(), and gem5::o3::DynInst::~DynInst().

◆ instList

std::list<DynInstPtr> gem5::o3::CPU::instList

List of all the instructions in flight.

Definition at line 384 of file cpu.hh.

Referenced by addInst(), cleanUpRemovedInsts(), dumpInsts(), gem5::o3::Commit::handleInterrupt(), isCpuDrained(), removeInstsNotInROB(), and removeInstsUntil().

◆ isa

◆ lastActivatedCycle

Tick gem5::o3::CPU::lastActivatedCycle

The cycle that the CPU was last activated by a new thread.

Definition at line 542 of file cpu.hh.

Referenced by activateContext().

◆ lastRunningCycle

Cycles gem5::o3::CPU::lastRunningCycle

The cycle that the CPU was last running, used for statistics.

Definition at line 539 of file cpu.hh.

Referenced by activateContext(), haltContext(), suspendContext(), takeOverFrom(), tick(), and wakeCPU().

◆ mmu

◆ ppDataAccessComplete

ProbePointArg<std::pair<DynInstPtr, PacketPtr> >* gem5::o3::CPU::ppDataAccessComplete

Definition at line 177 of file cpu.hh.

Referenced by gem5::o3::LSQUnit::completeDataAccess(), and regProbePoints().

◆ ppInstAccessComplete

ProbePointArg<PacketPtr>* gem5::o3::CPU::ppInstAccessComplete

Definition at line 176 of file cpu.hh.

Referenced by gem5::o3::Fetch::processCacheCompletion(), and regProbePoints().

◆ regFile

PhysRegFile gem5::o3::CPU::regFile
protected

The register file.

Definition at line 420 of file cpu.hh.

Referenced by getArchReg(), getArchReg(), getReg(), getReg(), getWritableArchReg(), getWritableReg(), setArchReg(), setArchReg(), setReg(), and setReg().

◆ removeInstsThisCycle

bool gem5::o3::CPU::removeInstsThisCycle

Records if instructions need to be removed this cycle due to being retired or squashed.

Definition at line 401 of file cpu.hh.

Referenced by cleanUpRemovedInsts(), removeFrontInst(), removeInstsNotInROB(), removeInstsUntil(), and tick().

◆ removeList

std::queue<ListIt> gem5::o3::CPU::removeList

List of all the instructions that will be removed at the end of this cycle.

Definition at line 389 of file cpu.hh.

Referenced by cleanUpRemovedInsts(), isCpuDrained(), removeFrontInst(), and squashInstIt().

◆ rename

Rename gem5::o3::CPU::rename
protected

The dispatch stage.

Definition at line 411 of file cpu.hh.

Referenced by drainSanityCheck(), isCpuDrained(), regProbePoints(), removeThread(), startup(), takeOverFrom(), and tick().

◆ renameMap

PerThreadUnifiedRenameMap gem5::o3::CPU::renameMap
protected

The rename map.

Definition at line 426 of file cpu.hh.

Referenced by insertThread().

◆ renameQueue

TimeBuffer<RenameStruct> gem5::o3::CPU::renameQueue

The rename stage's instruction queue.

Definition at line 474 of file cpu.hh.

Referenced by drain(), removeThread(), and tick().

◆ rob

ROB gem5::o3::CPU::rob
protected

The re-order buffer.

Definition at line 432 of file cpu.hh.

Referenced by removeInstsNotInROB().

◆ scoreboard

Scoreboard gem5::o3::CPU::scoreboard
protected

Integer Register Scoreboard.

Definition at line 445 of file cpu.hh.

Referenced by insertThread().

◆ system

System* gem5::o3::CPU::system

Pointer to the system.

Definition at line 530 of file cpu.hh.

Referenced by gem5::o3::Fetch::finishTranslation(), gem5::o3::ThreadContext::getSystemPtr(), insertThread(), and verifyMemoryMode().

◆ thread

◆ threadExitEvent

EventFunctionWrapper gem5::o3::CPU::threadExitEvent
private

The exit event used for terminating all ready-to-exit threads.

Definition at line 125 of file cpu.hh.

Referenced by scheduleThreadExitEvent().

◆ threadMap

std::map<ThreadID, unsigned> gem5::o3::CPU::threadMap

Mapping for system thread id to cpu id.

Definition at line 545 of file cpu.hh.

◆ tickEvent

EventFunctionWrapper gem5::o3::CPU::tickEvent
private

The tick event used for scheduling CPU ticks.

Definition at line 122 of file cpu.hh.

Referenced by drain(), drainResume(), haltContext(), scheduleTickEvent(), takeOverFrom(), tick(), tryDrain(), unscheduleTickEvent(), and wakeCPU().

◆ tids

std::vector<ThreadID> gem5::o3::CPU::tids

Available thread ids in the cpu.

Definition at line 548 of file cpu.hh.

Referenced by getFreeTid().

◆ timeBuffer

TimeBuffer<TimeStruct> gem5::o3::CPU::timeBuffer

The main time buffer to do backwards communication.

Definition at line 465 of file cpu.hh.

Referenced by drain(), removeThread(), and tick().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:20 for gem5 by doxygen 1.11.0