Go to the documentation of this file.
42 #ifndef __CPU_THREAD_CONTEXT_HH__
43 #define __CPU_THREAD_CONTEXT_HH__
50 #include "arch/registers.hh"
51 #include "arch/types.hh"
53 #include "config/the_isa.hh"
122 virtual int cpuId()
const = 0;
124 virtual uint32_t
socketId()
const = 0;
173 virtual void halt() = 0;
266 pc_state.setNPC(
val);
302 virtual int exit() {
return 1; };
virtual const VecPredRegContainer & readVecPredReg(const RegId ®) const =0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual RegVal readIntRegFlat(RegIndex idx) const =0
Flat register interfaces.
virtual void descheduleInstCountEvent(Event *event)=0
virtual void setVecPredRegFlat(RegIndex idx, const VecPredRegContainer &val)=0
virtual const VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIdx) const =0
virtual void setContextId(ContextID id)=0
virtual Tick getCurrentInstCount()=0
Generic predicate register container.
virtual void activate()=0
Set the status to Active.
virtual const VecRegContainer & readVecRegFlat(RegIndex idx) const =0
VecReg::Container VecRegContainer
void quiesce()
Quiesce thread context.
virtual VecRegContainer & getWritableVecReg(const RegId ®)=0
@ Halting
Trying to exit and waiting for an event to completely exit.
virtual void regStats(const std::string &name)
virtual ConstVecLane64 readVec64BitLaneReg(const RegId ®) const =0
Reads source vector 64bit operand.
int ContextID
Globally unique thread context ID.
virtual void htmAbortTransaction(uint64_t htm_uid, HtmFailureFaultCause cause)=0
virtual void setVecReg(const RegId ®, const VecRegContainer &val)=0
virtual void suspend()=0
Set the status to Suspended.
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
TheISA::MachInst MachInst
virtual VecRegContainer & getWritableVecRegFlat(RegIndex idx)=0
uint64_t Tick
Tick count type.
VecPredReg::Container VecPredRegContainer
virtual Counter readFuncExeInst() const =0
virtual void setVecElem(const RegId ®, const VecElem &val)=0
virtual PortProxy & getPhysProxy()=0
virtual void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val)=0
Write a lane of the destination vector register.
virtual Process * getProcessPtr()=0
virtual void setHtmCheckpointPtr(BaseHTMCheckpointPtr cpt)=0
virtual void setFloatRegFlat(RegIndex idx, RegVal val)=0
virtual int threadId() const =0
void takeOverFrom(ThreadContext &new_tc, ThreadContext &old_tc)
Copy state between thread contexts in preparation for CPU handover.
Register ID: describe an architectural register with its class and index.
virtual void halt()=0
Set the status to Halted.
virtual BaseISA * getIsaPtr()=0
virtual const VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const =0
virtual Tick readLastSuspend()=0
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
int64_t Counter
Statistics counter type.
virtual Tick readLastActivate()=0
virtual unsigned readStCondFailures() const =0
virtual void clearArchRegs()=0
virtual void takeOverFrom(ThreadContext *old_context)=0
virtual void initMemProxies(ThreadContext *tc)=0
Initialise the physical and virtual port proxies and tie them to the data port of the CPU.
virtual RegVal readCCRegFlat(RegIndex idx) const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual MicroPC microPC() const =0
Vector Lane abstraction Another view of a container.
virtual ConstVecLane8 readVec8BitLaneReg(const RegId ®) const =0
Vector Register Lane Interfaces.
virtual void pcStateNoRecord(const TheISA::PCState &val)=0
virtual void setIntRegFlat(RegIndex idx, RegVal val)=0
@ Halted
Permanently shut down.
virtual RegId flattenRegId(const RegId ®Id) const =0
virtual VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx)=0
virtual const VecRegContainer & readVecReg(const RegId ®) const =0
virtual int cpuId() const =0
virtual ContextID contextId() const =0
virtual RegVal readFloatRegFlat(RegIndex idx) const =0
virtual Status status() const =0
virtual const VecElem & readVecElem(const RegId ®) const =0
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual ConstVecLane16 readVec16BitLaneReg(const RegId ®) const =0
Reads source vector 16bit operand.
std::unique_ptr< BaseHTMCheckpoint > BaseHTMCheckpointPtr
virtual void setStatus(Status new_status)=0
const std::string & name()
void quiesceTick(Tick resume)
Quiesce, suspend, and schedule activate at resume.
virtual BaseTLB * getITBPtr()=0
virtual TheISA::PCState pcState() const =0
virtual RegVal readCCReg(RegIndex reg_idx) const =0
virtual PortProxy & getVirtProxy()=0
virtual void scheduleInstCountEvent(Event *event, Tick count)=0
@ Suspended
Temporarily inactive.
static void compare(ThreadContext *one, ThreadContext *two)
function to compare two thread contexts (for debugging)
This object is a proxy for a port or other object which implements the functional response protocol,...
virtual void setCCReg(RegIndex reg_idx, RegVal val)=0
virtual void setFloatReg(RegIndex reg_idx, RegVal val)=0
virtual void setCCRegFlat(RegIndex idx, RegVal val)=0
GenericISA::DelaySlotPCState< MachInst > PCState
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual void setStCondFailures(unsigned sc_failures)=0
virtual ConstVecLane32 readVec32BitLaneReg(const RegId ®) const =0
Reads source vector 32bit operand.
virtual CheckerCPU * getCheckerCpuPtr()=0
uint16_t ElemIndex
Logical vector register elem index type.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual void setVecPredReg(const RegId ®, const VecPredRegContainer &val)=0
void unserialize(ThreadContext &tc, CheckpointIn &cp)
std::ostream CheckpointOut
virtual TheISA::Decoder * getDecoderPtr()=0
virtual Addr nextInstAddr() const =0
virtual void copyArchRegs(ThreadContext *tc)=0
virtual void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const VecElem &val)=0
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
virtual uint32_t socketId() const =0
virtual void setThreadId(int id)=0
virtual void setVecRegFlat(RegIndex idx, const VecRegContainer &val)=0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
virtual VecPredRegContainer & getWritableVecPredReg(const RegId ®)=0
virtual BaseCPU * getCpuPtr()=0
virtual Addr instAddr() const =0
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
virtual BaseTLB * getDTBPtr()=0
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
virtual void setProcessPtr(Process *p)=0
virtual System * getSystemPtr()=0
Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17