gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Attributes | List of all members
SimpleThread Class Reference

The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interface. More...

#include <simple_thread.hh>

Inheritance diagram for SimpleThread:
ThreadState ThreadContext Serializable PCEventScope

Public Types

typedef ThreadContext::Status Status
 
- Public Types inherited from ThreadState
typedef ThreadContext::Status Status
 
- Public Types inherited from ThreadContext
enum  Status { Active, Suspended, Halting, Halted }
 

Public Member Functions

std::string name () const
 
 SimpleThread (BaseCPU *_cpu, int _thread_num, System *_system, BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa, bool use_kernel_stats=true)
 
 SimpleThread (BaseCPU *_cpu, int _thread_num, System *_system, Process *_process, BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa)
 
virtual ~SimpleThread ()
 
void takeOverFrom (ThreadContext *oldContext) override
 
void regStats (const std::string &name) override
 
void copyState (ThreadContext *oldContext)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
void startup ()
 
ThreadContextgetTC ()
 Returns the pointer to this SimpleThread's ThreadContext. More...
 
void demapPage (Addr vaddr, uint64_t asn)
 
void demapInstPage (Addr vaddr, uint64_t asn)
 
void demapDataPage (Addr vaddr, uint64_t asn)
 
void dumpFuncProfile () override
 
bool schedule (PCEvent *e) override
 
bool remove (PCEvent *e) override
 
void scheduleInstCountEvent (Event *event, Tick count) override
 
void descheduleInstCountEvent (Event *event) override
 
Tick getCurrentInstCount () override
 
BaseCPUgetCpuPtr () override
 
int cpuId () const override
 
uint32_t socketId () const override
 
int threadId () const override
 
void setThreadId (int id) override
 
ContextID contextId () const override
 
void setContextId (ContextID id) override
 
BaseTLBgetITBPtr () override
 
BaseTLBgetDTBPtr () override
 
CheckerCPUgetCheckerCpuPtr () override
 
BaseISAgetIsaPtr () override
 
TheISA::Decoder * getDecoderPtr () override
 
SystemgetSystemPtr () override
 
Kernel::StatisticsgetKernelStats () override
 
PortProxygetPhysProxy () override
 
PortProxygetVirtProxy () override
 
void initMemProxies (ThreadContext *tc) override
 Initialise the physical and virtual port proxies and tie them to the data port of the CPU. More...
 
ProcessgetProcessPtr () override
 
void setProcessPtr (Process *p) override
 
Status status () const override
 
void setStatus (Status newStatus) override
 
void activate () override
 Set the status to Active. More...
 
void suspend () override
 Set the status to Suspended. More...
 
void halt () override
 Set the status to Halted. More...
 
EndQuiesceEventgetQuiesceEvent () override
 
Tick readLastActivate () override
 
Tick readLastSuspend () override
 
void profileClear () override
 
void profileSample () override
 
void copyArchRegs (ThreadContext *tc) override
 
void clearArchRegs () override
 
RegVal readIntReg (RegIndex reg_idx) const override
 
RegVal readFloatReg (RegIndex reg_idx) const override
 
const VecRegContainerreadVecReg (const RegId &reg) const override
 
VecRegContainergetWritableVecReg (const RegId &reg) override
 
const VecElemreadVecElem (const RegId &reg) const override
 
const VecPredRegContainerreadVecPredReg (const RegId &reg) const override
 
VecPredRegContainergetWritableVecPredReg (const RegId &reg) override
 
RegVal readCCReg (RegIndex reg_idx) const override
 
void setIntReg (RegIndex reg_idx, RegVal val) override
 
void setFloatReg (RegIndex reg_idx, RegVal val) override
 
void setVecReg (const RegId &reg, const VecRegContainer &val) override
 
void setVecElem (const RegId &reg, const VecElem &val) override
 
void setVecPredReg (const RegId &reg, const VecPredRegContainer &val) override
 
void setCCReg (RegIndex reg_idx, RegVal val) override
 
TheISA::PCState pcState () const override
 
void pcState (const TheISA::PCState &val) override
 
void pcStateNoRecord (const TheISA::PCState &val) override
 
Addr instAddr () const override
 
Addr nextInstAddr () const override
 
MicroPC microPC () const override
 
bool readPredicate () const
 
void setPredicate (bool val)
 
RegVal readMiscRegNoEffect (RegIndex misc_reg) const override
 
RegVal readMiscReg (RegIndex misc_reg) override
 
void setMiscRegNoEffect (RegIndex misc_reg, RegVal val) override
 
