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();
118 return cpu->fetch.decoder[
thread->threadId()];
125 int cpuId()
const override {
return cpu->cpuId(); }
153 thread->initMemProxies(tc);
163 thread->setStatus(new_status);
173 void halt()
override;
366 return cpu->instAddr(
thread->threadId());
373 return cpu->nextInstAddr(
thread->threadId());
387 return cpu->readMiscRegNoEffect(misc_reg,
thread->threadId());
395 return cpu->readMiscReg(misc_reg,
thread->threadId());
412 return thread->storeCondFailures;
419 thread->storeCondFailures = sc_failures;
455 template <
typename VecElem>
459 return cpu->template readArchVecLane<VecElem>(idx, lId,
463 template <
typename LD>
467 cpu->template setArchVecLane(idx, lId,
thread->threadId(),
val);
471 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.
const VecRegContainer & readVecReg(const RegId &id) const override
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.
VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
Generic predicate register container.
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.
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
void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const VecElem &val) override
int ContextID
Globally unique thread context ID.
const VecElem & readVecElem(const RegId ®) const override
ContextID contextId() const override
RegVal readReg(RegIndex reg_idx)
Reads an integer register.
uint64_t Tick
Tick count type.
void setStatus(Status new_status) override
Sets this thread's status.
RegVal readFloatRegFlat(RegIndex idx) const override
void setCCRegFlat(RegIndex idx, RegVal val) override
void setVecReg(const RegId ®, const VecRegContainer &val) override
RegVal readFloatReg(RegIndex reg_idx) const override
ConstVecLane64 readVec64BitLaneReg(const RegId &id) const override
Reads source vector 64bit operand.
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
VecPredRegContainer & getWritableVecPredReg(const RegId &id) override
void setVecLaneFlat(int idx, int lId, const LD &val)
TheISA::Decoder * getDecoderPtr() override
int64_t Counter
Statistics counter type.
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.
@ 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.
void setVecPredRegFlat(RegIndex idx, const VecPredRegContainer &val) override
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
void setVecRegFlat(RegIndex idx, const VecRegContainer &val) 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
const VecPredRegContainer & readVecPredReg(const RegId &id) const 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.
VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
Read vector register operand for modification, flat indexing.
const VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIndex) const 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
RegVal readCCRegFlat(RegIndex idx) const override
void setThreadId(int id) override
const VecRegContainer & readVecRegFlat(RegIndex idx) const override
void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
BaseTLB * getITBPtr() override
Returns a pointer to the ITB.
@ IntRegClass
Integer register.
void setIntRegFlat(RegIndex idx, RegVal val) override
BaseTLB * getDTBPtr() override
Returns a pointer to the DTB.
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 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.
void setVecElem(const RegId ®, const VecElem &val) override
This object is a proxy for a port or other object which implements the functional response protocol,...
BaseISA * getIsaPtr() override
GenericISA::DelaySlotPCState< MachInst > PCState
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.
void setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
bool schedule(PCEvent *e) override
void setFloatReg(RegIndex reg_idx, RegVal val) override
VecRegContainer & getWritableVecReg(const RegId &id) override
Read vector register operand for modification, hierarchical indexing.
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.
VecLaneT< VecElem, true > readVecLaneFlat(RegIndex idx, int lId) const
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
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
uint32_t socketId() const override
Reads this CPU's Socket ID.
void setVecLane(const RegId ®, const LaneData< LaneSize::EightByte > &val) override
void syscall() override
Executes a syscall in SE mode.
Derived ThreadContext class for use with the O3CPU.
Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17