gem5  v20.1.0.0
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, BaseISA *_isa)
 
 SimpleThread (BaseCPU *_cpu, int _thread_num, System *_system, Process *_process, BaseTLB *_itb, BaseTLB *_dtb, 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)
 
void demapInstPage (Addr vaddr, uint64_t asn)
 
void demapDataPage (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
 
BaseTLBgetITBPtr () override
 
BaseTLBgetDTBPtr () 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 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 () 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
 
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
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
 
BaseTLBitb
 
BaseTLBdtb
 
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 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
 
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...
 

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

Member Typedef Documentation

◆ MachInst

typedef TheISA::MachInst SimpleThread::MachInst
protected

Definition at line 92 of file simple_thread.hh.

◆ Status

Definition at line 97 of file simple_thread.hh.

◆ VecElem

using SimpleThread::VecElem = TheISA::VecElem
protected

Definition at line 94 of file simple_thread.hh.

◆ VecPredRegContainer

using SimpleThread::VecPredRegContainer = TheISA::VecPredRegContainer
protected

Definition at line 95 of file simple_thread.hh.

◆ VecRegContainer

using SimpleThread::VecRegContainer = TheISA::VecRegContainer
protected

Definition at line 93 of file simple_thread.hh.

Constructor & Destructor Documentation

◆ SimpleThread() [1/2]

SimpleThread::SimpleThread ( BaseCPU _cpu,
int  _thread_num,
System _system,
BaseTLB _itb,
BaseTLB _dtb,
BaseISA _isa 
)

Definition at line 82 of file simple_thread.cc.

References clearArchRegs(), and isa.

◆ SimpleThread() [2/2]

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

Definition at line 68 of file simple_thread.cc.

References clearArchRegs(), and isa.

◆ ~SimpleThread()

virtual SimpleThread::~SimpleThread ( )
inlinevirtual

Definition at line 151 of file simple_thread.hh.

Member Function Documentation

◆ activate()

void SimpleThread::activate ( )
overridevirtual

◆ clearArchRegs()

void SimpleThread::clearArchRegs ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 269 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 171 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 212 of file simple_thread.hh.

References ThreadState::cpuId().

◆ demapDataPage()

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

Definition at line 182 of file simple_thread.hh.

References BaseTLB::demapPage(), dtb, and MipsISA::vaddr.

◆ demapInstPage()

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

Definition at line 177 of file simple_thread.hh.

References BaseTLB::demapPage(), itb, and MipsISA::vaddr.

◆ demapPage()

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

Definition at line 171 of file simple_thread.hh.

References BaseTLB::demapPage(), dtb, itb, and MipsISA::vaddr.

Referenced by SimpleExecContext::demapPage().

◆ descheduleInstCountEvent()

void SimpleThread::descheduleInstCountEvent ( Event event)
inlineoverridevirtual

Implements ThreadContext.

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

References isa.

◆ getCheckerCpuPtr()

CheckerCPU* SimpleThread::getCheckerCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 223 of file simple_thread.hh.

◆ getCpuPtr()

BaseCPU* SimpleThread::getCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 210 of file simple_thread.hh.

References ThreadState::baseCpu.

◆ getCurrentInstCount()

Tick SimpleThread::getCurrentInstCount ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 205 of file simple_thread.hh.

References comInstEventQueue, and EventQueue::getCurTick().

◆ getDecoderPtr()

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

Implements ThreadContext.

Definition at line 227 of file simple_thread.hh.

References decoder.

◆ getDTBPtr()

BaseTLB* SimpleThread::getDTBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 221 of file simple_thread.hh.

References dtb.

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

◆ getHtmCheckpointPtr()

BaseHTMCheckpointPtr & SimpleThread::getHtmCheckpointPtr ( )
overridevirtual

Implements ThreadContext.

Definition at line 191 of file simple_thread.cc.

References _htmCheckpoint.

◆ getIsaPtr()

BaseISA* SimpleThread::getIsaPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 225 of file simple_thread.hh.

References isa.

◆ getITBPtr()

BaseTLB* SimpleThread::getITBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 219 of file simple_thread.hh.

References itb.

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

◆ getPhysProxy()

PortProxy& SimpleThread::getPhysProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 231 of file simple_thread.hh.

References ThreadState::getPhysProxy().

◆ getProcessPtr()

Process* SimpleThread::getProcessPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 239 of file simple_thread.hh.

References ThreadState::getProcessPtr().

◆ getSystemPtr()

System* SimpleThread::getSystemPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 229 of file simple_thread.hh.

References system.

◆ getTC()

ThreadContext* SimpleThread::getTC ( )
inline

◆ getVirtProxy()

PortProxy& SimpleThread::getVirtProxy ( )
inlineoverridevirtual

Implements ThreadContext.

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

References X86ISA::reg, and vecPredRegs.

Referenced by getWritableVecPredReg().

◆ getWritableVecReg()

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

◆ getWritableVecRegFlat()

VecRegContainer& SimpleThread::getWritableVecRegFlat ( RegIndex  reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 615 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 234 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 119 of file simple_thread.hh.

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

◆ nextInstAddr()

Addr SimpleThread::nextInstAddr ( ) const
inlineoverridevirtual

Implements ThreadContext.

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

References _pcState, and X86ISA::val.

◆ pcStateNoRecord()

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

Implements ThreadContext.

Definition at line 521 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 671 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 598 of file simple_thread.hh.

References floatRegs.

Referenced by readFloatReg().

◆ readFuncExeInst()

Counter SimpleThread::readFuncExeInst ( ) const
inlineoverridevirtual

Implements ThreadContext.

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

References intRegs.

Referenced by readIntReg().

◆ readLastActivate()

Tick SimpleThread::readLastActivate ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 256 of file simple_thread.hh.

References ThreadState::readLastActivate().

◆ readLastSuspend()

Tick SimpleThread::readLastSuspend ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 261 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 533 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 353 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 360 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 367 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 346 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 641 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 334 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 628 of file simple_thread.hh.

References X86ISA::reg, and vecRegs.

◆ readVecPredReg()

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

◆ readVecPredRegFlat()

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

Implements ThreadContext.

Definition at line 654 of file simple_thread.hh.

References X86ISA::reg, and vecPredRegs.

Referenced by readVecPredReg().

◆ readVecReg()

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

◆ readVecRegFlat()

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

Implements ThreadContext.

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

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

◆ schedule()

bool SimpleThread::schedule ( PCEvent e)
inlineoverridevirtual

Implements PCEventScope.

Definition at line 191 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 195 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 122 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 672 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 217 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 603 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 197 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 592 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 545 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 240 of file simple_thread.hh.

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

◆ setStatus()

void SimpleThread::setStatus ( Status  newStatus)
inlineoverridevirtual

Implements ThreadContext.

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

References ThreadState::storeCondFailures.

Referenced by SimpleExecContext::setStCondFailures().

◆ setThreadId()

void SimpleThread::setThreadId ( int  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 215 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 647 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 384 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 401 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 395 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 389 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 635 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 375 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 VecPredRegContainer val 
)
inlineoverridevirtual

◆ setVecPredRegFlat()

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

Implements ThreadContext.

Definition at line 666 of file simple_thread.hh.

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

Referenced by setVecPredReg().

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

References ThreadState::socketId().

◆ status()

Status SimpleThread::status ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 242 of file simple_thread.hh.

References ThreadState::_status.

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

◆ suspend()

void SimpleThread::suspend ( )
overridevirtual

◆ syscall()

void SimpleThread::syscall ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 588 of file simple_thread.hh.

References ThreadState::process, and Process::syscall().

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 130 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 110 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 104 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 129 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

◆ dtb

BaseTLB* SimpleThread::dtb

◆ floatRegs

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

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

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

◆ isa

TheISA::ISA* const SimpleThread::isa
protected

◆ itb

BaseTLB* SimpleThread::itb

◆ memAccPredicate

bool SimpleThread::memAccPredicate
protected

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

Definition at line 116 of file simple_thread.hh.

Referenced by readMemAccPredicate(), and setMemAccPredicate().

◆ pcEventQueue

PCEventQueue SimpleThread::pcEventQueue

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

Referenced by readPredicate(), and setPredicate().

◆ system

System* SimpleThread::system

Definition at line 131 of file simple_thread.hh.

Referenced by getSystemPtr().

◆ vecPredRegs

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

◆ vecRegs

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

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

Generated on Wed Sep 30 2020 14:02:31 for gem5 by doxygen 1.8.17