Go to the documentation of this file.
42 #ifndef __CPU_O3_THREAD_CONTEXT_HH__
43 #define __CPU_O3_THREAD_CONTEXT_HH__
45 #include "config/the_isa.hh"
171 void halt()
override;
384 const ElemIndex& elemIndex)
const override;
TheISA::Decoder * getDecoderPtr() override
bool remove(PCEvent *e) override
const TheISA::VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIndex) const override
BaseCPU * getCpuPtr() override
Returns a pointer to this CPU.
void initMemProxies(ThreadContext *tc)
Initialise the physical and virtual port proxies and tie them to the data port of the CPU.
@ CCRegClass
Condition-code register.
ThreadState * thread
Pointer to the thread state that this TC corrseponds to.
PortProxy & getVirtProxy() override
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
RegVal readCCReg(RegIndex reg_idx) const override
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
const TheISA::VecRegContainer & readVecReg(const RegId &id) const override
void setCCReg(RegIndex reg_idx, RegVal val) override
const TheISA::VecElem & readVecElem(const RegId ®) const 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
VecPredReg::Container VecPredRegContainer
TheISA::VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
Read vector register operand for modification, flat indexing.
TheISA::VecPredRegContainer & getWritableVecPredReg(const RegId &id) override
int threadId() const override
Returns this thread's ID number.
void setVecPredReg(const RegId ®, const TheISA::VecPredRegContainer &val) override
@ FloatRegClass
Floating-point register.
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 setVecElem(const RegId ®, const TheISA::VecElem &val) override
bool schedule(PCEvent *event) override
void setCCRegFlat(RegIndex idx, RegVal val) override
void initMemProxies(gem5::ThreadContext *tc) override
Initialise the physical and virtual port proxies and tie them to the data port of the CPU.
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
const TheISA::VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const override
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
void setFloatRegFlat(RegIndex idx, RegVal val) override
RegVal readFloatRegFlat(RegIndex idx) const override
Derived ThreadContext class for use with the O3CPU.
unsigned readStCondFailures() const override
Returns the number of consecutive store conditional failures.
void pcStateNoRecord(const TheISA::PCState &val) override
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.
RegId flattenRegId(const RegId ®Id) const override
RegVal readMiscReg(RegIndex misc_reg) override
Reads a misc.
Fetch fetch
The fetch stage.
void deschedule(Event *event)
Deschedule the specified event.
unsigned storeCondFailures
GenericISA::DelaySlotPCState< 4 > PCState
void setVecRegFlat(RegIndex idx, const TheISA::VecRegContainer &val) override
uint64_t Tick
Tick count type.
TheISA::VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
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.
RegVal readIntReg(RegIndex reg_idx) const override
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 setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const TheISA::VecElem &val) override
This object is a proxy for a port or other object which implements the functional response protocol,...
TheISA::PCState pcState() const override
Reads this thread's PC state.
void setThreadId(ThreadID id)
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
gem5::VecRegContainer< NumVecElemPerVecReg *sizeof(VecElem)> VecRegContainer
void setVecReg(const RegId ®, const TheISA::VecRegContainer &val) override
ThreadID threadId() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const TheISA::VecPredRegContainer & readVecPredReg(const RegId &id) const override
EventQueue comInstEventQueue
An instruction-based event queue.
uint16_t ElemIndex
Logical vector register elem index type.
Addr instAddr(ThreadID tid)
Reads the commit PC of a specific thread.
Tick getCurrentInstCount() override
Tick getCurTick() const
While curTick() is useful for any object assigned to this event queue, if an object that is assigned ...
const TheISA::VecRegContainer & readVecRegFlat(RegIndex idx) const override
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
RegVal readCCRegFlat(RegIndex idx) const override
void copyArchRegs(gem5::ThreadContext *tc) override
Copies the architectural registers from another TC into this TC.
BaseISA * getIsaPtr() override
Addr instAddr() const override
Reads this thread's PC.
RegVal readFloatReg(RegIndex reg_idx) const override
Tick readLastSuspend() override
Reads the last tick that this thread was suspended on.
int cpuId() const
Reads this CPU's ID.
Addr nextInstAddr() const override
Reads this thread's next PC.
MicroPC microPC(ThreadID tid)
Reads the commit micro PC of a specific thread.
void setProcessPtr(Process *p) override
TheISA::VecRegContainer & getWritableVecReg(const RegId &id) override
Read vector register operand for modification, hierarchical indexing.
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.
void descheduleInstCountEvent(Event *event) override
MicroPC microPC() const override
Reads this thread's next PC.
CPU * cpu
Pointer to the CPU.
void setIntRegFlat(RegIndex idx, RegVal val) override
void setIntReg(RegIndex reg_idx, RegVal val) override
Sets an integer register to a value.
void setFloatReg(RegIndex reg_idx, RegVal val) override
void pcState(const TheISA::PCState &newPCState, ThreadID tid)
Sets the commit PC state of a specific thread.
@ IntRegClass
Integer register.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void setVecPredRegFlat(RegIndex idx, const TheISA::VecPredRegContainer &val) override
RegVal readReg(RegIndex reg_idx)
Reads an integer register.
Addr nextInstAddr(ThreadID tid)
Reads the next PC of a specific thread.
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.
std::vector< TheISA::ISA * > isa
RegVal readIntRegFlat(RegIndex idx) const override
Flat register interfaces.
TheISA::Decoder * decoder[MaxThreads]
The decoder.
Register ID: describe an architectural register with its class and index.
ContextID contextId() const override
Process * getProcessPtr()
Generated on Tue Sep 21 2021 12:24:24 for gem5 by doxygen 1.8.17