void setMiscReg (RegIndex misc_reg, RegVal val) override
 
RegId flattenRegId (const RegId &regId) const override
 
unsigned readStCondFailures () const override
 
bool readMemAccPredicate ()
 
void setMemAccPredicate (bool val)
 
void setStCondFailures (unsigned sc_failures) override
 
Counter readFuncExeInst () const override
 
void syscall (Fault *fault) override
 
RegVal readIntRegFlat (RegIndex idx) const override
 Flat register interfaces. More...
 
void setIntRegFlat (RegIndex idx, RegVal val) override
 
RegVal readFloatRegFlat (RegIndex idx) const override
 
void setFloatRegFlat (RegIndex idx, RegVal val) override
 
const VecRegContainerreadVecRegFlat (RegIndex reg) const override
 
VecRegContainergetWritableVecRegFlat (RegIndex reg) override
 
void setVecRegFlat (RegIndex reg, const VecRegContainer &val) override
 
template<typename T >
VecLaneT< T, true > readVecLaneFlat (RegIndex reg, int lId) const
 
template<typename LD >
void setVecLaneFlat (RegIndex reg, int lId, const LD &val)
 
const VecElemreadVecElemFlat (RegIndex reg, const ElemIndex &elemIndex) const override
 
void setVecElemFlat (RegIndex reg, const ElemIndex &elemIndex, const VecElem &val) override
 
const VecPredRegContainerreadVecPredRegFlat (RegIndex reg) const override
 
VecPredRegContainergetWritableVecPredRegFlat (RegIndex reg) override
 
void setVecPredRegFlat (RegIndex reg, const VecPredRegContainer &val) override
 
RegVal readCCRegFlat (RegIndex idx) const override
 
void setCCRegFlat (RegIndex idx, RegVal val) override
 
template<typename T >
VecLaneT< T, true > readVecLane (const RegId &reg) const
 Vector Register Lane Interfaces. More...
 
virtual ConstVecLane8 readVec8BitLaneReg (const RegId &reg) const override
 Reads source vector 8bit operand. More...
 
virtual ConstVecLane16 readVec16BitLaneReg (const RegId &reg) const override
 Reads source vector 16bit operand. More...
 
virtual ConstVecLane32 readVec32BitLaneReg (const RegId &reg) const override
 Reads source vector 32bit operand. More...
 
virtual ConstVecLane64 readVec64BitLaneReg (const RegId &reg) const override
 Reads source vector 64bit operand. More...
 
template<typename LD >
void setVecLaneT (const RegId &reg, const LD &val)
 Write a lane of the destination vector register. More...
 
virtual void setVecLane (const RegId &reg, const LaneData< LaneSize::Byte > &val) override
 Write a lane of the destination vector register. More...
 
virtual void setVecLane (const RegId &reg, const LaneData< LaneSize::TwoByte > &val) override
 
virtual void setVecLane (const RegId &reg, const LaneData< LaneSize::FourByte > &val) override
 
virtual void setVecLane (const RegId &reg, const LaneData< LaneSize::EightByte > &val) override
 
- Public Member Functions inherited from ThreadState
 ThreadState (BaseCPU *cpu, ThreadID _tid, Process *_process)
 
virtual ~ThreadState ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
int cpuId () const
 
uint32_t socketId () const
 
ContextID contextId () const
 
void setContextId (ContextID id)
 
void setThreadId (ThreadID id)
 
ThreadID threadId () const
 
Tick readLastActivate () const
 
Tick readLastSuspend () const
 
void initMemProxies (ThreadContext *tc)
 Initialise the physical and virtual port proxies and tie them to the data port of the CPU. More...
 
void dumpFuncProfile ()
 
EndQuiesceEventgetQuiesceEvent ()
 
void profileClear ()
 
void profileSample ()
 
Kernel::StatisticsgetKernelStats ()
 
PortProxygetPhysProxy ()
 
PortProxygetVirtProxy ()
 
ProcessgetProcessPtr ()
 
void setProcessPtr (Process *p)
 
Counter readFuncExeInst () const
 Reads the number of instructions functionally executed and committed. More...
 
void setFuncExeInst (Counter new_val)
 Sets the total number of instructions functionally executed and committed. More...
 
Status status () const
 Returns the status of this thread. More...
 
void setStatus (Status new_status)
 Sets the status of this thread. More...
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from ThreadContext
virtual ~ThreadContext ()
 
void quiesce ()
 Quiesce thread context. More...
 
