gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | 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, BaseMMU *_mmu, BaseISA *_isa)
 
 SimpleThread (BaseCPU *_cpu, int _thread_num, System *_system, Process *_process, BaseMMU *_mmu, BaseISA *_isa)
 
virtual ~SimpleThread ()
 
void takeOverFrom (ThreadContext *oldContext) override
 
void copyState (ThreadContext *oldContext)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
ThreadContextgetTC ()
 Returns the pointer to this SimpleThread's ThreadContext. More...
 
void demapPage (Addr vaddr, uint64_t asn)
 
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
 
BaseMMUgetMMUPtr () override
 
CheckerCPUgetCheckerCpuPtr () override
 
BaseISAgetIsaPtr () override
 
TheISA::Decoder * getDecoderPtr () override
 
SystemgetSystemPtr () 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...
 
Tick readLastActivate () override
 
Tick readLastSuspend () override
 
void copyArchRegs (ThreadContext *tc) override
 
void clearArchRegs () override
 
RegVal readIntReg (RegIndex reg_idx) const override
 
RegVal readFloatReg (RegIndex reg_idx) const override
 
const TheISA::VecRegContainer & readVecReg (const RegId &reg) const override
 
TheISA::VecRegContainer & getWritableVecReg (const RegId &reg) override
 
const TheISA::VecElem & readVecElem (const RegId &reg) const override
 
const TheISA::VecPredRegContainer & readVecPredReg (const RegId &reg) const override
 
TheISA::VecPredRegContainer & getWritableVecPredReg (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 TheISA::VecRegContainer &val) override
 
void setVecElem (const RegId &reg, const TheISA::VecElem &val) override
 
