44 #ifndef __CPU_O3_THREAD_CONTEXT_HH__
45 #define __CPU_O3_THREAD_CONTEXT_HH__
47 #include "config/the_isa.hh"
73 typedef typename Impl::O3CPU
O3CPU;
99 virtual int cpuId()
const {
return cpu->cpuId(); }
virtual SETranslatingPortProxy & getMemProxy()
A TranslatingPortProxy in FS mode translates a virtual address to a physical address and then calls t...
void setContextId(ContextID id)
virtual MiscReg readMiscReg(int misc_reg)
Reads a misc.
virtual void copyArchRegs(ThreadContext *tc)
Copies the architectural registers from another TC into this TC.
bool trapPending
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated with...
virtual PortProxy & getPhysProxy()
const std::string & name()
virtual void activate()
Set the status to Active.
virtual Addr nextInstAddr()
Reads this thread's next PC.
virtual int cpuId() const
Reads this CPU's ID.
PortProxy & getPhysProxy()
virtual TheISA::Kernel::Statistics * getKernelStats()
Returns a pointer to this thread's kernel statistics.
virtual void clearArchRegs()
Resets all architectural registers to 0.
virtual uint32_t socketId() const
Reads this CPU's Socket ID.
virtual void setStatus(Status new_status)
Sets this thread's status.
virtual CCReg readCCReg(int reg_idx)
virtual void setMiscReg(int misc_reg, const MiscReg &val)
Sets a misc.
virtual void dumpFuncProfile()
Dumps the function profiling information.
void setThreadId(ThreadID id)
virtual MiscReg readMiscRegNoEffect(int misc_reg) const
Reads a miscellaneous register.
virtual void setThreadId(int id)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Status status() const
Returns the status of this thread.
virtual FloatReg readFloatRegFlat(int idx)
Event for timing out quiesce instruction.
EndQuiesceEvent * quiesceEvent
ThreadID threadId() const
void setStatus(Status new_status)
Sets the status of this thread.
virtual MicroPC microPC()
Reads this thread's next PC.
virtual void syscall(int64_t callnum, Fault *fault)
Executes a syscall in SE mode.
virtual void halt()
Set the status to Halted.
virtual FloatRegBits readFloatRegBitsFlat(int idx)
virtual void initMemProxies(ThreadContext *tc)
Initialise the physical and virtual port proxies and tie them to the data port of the CPU...
virtual Tick readLastSuspend()
Reads the last tick that this thread was suspended on.
void setProcessPtr(Process *p)
virtual int flattenCCIndex(int reg)
virtual void setFloatReg(int reg_idx, FloatReg val)
TheISA::TLB * getDTBPtr()
Returns a pointer to the DTB.
uint64_t Tick
Tick count type.
TheISA::FloatRegBits FloatRegBits
virtual void profileClear()
Clears the function profiling information.
virtual void setFloatRegBitsFlat(int idx, FloatRegBits val)
virtual void regStats(const std::string &name)
Registers statistics associated with this TC.
virtual BaseCPU * getCpuPtr()
Returns a pointer to this CPU.
TheISA::Decoder * getDecoderPtr()
virtual void profileSample()
Samples the function profiling information.
virtual void setFloatRegBits(int reg_idx, FloatRegBits val)
virtual uint64_t readIntReg(int reg_idx)
Reads an integer register.
virtual void setCCReg(int reg_idx, CCReg val)
virtual void suspend()
Set the status to Suspended.
virtual FSTranslatingPortProxy & getVirtProxy()
CheckerCPU * getCheckerCpuPtr()
TheISA::FloatReg FloatReg
virtual void setContextId(int id)
virtual System * getSystemPtr()
Returns a pointer to the system.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual int flattenMiscIndex(int reg)
int64_t Counter
Statistics counter type.
virtual Status status() const
Returns this thread's status.
void initMemProxies(ThreadContext *tc)
Initialise the physical and virtual port proxies and tie them to the data port of the CPU...
TheISA::TLB * getITBPtr()
Returns a pointer to the ITB.
This object is a proxy for a structural port, to be used for debug accesses.
virtual void setMiscRegNoEffect(int misc_reg, const MiscReg &val)
Sets a misc.
TheISA::Kernel::Statistics * kernelStats
virtual void setStCondFailures(unsigned sc_failures)
Sets the number of consecutive store conditional failures.
O3CPU * cpu
Pointer to the CPU.
virtual Addr instAddr()
Reads this thread's PC.
virtual CCReg readCCRegFlat(int idx)
virtual Process * getProcessPtr()
Returns a pointer to this thread's process.
Process * getProcessPtr()
virtual int flattenFloatIndex(int reg)
virtual FloatReg readFloatReg(int reg_idx)
virtual int threadId() const
Returns this thread's ID number.
virtual TheISA::PCState pcState()
Reads this thread's PC state.
GenericISA::SimplePCState< MachInst > PCState
virtual Tick readLastActivate()
Reads the last tick that this thread was activated on.
O3ThreadState< Impl > * thread
Pointer to the thread state that this TC corrseponds to.
SETranslatingPortProxy & getMemProxy()
virtual uint64_t readIntRegFlat(int idx)
Flat register interfaces.
virtual unsigned readStCondFailures()
Returns the number of consecutive store conditional failures.
virtual void setProcessPtr(Process *p)
virtual void pcStateNoRecord(const TheISA::PCState &val)
virtual void takeOverFrom(ThreadContext *old_context)
Takes over execution of a thread from another CPU.
Derived ThreadContext class for use with the O3CPU.
unsigned storeCondFailures
virtual EndQuiesceEvent * getQuiesceEvent()
Returns pointer to the quiesce event.
virtual FloatRegBits readFloatRegBits(int reg_idx)
virtual int flattenIntIndex(int reg)
ContextID contextId() const
virtual void setIntReg(int reg_idx, uint64_t val)
Sets an integer register to a value.
virtual void setFloatRegFlat(int idx, FloatReg val)
std::shared_ptr< FaultBase > Fault
virtual void setCCRegFlat(int idx, CCReg val)
int ContextID
Globally unique thread context ID.
virtual void setIntRegFlat(int idx, uint64_t val)
virtual Counter readFuncExeInst()
Reads the funcExeInst counter.
void conditionalSquash()
check if the cpu is currently in state update mode and squash if not.
virtual ContextID contextId() const