void quiesceTick (Tick resume)
 Quiesce, suspend, and schedule activate at resume. More...
 
void setNPC (Addr val)
 
virtual int exit ()
 

Public Attributes

PCEventQueue pcEventQueue
 
EventQueue comInstEventQueue
 An instruction-based event queue. More...
 
Systemsystem
 
BaseTLBitb
 
BaseTLBdtb
 
TheISA::Decoder decoder
 
- Public Attributes inherited from ThreadState
Counter numInst
 Number of instructions committed. More...
 
Stats::Scalar numInsts
 Stat for number instructions committed. More...
 
Counter numOp
 Number of ops (including micro ops) committed. More...
 
Stats::Scalar numOps
 Stat for number ops (including micro ops) committed. More...
 
Stats::Scalar numMemRefs
 Stat for number of memory references. More...
 
Counter numLoad
 Number of simulated loads, used for tracking events based on the number of loads committed. More...
 
Counter startNumLoad
 The number of simulated loads committed prior to this run. More...
 
Tick lastActivate
 Last time activate was called on this thread. More...
 
Tick lastSuspend
 Last time suspend was called on this thread. More...
 
FunctionProfileprofile
 
ProfileNodeprofileNode
 
Addr profilePC
 
EndQuiesceEventquiesceEvent
 
Kernel::StatisticskernelStats
 
Counter funcExeInst
 
unsigned storeCondFailures
 
- Public Attributes inherited from ThreadContext
int intResult = DefaultIntResult
 
double floatResult = DefaultFloatResult
 
int intOffset = 0
 

Protected Types

typedef TheISA::MachInst MachInst
 
using VecRegContainer = TheISA::VecRegContainer
 
using VecElem = TheISA::VecElem
 
using VecPredRegContainer = TheISA::VecPredRegContainer
 
- Protected Types inherited from ThreadContext
typedef TheISA::MachInst MachInst
 
using VecRegContainer = TheISA::VecRegContainer
 
using VecElem = TheISA::VecElem
 
using VecPredRegContainer = TheISA::VecPredRegContainer
 

Protected Attributes

std::array< RegVal, TheISA::NumFloatRegs > floatRegs
 
std::array< RegVal, TheISA::NumIntRegs > intRegs
 
std::array< VecRegContainer, TheISA::NumVecRegs > vecRegs
 
std::array< VecPredRegContainer, TheISA::NumVecPredRegs > vecPredRegs
 
std::array< RegVal, TheISA::NumCCRegs > ccRegs
 
TheISA::ISA *const isa
 
TheISA::PCState _pcState
 
bool predicate
 Did this instruction execute or is it predicated false. More...
 
bool memAccPredicate
 True if the memory access should be skipped for this instruction. More...
 
- Protected Attributes inherited from ThreadState
ThreadContext::Status _status
 
BaseCPUbaseCpu
 
ContextID _contextId
 
ThreadID _threadId
 
Processprocess
 
PortProxyphysProxy
 A port proxy outgoing only for functional accesses to physical addresses. More...
 
PortProxyvirtProxy
 A translating port proxy, outgoing only, for functional accesse to virtual addresses. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Member Functions inherited from ThreadContext
static void compare (ThreadContext *one, ThreadContext *two)
 function to compare two thread contexts (for debugging) More...
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Static Public Attributes inherited from ThreadContext
static const int ints []
 
static const double floats []
 
static const int DefaultIntResult = 0
 
static const double DefaultFloatResult = 0.0
 

Detailed Description

The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interface.