void setVecPredReg (const RegId &reg, const TheISA::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
 
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 TheISA::VecRegContainer & readVecRegFlat (RegIndex reg) const override
 
TheISA::VecRegContainer & getWritableVecRegFlat (RegIndex reg) override
 
void setVecRegFlat (RegIndex reg, const TheISA::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 TheISA::VecElem & readVecElemFlat (RegIndex reg, const ElemIndex &elemIndex) const override
 
void setVecElemFlat (RegIndex reg, const ElemIndex &elemIndex, const TheISA::VecElem &val) override
 
const TheISA::VecPredRegContainer & readVecPredRegFlat (RegIndex reg) const override
 
TheISA::VecPredRegContainer & getWritableVecPredRegFlat (RegIndex reg) override
 
void setVecPredRegFlat (RegIndex reg, const TheISA::VecPredRegContainer &val) override
 
RegVal readCCRegFlat (RegIndex idx) const override
 
void setCCRegFlat (RegIndex idx, RegVal val) override
 
void htmAbortTransaction (uint64_t htm_uid, HtmFailureFaultCause cause) override
 
BaseHTMCheckpointPtrgetHtmCheckpointPtr () override
 
void setHtmCheckpointPtr (BaseHTMCheckpointPtr new_cpt) 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...
 
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
bool getUseForClone ()
 
void setUseForClone (bool new_val)
 
virtual ~ThreadContext ()
 
void quiesce ()
 Quiesce thread context. More...
 
void quiesceTick (Tick resume)
 Quiesce, suspend, and schedule activate at resume. More...
 
virtual void regStats (const std::string &name)
 
void setNPC (Addr val)
 
virtual int exit ()
 

Public Attributes

PCEventQueue pcEventQueue
 
EventQueue comInstEventQueue
 An instruction-based event queue. More...
 
Systemsystem
 
BaseMMUmmu
 
TheISA::Decoder decoder
 
int64_t htmTransactionStarts
 
int64_t htmTransactionStops
 
- Public Attributes inherited from ThreadState
Counter numInst
 Number of instructions committed. More...
 
Counter numOp
 Number of ops (including micro ops) committed. More...
 
ThreadState::ThreadStateStats threadStats
 
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...
 
Counter funcExeInst
 
unsigned storeCondFailures
 
- Public Attributes inherited from ThreadContext
int intResult = DefaultIntResult
 
double floatResult = DefaultFloatResult
 
int intOffset = 0
 

Protected Attributes

std::array< RegVal, TheISA::NumFloatRegs > floatRegs
 
std::array< RegVal, TheISA::NumIntRegs > intRegs
 
std::array< TheISA::VecRegContainer, TheISA::NumVecRegs > vecRegs
 
std::array< TheISA::VecPredRegContainer, TheISA::NumVecPredRegs > vecPredRegs
 
std::array< RegVal, TheISA::NumCCRegs > ccRegs
 
TheISA::ISA *const isa
 
TheISA::PCState _pcState
 
std::unique_ptr< BaseHTMCheckpoint_htmCheckpoint
 
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...
 
- Protected Attributes inherited from ThreadContext
bool useForClone = false
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 Serializes all the SimObjects. More...
 
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 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 90 of file simple_thread.hh.

Member Typedef Documentation

◆ Status

Definition at line 93 of file simple_thread.hh.

Constructor & Destructor Documentation

◆ SimpleThread() [1/2]

SimpleThread::SimpleThread ( BaseCPU _cpu,
int  _thread_num,
System _system,
BaseMMU _mmu,
BaseISA _isa 
)

Definition at line 80 of file simple_thread.cc.

References clearArchRegs(), and isa.

◆ SimpleThread() [2/2]

SimpleThread::SimpleThread ( BaseCPU _cpu,
int  _thread_num,
System _system,
Process _process,
BaseMMU _mmu,
BaseISA _isa 
)

Definition at line 66 of file simple_thread.cc.

References clearArchRegs(), and isa.

◆ ~SimpleThread()

virtual SimpleThread::~SimpleThread ( )
inlinevirtual

Definition at line 147 of file simple_thread.hh.

Member Function Documentation

◆ activate()

void SimpleThread::activate ( )
overridevirtual

◆ clearArchRegs()

void SimpleThread::clearArchRegs ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 253 of file simple_thread.hh.

References _pcState, ccRegs, floatRegs, intRegs, isa, vecPredRegs, and vecRegs.

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 169 of file simple_thread.cc.

References ArmISA::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 198 of file simple_thread.hh.

References ThreadState::cpuId().

◆ demapPage()

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

Definition at line 168 of file simple_thread.hh.

References BaseMMU::demapPage(), mmu, and MipsISA::vaddr.

Referenced by SimpleExecContext::demapPage().

◆ descheduleInstCountEvent()

void SimpleThread::descheduleInstCountEvent ( Event event)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 186 of file simple_thread.hh.

References comInstEventQueue, EventQueue::deschedule(), and MipsISA::event.

◆ flattenRegId()

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

Implements ThreadContext.

Definition at line 545 of file simple_thread.hh.

References isa.

◆ getCheckerCpuPtr()

CheckerCPU* SimpleThread::getCheckerCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 207 of file simple_thread.hh.

◆ getCpuPtr()

BaseCPU* SimpleThread::getCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 196 of file simple_thread.hh.

References ThreadState::baseCpu.

◆ getCurrentInstCount()

Tick SimpleThread::getCurrentInstCount ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 191 of file simple_thread.hh.

References comInstEventQueue, and EventQueue::getCurTick().

◆ getDecoderPtr()

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

Implements ThreadContext.

Definition at line 211 of file simple_thread.hh.

References decoder.

◆ getHtmCheckpointPtr()

BaseHTMCheckpointPtr & SimpleThread::getHtmCheckpointPtr ( )
overridevirtual

Implements ThreadContext.

Definition at line 189 of file simple_thread.cc.

References _htmCheckpoint.

◆ getIsaPtr()

BaseISA* SimpleThread::getIsaPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 209 of file simple_thread.hh.

References isa.

◆ getMMUPtr()

BaseMMU* SimpleThread::getMMUPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 205 of file simple_thread.hh.

References mmu.

Referenced by Minor::ExecContext::demapPage().

◆ getPhysProxy()

PortProxy& SimpleThread::getPhysProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 215 of file simple_thread.hh.

References ThreadState::getPhysProxy().

◆ getProcessPtr()

Process* SimpleThread::getProcessPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 223 of file simple_thread.hh.

References ThreadState::getProcessPtr().

◆ getSystemPtr()

System* SimpleThread::getSystemPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 213 of file simple_thread.hh.

References system.

◆ getTC()

ThreadContext* SimpleThread::getTC ( )
inline

◆ getVirtProxy()

PortProxy& SimpleThread::getVirtProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 216 of file simple_thread.hh.

References ThreadState::getVirtProxy().

◆ getWritableVecPredReg()

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

◆ getWritableVecPredRegFlat()

TheISA::VecPredRegContainer& SimpleThread::getWritableVecPredRegFlat ( RegIndex  reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 646 of file simple_thread.hh.

References X86ISA::reg, and vecPredRegs.

Referenced by getWritableVecPredReg().

◆ getWritableVecReg()

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

◆ getWritableVecRegFlat()

TheISA::VecRegContainer& SimpleThread::getWritableVecRegFlat ( RegIndex  reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 601 of file simple_thread.hh.

References X86ISA::reg, and vecRegs.

Referenced by getWritableVecReg().

◆ halt()

void SimpleThread::halt ( )
overridevirtual

◆ htmAbortTransaction()

void SimpleThread::htmAbortTransaction ( uint64_t  htm_uid,
HtmFailureFaultCause  cause 
)
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 218 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 116 of file simple_thread.hh.

References ThreadState::baseCpu, csprintf(), SimObject::name(), and threadId().

◆ nextInstAddr()

Addr SimpleThread::nextInstAddr ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 515 of file simple_thread.hh.

References _pcState.

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 506 of file simple_thread.hh.

References _pcState, and X86ISA::val.

◆ pcStateNoRecord()

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

Implements ThreadContext.

Definition at line 509 of file simple_thread.hh.

References _pcState, and X86ISA::val.

◆ readCCReg()

RegVal SimpleThread::readCCReg ( RegIndex  reg_idx) const
inlineoverridevirtual

◆ readCCRegFlat()

RegVal SimpleThread::readCCRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 658 of file simple_thread.hh.

References ccRegs.

Referenced by readCCReg().

◆ readFloatReg()

RegVal SimpleThread::readFloatReg ( RegIndex  reg_idx) const
inlineoverridevirtual

◆ readFloatRegFlat()

RegVal SimpleThread::readFloatRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 584 of file simple_thread.hh.

References floatRegs.

Referenced by readFloatReg().

◆ readFuncExeInst()

Counter SimpleThread::readFuncExeInst ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 571 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 576 of file simple_thread.hh.

References intRegs.

Referenced by readIntReg().

◆ readLastActivate()

Tick SimpleThread::readLastActivate ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 240 of file simple_thread.hh.

References ThreadState::readLastActivate().

◆ readLastSuspend()

Tick SimpleThread::readLastSuspend ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 245 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

Implements ThreadContext.

Definition at line 521 of file simple_thread.hh.

References isa.

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

◆ 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 337 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 344 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 351 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 330 of file simple_thread.hh.

References X86ISA::reg.

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

◆ readVecElem()

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

◆ readVecElemFlat()

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

Implements ThreadContext.

Definition at line 627 of file simple_thread.hh.

References X86ISA::reg, and vecRegs.

Referenced by readVecElem().

◆ 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 318 of file simple_thread.hh.

References DPRINTF, isa, ArmISA::NumVecRegs, and X86ISA::reg.

Referenced by SimpleExecContext::readVecLaneOperand().

◆ readVecLaneFlat()

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

Definition at line 614 of file simple_thread.hh.

References X86ISA::reg, and vecRegs.

◆ readVecPredReg()

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

◆ readVecPredRegFlat()

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

Implements ThreadContext.

Definition at line 640 of file simple_thread.hh.

References X86ISA::reg, and vecPredRegs.

Referenced by readVecPredReg().

◆ readVecReg()

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

◆ readVecRegFlat()

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

Implements ThreadContext.

Definition at line 595 of file simple_thread.hh.

References X86ISA::reg, and vecRegs.

Referenced by readVecReg().

◆ remove()

bool SimpleThread::remove ( PCEvent e)
inlineoverridevirtual

Implements PCEventScope.

Definition at line 178 of file simple_thread.hh.

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

◆ schedule()

bool SimpleThread::schedule ( PCEvent e)
inlineoverridevirtual

Implements PCEventScope.

Definition at line 177 of file simple_thread.hh.

References ArmISA::e, pcEventQueue, and PCEventQueue::schedule().

◆ scheduleInstCountEvent()

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

Implements ThreadContext.

Definition at line 181 of file simple_thread.hh.

References comInstEventQueue, X86ISA::count, MipsISA::event, and 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 120 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 659 of file simple_thread.hh.

References ccRegs, and X86ISA::val.

Referenced by setCCReg().

◆ setContextId()

void SimpleThread::setContextId ( ContextID  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 203 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 589 of file simple_thread.hh.

References floatRegs, and X86ISA::val.

Referenced by setFloatReg().

◆ setHtmCheckpointPtr()

void SimpleThread::setHtmCheckpointPtr ( BaseHTMCheckpointPtr  new_cpt)
overridevirtual

Implements ThreadContext.

Definition at line 195 of file simple_thread.cc.

References _htmCheckpoint.

◆ setIntReg()

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

◆ setIntRegFlat()

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

Implements ThreadContext.

Definition at line 578 of file simple_thread.hh.

References intRegs, and X86ISA::val.

Referenced by setIntReg().

◆ 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

Implements ThreadContext.

Definition at line 533 of file simple_thread.hh.

References isa, and X86ISA::val.

Referenced by CheckerThreadContext< TC >::setMiscRegNoEffect(), and CheckerCPU::setMiscRegNoEffect().

◆ setPredicate()

void SimpleThread::setPredicate ( bool  val)
inline

◆ setProcessPtr()

void SimpleThread::setProcessPtr ( Process p)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 224 of file simple_thread.hh.

References MipsISA::p, and ThreadState::setProcessPtr().

◆ setStatus()

void SimpleThread::setStatus ( Status  newStatus)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 228 of file simple_thread.hh.

References ThreadState::_status.

Referenced by MinorCPU::MinorCPU(), and CheckerThreadContext< TC >::setStatus().

◆ setStCondFailures()

void SimpleThread::setStCondFailures ( unsigned  sc_failures)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 565 of file simple_thread.hh.

References ThreadState::storeCondFailures.

Referenced by SimpleExecContext::setStCondFailures().

◆ setThreadId()

void SimpleThread::setThreadId ( int  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 201 of file simple_thread.hh.

References ThreadState::setThreadId().

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

◆ setVecElem()

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

◆ setVecElemFlat()

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

Implements ThreadContext.

Definition at line 633 of file simple_thread.hh.

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

Referenced by setVecElem().

◆ 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 368 of file simple_thread.hh.

References X86ISA::reg, setVecLaneT(), and X86ISA::val.

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

◆ setVecLane() [2/4]

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

Implements ThreadContext.

Definition at line 385 of file simple_thread.hh.

References X86ISA::reg, setVecLaneT(), and X86ISA::val.

◆ setVecLane() [3/4]

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

Implements ThreadContext.

Definition at line 379 of file simple_thread.hh.

References X86ISA::reg, setVecLaneT(), and X86ISA::val.

◆ setVecLane() [4/4]

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

Implements ThreadContext.

Definition at line 373 of file simple_thread.hh.

References X86ISA::reg, setVecLaneT(), and X86ISA::val.

◆ setVecLaneFlat()

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

Definition at line 621 of file simple_thread.hh.

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

Referenced by setVecLaneT().

◆ 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 359 of file simple_thread.hh.

References DPRINTF, isa, ArmISA::NumVecRegs, X86ISA::reg, setVecLaneFlat(), and X86ISA::val.

Referenced by setVecLane().

◆ setVecPredReg()

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

◆ setVecPredRegFlat()

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

Implements ThreadContext.

Definition at line 652 of file simple_thread.hh.

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

Referenced by setVecPredReg().

◆ setVecReg()

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

◆ setVecRegFlat()

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

Implements ThreadContext.

Definition at line 607 of file simple_thread.hh.

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

Referenced by setVecReg().

◆ socketId()

uint32_t SimpleThread::socketId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 199 of file simple_thread.hh.

References ThreadState::socketId().

◆ status()

Status SimpleThread::status ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 226 of file simple_thread.hh.

References ThreadState::_status.

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

◆ suspend()

void SimpleThread::suspend ( )
overridevirtual

◆ 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 128 of file simple_thread.cc.

References ThreadState::unserialize().

Referenced by BaseKvmCPU::unserializeThread().

Member Data Documentation

◆ _htmCheckpoint

std::unique_ptr<BaseHTMCheckpoint> SimpleThread::_htmCheckpoint
protected

Definition at line 107 of file simple_thread.hh.

Referenced by getHtmCheckpointPtr(), and setHtmCheckpointPtr().

◆ _pcState

TheISA::PCState SimpleThread::_pcState
protected

◆ ccRegs

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

Definition at line 101 of file simple_thread.hh.

Referenced by clearArchRegs(), readCCRegFlat(), and setCCRegFlat().

◆ comInstEventQueue

EventQueue SimpleThread::comInstEventQueue

An instruction-based event queue.

Used for scheduling events based on number of instructions committed.

Definition at line 126 of file simple_thread.hh.

Referenced by descheduleInstCountEvent(), Minor::Execute::doInstCommitAccounting(), getCurrentInstCount(), BaseSimpleCPU::preExecute(), scheduleInstCountEvent(), BaseKvmCPU::setupInstStop(), and BaseKvmCPU::tick().

◆ decoder

TheISA::Decoder SimpleThread::decoder

◆ floatRegs

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

Definition at line 96 of file simple_thread.hh.

Referenced by clearArchRegs(), readFloatRegFlat(), and setFloatRegFlat().

◆ htmTransactionStarts

int64_t SimpleThread::htmTransactionStarts

◆ htmTransactionStops

int64_t SimpleThread::htmTransactionStops

◆ intRegs

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

Definition at line 97 of file simple_thread.hh.

Referenced by clearArchRegs(), readIntRegFlat(), and setIntRegFlat().

◆ isa

TheISA::ISA* const SimpleThread::isa
protected

◆ memAccPredicate

bool SimpleThread::memAccPredicate
protected

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

Definition at line 113 of file simple_thread.hh.

Referenced by readMemAccPredicate(), and setMemAccPredicate().

◆ mmu

BaseMMU* SimpleThread::mmu

◆ pcEventQueue

PCEventQueue SimpleThread::pcEventQueue

Definition at line 121 of file simple_thread.hh.

Referenced by remove(), and schedule().

◆ predicate

bool SimpleThread::predicate
protected

Did this instruction execute or is it predicated false.

Definition at line 110 of file simple_thread.hh.

Referenced by readPredicate(), and setPredicate().

◆ system

System* SimpleThread::system

Definition at line 128 of file simple_thread.hh.

Referenced by getSystemPtr().

◆ vecPredRegs

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

◆ vecRegs

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

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

Generated on Tue Jun 22 2021 15:28:44 for gem5 by doxygen 1.8.17