Go to the documentation of this file.
42 #ifndef __CPU_O3_THREAD_CONTEXT_HH__
43 #define __CPU_O3_THREAD_CONTEXT_HH__
162 void halt()
override;
bool remove(PCEvent *e) override
BaseCPU * getCpuPtr() override
Returns a pointer to this CPU.
ThreadState * thread
Pointer to the thread state that this TC corrseponds to.
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
void activate() override
Set the status to Active.
void takeOverFrom(gem5::ThreadContext *old_context) override
Takes over execution of a thread from another CPU.
uint32_t socketId() const override
Reads this CPU's Socket ID.
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
BaseISA * getIsaPtr() const override
int threadId() const override
Returns this thread's ID number.
void setStatus(Status new_status) override
Sets this thread's status.
PCEventQueue pcEventQueue
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Reads a miscellaneous register.
bool remove(PCEvent *event) override
void * getWritableReg(const RegId ®) override
bool schedule(PCEvent *event) override
Process * getProcessPtr() override
Returns a pointer to this thread's process.
CheckerCPU * getCheckerCpuPtr() override
uint32_t socketId() const
Reads this CPU's Socket ID.
System * getSystemPtr() override
Returns a pointer to the system.
bool schedule(PCEvent *e) override
void setReg(const RegId ®, RegVal val) override
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
InstDecoder * decoder[MaxThreads]
The decoder.
InstDecoder * getDecoderPtr() override
Derived ThreadContext class for use with the O3CPU.
unsigned readStCondFailures() const override
Returns the number of consecutive store conditional failures.
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
void suspend() override
Set the status to Suspended.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
RegVal readMiscReg(RegIndex misc_reg) override
Reads a misc.
Fetch fetch
The fetch stage.
void deschedule(Event *event)
Deschedule the specified event.
unsigned storeCondFailures
uint64_t Tick
Tick count type.
void pcState(const PCStateBase &new_pc_state, ThreadID tid)
Sets the commit PC state of a specific thread.
BaseMMU * getMMUPtr() override
Returns a pointer to the MMU.
void squashFromTC(ThreadID tid)
Initiates a squash of all in-flight instructions for a given thread.
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Sets a misc.
RegVal readMiscRegNoEffect(int misc_reg, ThreadID tid) const
Register accessors.
int cpuId() const override
Reads this CPU's ID.
void setThreadId(ThreadID id)
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
ThreadID threadId() const
RegVal getReg(const RegId ®) const override
EventQueue comInstEventQueue
An instruction-based event queue.
Tick getCurrentInstCount() override
Tick getCurTick() const
While curTick() is useful for any object assigned to this event queue, if an object that is assigned ...
void setStatus(Status new_status)
Sets the status of this thread.
ContextID contextId() const
void setStCondFailures(unsigned sc_failures) override
Sets the number of consecutive store conditional failures.
void setContextId(ContextID id)
void setContextId(ContextID id) override
System * system
Pointer to the system.
Status status() const override
Returns this thread's status.
Class that has various thread state, such as the status, the current instruction being processed,...
void halt() override
Set the status to Halted.
void clearArchRegs() override
Resets all architectural registers to 0.
void setProcessPtr(Process *p)
void scheduleInstCountEvent(Event *event, Tick count) override
void copyArchRegs(gem5::ThreadContext *tc) override
Copies the architectural registers from another TC into this TC.
Tick readLastSuspend() override
Reads the last tick that this thread was suspended on.
int cpuId() const
Reads this CPU's ID.
void setProcessPtr(Process *p) override
Status status() const
Returns the status of this thread.
int ContextID
Globally unique thread context ID.
RegVal readMiscReg(int misc_reg, ThreadID tid)
Reads a misc.
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
const PCStateBase & pcState() const override
Reads this thread's PC state.
void descheduleInstCountEvent(Event *event) override
CPU * cpu
Pointer to the CPU.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void pcStateNoRecord(const PCStateBase &val) override
std::vector< BaseISA * > isa
Tick readLastActivate() override
Reads the last tick that this thread was activated on.
void setThreadId(int id) override
bool trapPending
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated with...
void setMiscReg(RegIndex misc_reg, RegVal val) override
Sets a misc.
Register ID: describe an architectural register with its class and index.
ContextID contextId() const override
Process * getProcessPtr()
Generated on Sun Jul 30 2023 01:56:47 for gem5 by doxygen 1.8.17