It implements the ThreadContext interface and adds to the ThreadState object by adding all the objects needed for simple functional execution, including a simple architectural register file, and pointers to the ITB and DTB in full system mode. For CPU models that do not need more advanced ways to hold state (i.e. a separate physical register file, or separate fetch and commit PC's), this SimpleThread class provides all the necessary state for full architecture-level functional simulation. See the AtomicSimpleCPU or TimingSimpleCPU for examples.

Definition at line 98 of file simple_thread.hh.

Member Typedef Documentation

◆ MachInst

typedef TheISA::MachInst SimpleThread::MachInst
protected

Definition at line 101 of file simple_thread.hh.

◆ Status

Definition at line 106 of file simple_thread.hh.

◆ VecElem

using SimpleThread::VecElem = TheISA::VecElem
protected

Definition at line 103 of file simple_thread.hh.

◆ VecPredRegContainer

using SimpleThread::VecPredRegContainer = TheISA::VecPredRegContainer
protected

Definition at line 104 of file simple_thread.hh.

◆ VecRegContainer

using SimpleThread::VecRegContainer = TheISA::VecRegContainer
protected

Definition at line 102 of file simple_thread.hh.

Constructor & Destructor Documentation

◆ SimpleThread() [1/2]

SimpleThread::SimpleThread ( BaseCPU _cpu,
int  _thread_num,
System _system,
BaseTLB _itb,
BaseTLB _dtb,
TheISA::ISA *  _isa,
bool  use_kernel_stats = true 
)

◆ SimpleThread() [2/2]

SimpleThread::SimpleThread ( BaseCPU _cpu,
int  _thread_num,
System _system,
Process _process,
BaseTLB _itb,
BaseTLB _dtb,
TheISA::ISA *  _isa 
)

Definition at line 76 of file simple_thread.cc.

References clearArchRegs(), and ThreadState::quiesceEvent.

◆ ~SimpleThread()

virtual SimpleThread::~SimpleThread ( )
inlinevirtual

Definition at line 154 of file simple_thread.hh.

References name(), serialize(), takeOverFrom(), and unserialize().

Member Function Documentation

◆ activate()

void SimpleThread::activate ( )
overridevirtual

◆ clearArchRegs()

void SimpleThread::clearArchRegs ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 292 of file simple_thread.hh.

Referenced by CheckerThreadContext< TC >::clearArchRegs(), and SimpleThread().

◆ contextId()

ContextID SimpleThread::contextId ( ) const
inlineoverridevirtual

◆ copyArchRegs()

void SimpleThread::copyArchRegs ( ThreadContext tc)
overridevirtual

Implements ThreadContext.

Definition at line 214 of file simple_thread.cc.

References AlphaISA::copyRegs().

Referenced by CheckerThreadContext< TC >::copyArchRegs(), and copyState().

◆ copyState()

void SimpleThread::copyState ( ThreadContext oldContext)

◆ cpuId()

int SimpleThread::cpuId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 220 of file simple_thread.hh.

References ThreadState::cpuId().

◆ demapDataPage()

void SimpleThread::demapDataPage ( Addr  vaddr,
uint64_t  asn 
)
inline

Definition at line 188 of file simple_thread.hh.

References BaseTLB::demapPage().

◆ demapInstPage()

void SimpleThread::demapInstPage ( Addr  vaddr,
uint64_t  asn 
)
inline

Definition at line 183 of file simple_thread.hh.

References BaseTLB::demapPage().

◆ demapPage()

void SimpleThread::demapPage ( Addr  vaddr,
uint64_t  asn 
)
inline

Definition at line 177 of file simple_thread.hh.

References BaseTLB::demapPage().

Referenced by SimpleExecContext::demapPage().

◆ descheduleInstCountEvent()

void SimpleThread::descheduleInstCountEvent ( Event event)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 208 of file simple_thread.hh.

References EventQueue::deschedule().

◆ dumpFuncProfile()

void SimpleThread::dumpFuncProfile ( )
overridevirtual

◆ flattenRegId()

RegId SimpleThread::flattenRegId ( const RegId regId) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 580 of file simple_thread.hh.

◆ getCheckerCpuPtr()

CheckerCPU* SimpleThread::getCheckerCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 231 of file simple_thread.hh.

◆ getCpuPtr()

BaseCPU* SimpleThread::getCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 218 of file simple_thread.hh.

◆ getCurrentInstCount()

Tick SimpleThread::getCurrentInstCount ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 213 of file simple_thread.hh.

References EventQueue::getCurTick().

◆ getDecoderPtr()

TheISA::Decoder* SimpleThread::getDecoderPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 235 of file simple_thread.hh.

References decoder.

◆ getDTBPtr()

BaseTLB* SimpleThread::getDTBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 229 of file simple_thread.hh.

Referenced by Minor::ExecContext::demapDataPage(), and Minor::ExecContext::demapPage().

◆ getIsaPtr()

BaseISA* SimpleThread::getIsaPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 233 of file simple_thread.hh.

◆ getITBPtr()

BaseTLB* SimpleThread::getITBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 227 of file simple_thread.hh.

Referenced by Minor::ExecContext::demapInstPage(), and Minor::ExecContext::demapPage().

◆ getKernelStats()

Kernel::Statistics* SimpleThread::getKernelStats ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 240 of file simple_thread.hh.

References ThreadState::getKernelStats().

◆ getPhysProxy()

PortProxy& SimpleThread::getPhysProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 245 of file simple_thread.hh.

References ThreadState::getPhysProxy().

◆ getProcessPtr()

Process* SimpleThread::getProcessPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 253 of file simple_thread.hh.

References ThreadState::getProcessPtr().

◆ getQuiesceEvent()

EndQuiesceEvent* SimpleThread::getQuiesceEvent ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 270 of file simple_thread.hh.

References ThreadState::getQuiesceEvent().

◆ getSystemPtr()

System* SimpleThread::getSystemPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 237 of file simple_thread.hh.

References X86ISA::system.

◆ getTC()

ThreadContext* SimpleThread::getTC ( )
inline

◆ getVirtProxy()

PortProxy& SimpleThread::getVirtProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 246 of file simple_thread.hh.

References ThreadState::getVirtProxy().

◆ getWritableVecPredReg()

VecPredRegContainer& SimpleThread::getWritableVecPredReg ( const RegId reg)
inlineoverridevirtual

◆ getWritableVecPredRegFlat()

VecPredRegContainer& SimpleThread::getWritableVecPredRegFlat ( RegIndex  reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 687 of file simple_thread.hh.

References X86ISA::reg.

◆ getWritableVecReg()

VecRegContainer& SimpleThread::getWritableVecReg ( const RegId reg)
inlineoverridevirtual

◆ getWritableVecRegFlat()

VecRegContainer& SimpleThread::getWritableVecRegFlat ( RegIndex  reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 642 of file simple_thread.hh.

References X86ISA::reg.

◆ halt()

void SimpleThread::halt ( )
overridevirtual

◆ initMemProxies()

void SimpleThread::initMemProxies ( ThreadContext tc)
inlineoverridevirtual

Initialise the physical and virtual port proxies and tie them to the data port of the CPU.

tc ThreadContext for the virtual-to-physical translation

Implements ThreadContext.

Definition at line 248 of file simple_thread.hh.

References ThreadState::initMemProxies().

◆ instAddr()

Addr SimpleThread::instAddr ( ) const
inlineoverridevirtual

◆ microPC()

MicroPC SimpleThread::microPC ( ) const
inlineoverridevirtual

◆ name()

std::string SimpleThread::name ( ) const
inline

Definition at line 125 of file simple_thread.hh.

References csprintf().

◆ nextInstAddr()

Addr SimpleThread::nextInstAddr ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 550 of file simple_thread.hh.

Referenced by CheckerCPU::nextInstAddr().

◆ pcState() [1/2]

TheISA::PCState SimpleThread::pcState ( ) const
inlineoverridevirtual

◆ pcState() [2/2]

void SimpleThread::pcState ( const TheISA::PCState &  val)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 541 of file simple_thread.hh.

References X86ISA::val.

◆ pcStateNoRecord()

void SimpleThread::pcStateNoRecord ( const TheISA::PCState &  val)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 544 of file simple_thread.hh.

References X86ISA::val.

◆ profileClear()

void SimpleThread::profileClear ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 286 of file simple_thread.hh.

References ThreadState::profileClear().

◆ profileSample()

void SimpleThread::profileSample ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 287 of file simple_thread.hh.

References ThreadState::profileSample().

◆ readCCReg()

RegVal SimpleThread::readCCReg ( RegIndex  reg_idx) const
inlineoverridevirtual

◆ readCCRegFlat()

RegVal SimpleThread::readCCRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 698 of file simple_thread.hh.

◆ readFloatReg()

RegVal SimpleThread::readFloatReg ( RegIndex  reg_idx) const
inlineoverridevirtual

◆ readFloatRegFlat()

RegVal SimpleThread::readFloatRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 625 of file simple_thread.hh.

◆ readFuncExeInst()

Counter SimpleThread::readFuncExeInst ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 606 of file simple_thread.hh.

References ThreadState::readFuncExeInst().

◆ readIntReg()

RegVal SimpleThread::readIntReg ( RegIndex  reg_idx) const
inlineoverridevirtual

◆ readIntRegFlat()

RegVal SimpleThread::readIntRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Flat register interfaces.

Some architectures have different registers visible in different modes. Such architectures "flatten" a register (see flattenRegId()) to map it into the gem5 register file. This interface provides a flat interface to the underlying register file, which allows for example serialization code to access all registers.

Implements ThreadContext.

Definition at line 617 of file simple_thread.hh.

◆ readLastActivate()

Tick SimpleThread::readLastActivate ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 276 of file simple_thread.hh.

References ThreadState::readLastActivate().

◆ readLastSuspend()

Tick SimpleThread::readLastSuspend ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 281 of file simple_thread.hh.

References ThreadState::readLastSuspend().

◆ readMemAccPredicate()

bool SimpleThread::readMemAccPredicate ( )
inline

◆ readMiscReg()

RegVal SimpleThread::readMiscReg ( RegIndex  misc_reg)
inlineoverridevirtual

◆ readMiscRegNoEffect()

RegVal SimpleThread::readMiscRegNoEffect ( RegIndex  misc_reg) const
inlineoverridevirtual

◆ readPredicate()

bool SimpleThread::readPredicate ( ) const
inline

◆ readStCondFailures()

unsigned SimpleThread::readStCondFailures ( ) const
inlineoverridevirtual

◆ readVec16BitLaneReg()

virtual ConstVecLane16 SimpleThread::readVec16BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 16bit operand.

Implements ThreadContext.

Definition at line 376 of file simple_thread.hh.

References X86ISA::reg.

Referenced by CheckerCPU::readVec16BitLaneOperand(), and Minor::ExecContext::readVec16BitLaneOperand().

◆ readVec32BitLaneReg()

virtual ConstVecLane32 SimpleThread::readVec32BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 32bit operand.

Implements ThreadContext.

Definition at line 383 of file simple_thread.hh.

References X86ISA::reg.

Referenced by CheckerCPU::readVec32BitLaneOperand(), and Minor::ExecContext::readVec32BitLaneOperand().

◆ readVec64BitLaneReg()

virtual ConstVecLane64 SimpleThread::readVec64BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 64bit operand.

Implements ThreadContext.

Definition at line 390 of file simple_thread.hh.

References X86ISA::reg.

Referenced by CheckerCPU::readVec64BitLaneOperand(), and Minor::ExecContext::readVec64BitLaneOperand().

◆ readVec8BitLaneReg()

virtual ConstVecLane8 SimpleThread::readVec8BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 8bit operand.

Implements ThreadContext.

Definition at line 369 of file simple_thread.hh.

References X86ISA::reg.

Referenced by CheckerCPU::readVec8BitLaneOperand(), and Minor::ExecContext::readVec8BitLaneOperand().

◆ readVecElem()

const VecElem& SimpleThread::readVecElem ( const RegId reg) const
inlineoverridevirtual

◆ readVecElemFlat()

const VecElem& SimpleThread::readVecElemFlat ( RegIndex  reg,
const ElemIndex elemIndex 
) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 668 of file simple_thread.hh.

References X86ISA::reg.

◆ readVecLane()

template<typename T >
VecLaneT<T, true> SimpleThread::readVecLane ( const RegId reg) const
inline

Vector Register Lane Interfaces.

Reads source vector <T> operand.

Definition at line 357 of file simple_thread.hh.

References DPRINTF, RegId::elemIndex(), RegId::index(), and AlphaISA::NumVecRegs.

Referenced by SimpleExecContext::readVecLaneOperand().

◆ readVecLaneFlat()

template<typename T >
VecLaneT<T, true> SimpleThread::readVecLaneFlat ( RegIndex  reg,
int  lId 
) const
inline

Definition at line 655 of file simple_thread.hh.

References X86ISA::reg.

◆ readVecPredReg()

const VecPredRegContainer& SimpleThread::readVecPredReg ( const RegId reg) const
inlineoverridevirtual

◆ readVecPredRegFlat()

const VecPredRegContainer& SimpleThread::readVecPredRegFlat ( RegIndex  reg) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 681 of file simple_thread.hh.

References X86ISA::reg.

◆ readVecReg()

const VecRegContainer& SimpleThread::readVecReg ( const RegId reg) const
inlineoverridevirtual

◆ readVecRegFlat()

const VecRegContainer& SimpleThread::readVecRegFlat ( RegIndex  reg) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 636 of file simple_thread.hh.

References X86ISA::reg.

◆ regStats()

void SimpleThread::regStats ( const std::string &  name)
overridevirtual

◆ remove()

bool SimpleThread::remove ( PCEvent e)
inlineoverridevirtual

Implements PCEventScope.

Definition at line 200 of file simple_thread.hh.

References ArmISA::e, and PCEventQueue::remove().

◆ schedule()

bool SimpleThread::schedule ( PCEvent e)
inlineoverridevirtual

Implements PCEventScope.

Definition at line 199 of file simple_thread.hh.

References PCEventQueue::schedule().

◆ scheduleInstCountEvent()

void SimpleThread::scheduleInstCountEvent ( Event event,
Tick  count 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 203 of file simple_thread.hh.

References EventQueue::schedule().

◆ serialize()

void SimpleThread::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 143 of file simple_thread.cc.

References ThreadState::serialize().

Referenced by BaseKvmCPU::serializeThread().

◆ setCCReg()

void SimpleThread::setCCReg ( RegIndex  reg_idx,
RegVal  val 
)
inlineoverridevirtual

◆ setCCRegFlat()

void SimpleThread::setCCRegFlat ( RegIndex  idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 699 of file simple_thread.hh.

References X86ISA::val.

◆ setContextId()

void SimpleThread::setContextId ( ContextID  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 225 of file simple_thread.hh.

References ThreadState::setContextId().

Referenced by CheckerThreadContext< TC >::setContextId().

◆ setFloatReg()

void SimpleThread::setFloatReg ( RegIndex  reg_idx,
RegVal  val 
)
inlineoverridevirtual

◆ setFloatRegFlat()

void SimpleThread::setFloatRegFlat ( RegIndex  idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 630 of file simple_thread.hh.

References X86ISA::val.

◆ setIntReg()

void SimpleThread::setIntReg ( RegIndex  reg_idx,
RegVal  val 
)
inlineoverridevirtual

◆ setIntRegFlat()

void SimpleThread::setIntRegFlat ( RegIndex  idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 619 of file simple_thread.hh.

References X86ISA::val.

◆ setMemAccPredicate()

void SimpleThread::setMemAccPredicate ( bool  val)
inline

◆ setMiscReg()

void SimpleThread::setMiscReg ( RegIndex  misc_reg,
RegVal  val 
)
inlineoverridevirtual

◆ setMiscRegNoEffect()

void SimpleThread::setMiscRegNoEffect ( RegIndex  misc_reg,
RegVal  val 
)
inlineoverridevirtual

◆ setPredicate()

void SimpleThread::setPredicate ( bool  val)
inline

◆ setProcessPtr()

void SimpleThread::setProcessPtr ( Process p)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 254 of file simple_thread.hh.

References ThreadState::setProcessPtr().

◆ setStatus()

void SimpleThread::setStatus ( Status  newStatus)
inlineoverridevirtual

◆ setStCondFailures()

void SimpleThread::setStCondFailures ( unsigned  sc_failures)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 600 of file simple_thread.hh.

Referenced by SimpleExecContext::setStCondFailures().

◆ setThreadId()

void SimpleThread::setThreadId ( int  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 223 of file simple_thread.hh.

References ThreadState::setThreadId().

Referenced by CheckerThreadContext< TC >::setThreadId().

◆ setVecElem()

void SimpleThread::setVecElem ( const RegId reg,
const VecElem val 
)
inlineoverridevirtual

◆ setVecElemFlat()

void SimpleThread::setVecElemFlat ( RegIndex  reg,
const ElemIndex elemIndex,
const VecElem val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 674 of file simple_thread.hh.

References X86ISA::reg.

◆ setVecLane() [1/4]

virtual void SimpleThread::setVecLane ( const RegId reg,
const LaneData< LaneSize::Byte > &  val 
)
inlineoverridevirtual

Write a lane of the destination vector register.

Implements ThreadContext.

Definition at line 407 of file simple_thread.hh.

Referenced by CheckerCPU::setVecLaneOperandT(), Minor::ExecContext::setVecLaneOperandT(), and SimpleExecContext::setVecLaneOperandT().

◆ setVecLane() [2/4]

virtual void SimpleThread::setVecLane ( const RegId reg,
const LaneData< LaneSize::TwoByte > &  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 412 of file simple_thread.hh.

◆ setVecLane() [3/4]

virtual void SimpleThread::setVecLane ( const RegId reg,
const LaneData< LaneSize::FourByte > &  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 418 of file simple_thread.hh.

◆ setVecLane() [4/4]

virtual void SimpleThread::setVecLane ( const RegId reg,
const LaneData< LaneSize::EightByte > &  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 424 of file simple_thread.hh.

◆ setVecLaneFlat()

template<typename LD >
void SimpleThread::setVecLaneFlat ( RegIndex  reg,
int  lId,
const LD &  val 
)
inline

Definition at line 662 of file simple_thread.hh.

References X86ISA::reg.

◆ setVecLaneT()

template<typename LD >
void SimpleThread::setVecLaneT ( const RegId reg,
const LD &  val 
)
inline

Write a lane of the destination vector register.

Definition at line 398 of file simple_thread.hh.

References DPRINTF, RegId::elemIndex(), RegId::index(), AlphaISA::NumVecRegs, and X86ISA::val.

◆ setVecPredReg()

void SimpleThread::setVecPredReg ( const RegId reg,
const VecPredRegContainer val 
)
inlineoverridevirtual

◆ setVecPredRegFlat()

void SimpleThread::setVecPredRegFlat ( RegIndex  reg,
const VecPredRegContainer val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 693 of file simple_thread.hh.

References X86ISA::reg, and X86ISA::val.

◆ setVecReg()

void SimpleThread::setVecReg ( const RegId reg,
const VecRegContainer val 
)
inlineoverridevirtual

◆ setVecRegFlat()

void SimpleThread::setVecRegFlat ( RegIndex  reg,
const VecRegContainer val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 648 of file simple_thread.hh.

References X86ISA::reg, and X86ISA::val.

◆ socketId()

uint32_t SimpleThread::socketId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 221 of file simple_thread.hh.

References ThreadState::socketId().

◆ startup()

void SimpleThread::startup ( )

Definition at line 158 of file simple_thread.cc.

References isa.

Referenced by BaseKvmCPU::startup().

◆ status()

Status SimpleThread::status ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 256 of file simple_thread.hh.

Referenced by activate(), halt(), suspend(), and BaseKvmCPU::wakeup().

◆ suspend()

void SimpleThread::suspend ( )
overridevirtual

◆ syscall()

void SimpleThread::syscall ( Fault fault)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 612 of file simple_thread.hh.

Referenced by Minor::ExecContext::syscall(), and SimpleExecContext::syscall().

◆ takeOverFrom()

void SimpleThread::takeOverFrom ( ThreadContext oldContext)
overridevirtual

◆ threadId()

int SimpleThread::threadId ( ) const
inlineoverridevirtual

◆ unserialize()

void SimpleThread::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 151 of file simple_thread.cc.

References ThreadState::unserialize().

Referenced by BaseKvmCPU::unserializeThread().

Member Data Documentation

◆ _pcState

TheISA::PCState SimpleThread::_pcState
protected

Definition at line 116 of file simple_thread.hh.

◆ ccRegs

std::array<RegVal, TheISA::NumCCRegs> SimpleThread::ccRegs
protected

Definition at line 113 of file simple_thread.hh.

◆ comInstEventQueue

EventQueue SimpleThread::comInstEventQueue

An instruction-based event queue.

Used for scheduling events based on number of instructions committed.

Definition at line 135 of file simple_thread.hh.

Referenced by BaseSimpleCPU::preExecute(), BaseKvmCPU::setupInstStop(), and BaseKvmCPU::tick().

◆ decoder

TheISA::Decoder SimpleThread::decoder

◆ dtb

BaseTLB* SimpleThread::dtb

◆ floatRegs

std::array<RegVal, TheISA::NumFloatRegs> SimpleThread::floatRegs
protected

Definition at line 109 of file simple_thread.hh.

◆ intRegs

std::array<RegVal, TheISA::NumIntRegs> SimpleThread::intRegs
protected

Definition at line 110 of file simple_thread.hh.

◆ isa

TheISA::ISA* const SimpleThread::isa
protected

Definition at line 114 of file simple_thread.hh.

Referenced by startup().

◆ itb

BaseTLB* SimpleThread::itb

Definition at line 139 of file simple_thread.hh.

Referenced by TimingSimpleCPU::fetch(), and AtomicSimpleCPU::tick().

◆ memAccPredicate

bool SimpleThread::memAccPredicate
protected

True if the memory access should be skipped for this instruction.

Definition at line 122 of file simple_thread.hh.

◆ pcEventQueue

PCEventQueue SimpleThread::pcEventQueue

Definition at line 130 of file simple_thread.hh.

◆ predicate

bool SimpleThread::predicate
protected

Did this instruction execute or is it predicated false.

Definition at line 119 of file simple_thread.hh.

◆ system

System* SimpleThread::system

Definition at line 137 of file simple_thread.hh.

Referenced by SimpleThread().

◆ vecPredRegs

std::array<VecPredRegContainer, TheISA::NumVecPredRegs> SimpleThread::vecPredRegs
protected

Definition at line 112 of file simple_thread.hh.

◆ vecRegs

std::array<VecRegContainer, TheISA::NumVecRegs> SimpleThread::vecRegs
protected

Definition at line 111 of file simple_thread.hh.


The documentation for this class was generated from the following files:

Generated on Fri Feb 28 2020 16:27:16 for gem5 by doxygen 1.8.13