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"
66 typedef typename Impl::O3CPU
O3CPU;
74 return thread->pcEventQueue.schedule(
e);
79 return thread->pcEventQueue.remove(
e);
95 return thread->comInstEventQueue.getCurTick();
115 return cpu->fetch.decoder[
thread->threadId()];
122 int cpuId()
const override {
return cpu->cpuId(); }
150 thread->initMemProxies(tc);
160 thread->setStatus(new_status);
170 void halt()
override;
363 return cpu->instAddr(
thread->threadId());
370 return cpu->nextInstAddr(
thread->threadId());
384 return cpu->readMiscRegNoEffect(misc_reg,
thread->threadId());
392 return cpu->readMiscReg(misc_reg,
thread->threadId());
409 return thread->storeCondFailures;
416 thread->storeCondFailures = sc_failures;
446 template <
typename VE>
450 return cpu->template readArchVecLane<VE>(idx, lId,
454 template <
typename LD>
458 cpu->template setArchVecLane(idx, lId,
thread->threadId(),
val);
462 const ElemIndex& elemIndex)
const override;
Addr nextInstAddr() const override
Reads this thread's next PC.
BaseCPU * getCpuPtr() override
Returns a pointer to this CPU.
void setStCondFailures(unsigned sc_failures) override
Sets the number of consecutive store conditional failures.
void setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt) override
void pcStateNoRecord(const TheISA::PCState &val) override
System * getSystemPtr() override
Returns a pointer to the system.
MicroPC microPC() const override
Reads this thread's next PC.
int cpuId() const override
Reads this CPU's ID.
TheISA::VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
void setVecReg(const RegId ®, const TheISA::VecRegContainer &val) override
VecReg::Container VecRegContainer
Status status() const override
Returns this thread's status.
RegVal readCCReg(RegIndex reg_idx) const override
unsigned readStCondFailures() const override
Returns the number of consecutive store conditional failures.
BaseMMU * getMMUPtr() override
Returns a pointer to the MMU.
Addr instAddr() const override
Reads this thread's PC.
void setIntReg(RegIndex reg_idx, RegVal val) override
Sets an integer register to a value.
void setVecLane(const RegId ®, const LaneData< LaneSize::FourByte > &val) override
int ContextID
Globally unique thread context ID.
ContextID contextId() const override
RegVal readReg(RegIndex reg_idx)
Reads an integer register.
uint64_t Tick
Tick count type.
VecPredReg::Container VecPredRegContainer
void setStatus(Status new_status) override
Sets this thread's status.
void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const TheISA::VecElem &val) override
RegVal readFloatRegFlat(RegIndex idx) const override
void setCCRegFlat(RegIndex idx, RegVal val) override
const TheISA::VecPredRegContainer & readVecPredReg(const RegId &id) const override
RegVal readFloatReg(RegIndex reg_idx) const override
ConstVecLane64 readVec64BitLaneReg(const RegId &id) const override
Reads source vector 64bit operand.
void setVecRegFlat(RegIndex idx, const TheISA::VecRegContainer &val) override
void scheduleInstCountEvent(Event *event, Tick count) override
void takeOverFrom(ThreadContext *old_context) override
Takes over execution of a thread from another CPU.
Register ID: describe an architectural register with its class and index.
void halt() override
Set the status to Halted.
CheckerCPU * getCheckerCpuPtr() override
void setVecLaneFlat(int idx, int lId, const LD &val)
TheISA::Decoder * getDecoderPtr() override
int64_t Counter
Statistics counter type.
TheISA::VecRegContainer & getWritableVecReg(const RegId &id) override
Read vector register operand for modification, hierarchical indexing.
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Sets a misc.
void setVecPredRegFlat(RegIndex idx, const TheISA::VecPredRegContainer &val) override
@ FloatRegClass
Floating-point register.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Process * getProcessPtr() override
Returns a pointer to this thread's process.
Vector Lane abstraction Another view of a container.
ConstVecLane16 readVec16BitLaneReg(const RegId &id) const override
Reads source vector 16bit operand.
void activate() override
Set the status to Active.
RegVal readIntReg(RegIndex reg_idx) const override
Tick readLastActivate() override
Reads the last tick that this thread was activated on.
void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause) override
ConstVecLane32 readVec32BitLaneReg(const RegId &id) const override
Reads source vector 32bit operand.
RegId flattenRegId(const RegId ®Id) const override
void setContextId(ContextID id) override
Class that has various thread state, such as the status, the current instruction being processed,...
Counter readFuncExeInst() const override
Reads the funcExeInst counter.
void clearArchRegs() override
Resets all architectural registers to 0.
TheISA::VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
Read vector register operand for modification, flat indexing.
const TheISA::VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIndex) const override
TheISA::VecPredRegContainer & getWritableVecPredReg(const RegId &id) override
Tick getCurrentInstCount() override
int threadId() const override
Returns this thread's ID number.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
const TheISA::VecRegContainer & readVecReg(const RegId &id) const override
RegVal readCCRegFlat(RegIndex idx) const override
void setThreadId(int id) override
const TheISA::VecRegContainer & readVecRegFlat(RegIndex idx) const override
void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
VecLaneT< VE, true > readVecLaneFlat(RegIndex idx, int lId) const
@ IntRegClass
Integer register.
void setIntRegFlat(RegIndex idx, RegVal val) override
PortProxy & getPhysProxy() override
@ CCRegClass
Condition-code register.
BaseHTMCheckpointPtr & getHtmCheckpointPtr() override
void descheduleInstCountEvent(Event *event) override
RegVal readIntRegFlat(RegIndex idx) const override
Tick readLastSuspend() override
Reads the last tick that this thread was suspended on.
const TheISA::VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const override
ConstVecLane8 readVec8BitLaneReg(const RegId &id) const override
Vector Register Lane Interfaces.
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
Reads a miscellaneous register.
This object is a proxy for a port or other object which implements the functional response protocol,...
const TheISA::VecElem & readVecElem(const RegId ®) const override
BaseISA * getIsaPtr() override
GenericISA::DelaySlotPCState< MachInst > PCState
void setVecPredReg(const RegId ®, const TheISA::VecPredRegContainer &val) override
PortProxy & getVirtProxy() override
uint16_t ElemIndex
Logical vector register elem index type.
void setVecLane(const RegId ®, const LaneData< LaneSize::TwoByte > &val) override
O3ThreadState< Impl > * thread
Pointer to the thread state that this TC corrseponds to.
void suspend() override
Set the status to Suspended.
bool schedule(PCEvent *e) override
void setFloatReg(RegIndex reg_idx, RegVal val) override
void setMiscReg(RegIndex misc_reg, RegVal val) override
Sets a misc.
bool remove(PCEvent *e) override
void setProcessPtr(Process *p) override
void setFloatRegFlat(RegIndex idx, RegVal val) override
void copyArchRegs(ThreadContext *tc) override
Copies the architectural registers from another TC into this TC.
void setVecElem(const RegId ®, const TheISA::VecElem &val) override
void initMemProxies(ThreadContext *tc) override
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
TheISA::PCState pcState() const override
Reads this thread's PC state.
O3CPU * cpu
Pointer to the CPU.
RegVal readMiscReg(RegIndex misc_reg) override
Reads a misc.
void setCCReg(RegIndex reg_idx, RegVal val) override
uint32_t socketId() const override
Reads this CPU's Socket ID.
void setVecLane(const RegId ®, const LaneData< LaneSize::EightByte > &val) override
Derived ThreadContext class for use with the O3CPU.
Generated on Tue Jun 22 2021 15:28:19 for gem5 by doxygen 1.8.17