gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Iris::ThreadContext Class Referenceabstract

#include <thread_context.hh>

Inheritance diagram for Iris::ThreadContext:
ThreadContext PCEventScope FastModel::CortexA76TC

Classes

struct  BpInfo
 

Public Types

typedef std::map< std::string, iris::ResourceInfo > ResourceMap
 
typedef std::vector< iris::ResourceId > ResourceIds
 
typedef std::map< int, std::string > IdxNameMap
 
- Public Types inherited from ThreadContext
enum  Status { Active, Suspended, Halting, Halted }
 

Public Member Functions

 ThreadContext (::BaseCPU *cpu, int id, System *system, ::BaseTLB *dtb, ::BaseTLB *itb, ::BaseISA *isa, iris::IrisConnectionInterface *iris_if, const std::string &iris_path)
 
virtual ~ThreadContext ()
 
virtual bool translateAddress (Addr &paddr, Addr vaddr)=0
 
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
 
int contextId () const override
 
void setContextId (int id) override
 
BaseTLBgetITBPtr () override
 
BaseTLBgetDTBPtr () override
 
CheckerCPUgetCheckerCpuPtr () override
 
ArmISA::DecodergetDecoderPtr () override
 
SystemgetSystemPtr () override
 
BaseISAgetIsaPtr () override
 
PortProxygetPhysProxy () override
 
PortProxygetVirtProxy () override
 
void initMemProxies (::ThreadContext *tc) override
 
ProcessgetProcessPtr () override
 
void setProcessPtr (Process *p) override
 
Status status () const override
 
void setStatus (Status new_status) 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...
 
void takeOverFrom (::ThreadContext *old_context) override
 
void regStats (const std::string &name) override
 
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
 
void pcStateNoRecord (const ArmISA::PCState &val) override
 
MicroPC microPC () const override
 
ArmISA::PCState pcState () const override
 
void pcState (const ArmISA::PCState &val) override
 
Addr instAddr () const override
 
Addr nextInstAddr () const override
 
RegVal readMiscRegNoEffect (RegIndex misc_reg) const override
 
RegVal readMiscReg (RegIndex misc_reg) override
 
void setMiscRegNoEffect (RegIndex misc_reg, const RegVal val) override
 
void setMiscReg (RegIndex misc_reg, const RegVal val) override
 
RegId flattenRegId (const RegId &regId) const override
 
unsigned readStCondFailures () const override
 
void setStCondFailures (unsigned sc_failures) override
 
Counter readFuncExeInst () const override
 
void htmAbortTransaction (uint64_t htm_uid, HtmFailureFaultCause cause) override
 
BaseHTMCheckpointPtrgetHtmCheckpointPtr () override
 
void setHtmCheckpointPtr (BaseHTMCheckpointPtr cpt) override
 
ConstVecLane8 readVec8BitLaneReg (const RegId &reg) const override
 Vector Register Lane Interfaces. More...
 
ConstVecLane16 readVec16BitLaneReg (const RegId &reg) const override
 Reads source vector 16bit operand. More...
 
ConstVecLane32 readVec32BitLaneReg (const RegId &reg) const override
 Reads source vector 32bit operand. More...
 
ConstVecLane64 readVec64BitLaneReg (const RegId &reg) const override
 Reads source vector 64bit operand. More...
 
void setVecLane (const RegId &reg, const LaneData< LaneSize::Byte > &val) override
 Write a lane of the destination vector register. More...
 
void setVecLane (const RegId &reg, const LaneData< LaneSize::TwoByte > &val) override
 
void setVecLane (const RegId &reg, const LaneData< LaneSize::FourByte > &val) override
 
void setVecLane (const RegId &reg, const LaneData< LaneSize::EightByte > &val) override
 
RegVal readIntRegFlat (RegIndex idx) const override
 Flat register interfaces. More...
 
void setIntRegFlat (RegIndex idx, uint64_t val) override
 
RegVal readFloatRegFlat (RegIndex idx) const override
 
void setFloatRegFlat (RegIndex idx, RegVal val) override
 
const VecRegContainerreadVecRegFlat (RegIndex idx) const override
 
VecRegContainergetWritableVecRegFlat (RegIndex idx) override
 
void setVecRegFlat (RegIndex idx, const VecRegContainer &val) override
 
const VecElemreadVecElemFlat (RegIndex idx, const ElemIndex &elemIdx) const override
 
void setVecElemFlat (RegIndex idx, const ElemIndex &elemIdx, const VecElem &val) override
 
const VecPredRegContainerreadVecPredRegFlat (RegIndex idx) const override
 
VecPredRegContainergetWritableVecPredRegFlat (RegIndex idx) override
 
void setVecPredRegFlat (RegIndex idx, const VecPredRegContainer &val) override
 
RegVal readCCRegFlat (RegIndex idx) const override
 
void setCCRegFlat (RegIndex idx, RegVal val) override
 
- Public Member Functions inherited from ThreadContext
virtual void initMemProxies (ThreadContext *tc)=0
 Initialise the physical and virtual port proxies and tie them to the data port of the CPU. More...
 
void quiesce ()
 Quiesce thread context. More...
 
void quiesceTick (Tick resume)
 Quiesce, suspend, and schedule activate at resume. More...
 
virtual void takeOverFrom (ThreadContext *old_context)=0
 
virtual void copyArchRegs (ThreadContext *tc)=0
 
virtual void pcState (const TheISA::PCState &val)=0
 
void setNPC (Addr val)
 
virtual void pcStateNoRecord (const TheISA::PCState &val)=0
 
virtual void syscall ()=0
 
virtual int exit ()
 

Protected Types

using BpId = uint64_t
 
using BpInfoPtr = std::unique_ptr< BpInfo >
 
using BpInfoMap = std::map< Addr, BpInfoPtr >
 
using BpInfoIt = BpInfoMap::iterator
 
- Protected Types inherited from ThreadContext
typedef TheISA::MachInst MachInst
 
using VecRegContainer = TheISA::VecRegContainer
 
using VecElem = TheISA::VecElem
 
using VecPredRegContainer = TheISA::VecPredRegContainer
 

Protected Member Functions

virtual void initFromIrisInstance (const ResourceMap &resources)
 
iris::ResourceId extractResourceId (const ResourceMap &resources, const std::string &name)
 
void extractResourceMap (ResourceIds &ids, const ResourceMap &resources, const IdxNameMap &idx_names)
 
void maintainStepping ()
 
BpInfoIt getOrAllocBp (Addr pc)
 
void installBp (BpInfoIt it)
 
void uninstallBp (BpInfoIt it)
 
void delBp (BpInfoIt it)
 
virtual const std::vector< iris::MemorySpaceId > & getBpSpaceIds () const =0
 
iris::IrisErrorCode instanceRegistryChanged (uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
 
iris::IrisErrorCode phaseInitLeave (uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
 
iris::IrisErrorCode simulationTimeEvent (uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
 
iris::IrisErrorCode breakpointHit (uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
 
iris::IrisErrorCode semihostingEvent (uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
 
iris::IrisCppAdapter & call () const
 
iris::IrisCppAdapter & noThrow () const
 
bool translateAddress (Addr &paddr, iris::MemorySpaceId p_space, Addr vaddr, iris::MemorySpaceId v_space)
 

Protected Attributes

::BaseCPU_cpu
 
int _threadId
 
ContextID _contextId
 
System_system
 
::BaseTLB_dtb
 
::BaseTLB_itb
 
::BaseISA_isa
 
std::string _irisPath
 
iris::InstanceId _instId = iris::IRIS_UINT64_MAX
 
std::vector< ArmISA::VecRegContainervecRegs
 
std::vector< ArmISA::VecPredRegContainervecPredRegs
 
Status _status = Active
 
EventenableAfterPseudoEvent
 
ResourceIds miscRegIds
 
ResourceIds intReg32Ids
 
ResourceIds intReg64Ids
 
ResourceIds flattenedIntIds
 
ResourceIds ccRegIds
 
iris::ResourceId pcRscId = iris::IRIS_UINT64_MAX
 
iris::ResourceId icountRscId
 
ResourceIds vecRegIds
 
ResourceIds vecPredRegIds
 
std::vector< iris::MemorySpaceInfo > memorySpaces
 
std::vector< iris::MemorySupportedAddressTranslationResult > translations
 
std::unique_ptr< PortProxyvirtProxy = nullptr
 
std::unique_ptr< PortProxyphysProxy = nullptr
 
EventQueue comInstEventQueue
 
BpInfoMap bps
 
iris::EventStreamId regEventStreamId
 
iris::EventStreamId initEventStreamId
 
iris::EventStreamId timeEventStreamId
 
iris::EventStreamId breakpointEventStreamId
 
iris::EventStreamId semihostingEventStreamId
 
iris::IrisInstance client
 

Additional Inherited Members

- Static Public Member Functions inherited from ThreadContext
static void compare (ThreadContext *one, ThreadContext *two)
 function to compare two thread contexts (for debugging) More...
 
- Public Attributes inherited from ThreadContext
int intResult = DefaultIntResult
 
double floatResult = DefaultFloatResult
 
int intOffset = 0
 
- 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

Definition at line 47 of file thread_context.hh.

Member Typedef Documentation

◆ BpId

using Iris::ThreadContext::BpId = uint64_t
protected

Definition at line 110 of file thread_context.hh.

◆ BpInfoIt

using Iris::ThreadContext::BpInfoIt = BpInfoMap::iterator
protected

Definition at line 127 of file thread_context.hh.

◆ BpInfoMap

using Iris::ThreadContext::BpInfoMap = std::map<Addr, BpInfoPtr>
protected

Definition at line 126 of file thread_context.hh.

◆ BpInfoPtr

using Iris::ThreadContext::BpInfoPtr = std::unique_ptr<BpInfo>
protected

Definition at line 125 of file thread_context.hh.

◆ IdxNameMap

typedef std::map<int, std::string> Iris::ThreadContext::IdxNameMap

Definition at line 53 of file thread_context.hh.

◆ ResourceIds

typedef std::vector<iris::ResourceId> Iris::ThreadContext::ResourceIds

Definition at line 52 of file thread_context.hh.

◆ ResourceMap

typedef std::map<std::string, iris::ResourceInfo> Iris::ThreadContext::ResourceMap

Definition at line 50 of file thread_context.hh.

Constructor & Destructor Documentation

◆ ThreadContext()

ThreadContext::ThreadContext ( ::BaseCPU cpu,
int  id,
System system,
::BaseTLB dtb,
::BaseTLB itb,
::BaseISA isa,
iris::IrisConnectionInterface *  iris_if,
const std::string &  iris_path 
)

◆ ~ThreadContext()

ThreadContext::~ThreadContext ( )
virtual

Member Function Documentation

◆ activate()

void Iris::ThreadContext::activate ( )
inlineoverridevirtual

Set the status to Active.

Implements ThreadContext.

Definition at line 237 of file thread_context.hh.

References ThreadContext::Active, and setStatus().

◆ breakpointHit()

iris::IrisErrorCode ThreadContext::breakpointHit ( uint64_t  esId,
const iris::IrisValueMap &  fields,
uint64_t  time,
uint64_t  sInstId,
bool  syncEc,
std::string &  error_message_out 
)
protected

Definition at line 264 of file thread_context.cc.

References ArmISA::e, getOrAllocBp(), and MipsISA::pc.

◆ call()

iris::IrisCppAdapter& Iris::ThreadContext::call ( ) const
inlineprotected

◆ clearArchRegs()

void Iris::ThreadContext::clearArchRegs ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 268 of file thread_context.hh.

References warn.

◆ contextId()

int Iris::ThreadContext::contextId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 192 of file thread_context.hh.

References _contextId.

◆ copyArchRegs()

void Iris::ThreadContext::copyArchRegs ( ::ThreadContext tc)
inlineoverride

Definition at line 262 of file thread_context.hh.

References panic.

◆ cpuId()

int Iris::ThreadContext::cpuId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 186 of file thread_context.hh.

References _cpu, and BaseCPU::cpuId().

◆ delBp()

void ThreadContext::delBp ( BpInfoIt  it)
protected

Definition at line 178 of file thread_context.cc.

References bps, panic_if, and uninstallBp().

Referenced by remove().

◆ descheduleInstCountEvent()

void ThreadContext::descheduleInstCountEvent ( Event event)
overridevirtual

◆ extractResourceId()

iris::ResourceId ThreadContext::extractResourceId ( const ResourceMap resources,
const std::string &  name 
)
protected

Definition at line 93 of file thread_context.cc.

References name().

Referenced by extractResourceMap(), and FastModel::CortexA76TC::initFromIrisInstance().

◆ extractResourceMap()

void ThreadContext::extractResourceMap ( ResourceIds ids,
const ResourceMap resources,
const IdxNameMap idx_names 
)
protected

Definition at line 100 of file thread_context.cc.

References extractResourceId(), ArmISA::ids, and name().

Referenced by FastModel::CortexA76TC::initFromIrisInstance().

◆ flattenRegId()

RegId Iris::ThreadContext::flattenRegId ( const RegId regId) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 422 of file thread_context.hh.

References panic.

◆ getBpSpaceIds()

virtual const std::vector<iris::MemorySpaceId>& Iris::ThreadContext::getBpSpaceIds ( ) const
protectedpure virtual

Implemented in FastModel::CortexA76TC.

Referenced by installBp().

◆ getCheckerCpuPtr()

CheckerCPU* Iris::ThreadContext::getCheckerCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 205 of file thread_context.hh.

◆ getCpuPtr()

::BaseCPU* Iris::ThreadContext::getCpuPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 185 of file thread_context.hh.

References _cpu.

Referenced by semihostingEvent(), setStatus(), and ~ThreadContext().

◆ getCurrentInstCount()

Tick ThreadContext::getCurrentInstCount ( )
overridevirtual

Implements ThreadContext.

Definition at line 468 of file thread_context.cc.

References _instId, call(), X86ISA::count, and panic_if.

Referenced by maintainStepping(), and scheduleInstCountEvent().

◆ getDecoderPtr()

ArmISA::Decoder* Iris::ThreadContext::getDecoderPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 207 of file thread_context.hh.

References panic.

◆ getDTBPtr()

BaseTLB* Iris::ThreadContext::getDTBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 201 of file thread_context.hh.

References _dtb.

◆ getHtmCheckpointPtr()

BaseHTMCheckpointPtr& Iris::ThreadContext::getHtmCheckpointPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 522 of file thread_context.hh.

References panic.

◆ getIsaPtr()

BaseISA* Iris::ThreadContext::getIsaPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 215 of file thread_context.hh.

References _isa.

◆ getITBPtr()

BaseTLB* Iris::ThreadContext::getITBPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 196 of file thread_context.hh.

References _itb.

◆ getOrAllocBp()

ThreadContext::BpInfoIt ThreadContext::getOrAllocBp ( Addr  pc)
protected

Definition at line 145 of file thread_context.cc.

References bps, panic_if, and MipsISA::pc.

Referenced by breakpointHit(), remove(), and schedule().

◆ getPhysProxy()

PortProxy& Iris::ThreadContext::getPhysProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 220 of file thread_context.hh.

References physProxy.

◆ getProcessPtr()

Process* Iris::ThreadContext::getProcessPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 225 of file thread_context.hh.

References panic.

◆ getSystemPtr()

System* Iris::ThreadContext::getSystemPtr ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 212 of file thread_context.hh.

References _cpu, and BaseCPU::system.

◆ getVirtProxy()

PortProxy& Iris::ThreadContext::getVirtProxy ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 221 of file thread_context.hh.

References virtProxy.

◆ getWritableVecPredReg()

VecPredRegContainer& Iris::ThreadContext::getWritableVecPredReg ( const RegId reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 355 of file thread_context.hh.

References panic.

◆ getWritableVecPredRegFlat()

VecPredRegContainer& Iris::ThreadContext::getWritableVecPredRegFlat ( RegIndex  idx)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 500 of file thread_context.hh.

References panic.

◆ getWritableVecReg()

VecRegContainer& Iris::ThreadContext::getWritableVecReg ( const RegId reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 286 of file thread_context.hh.

References panic.

◆ getWritableVecRegFlat()

VecRegContainer& Iris::ThreadContext::getWritableVecRegFlat ( RegIndex  idx)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 476 of file thread_context.hh.

References panic.

◆ halt()

void Iris::ThreadContext::halt ( )
inlineoverridevirtual

Set the status to Halted.

Implements ThreadContext.

Definition at line 239 of file thread_context.hh.

References ThreadContext::Halted, and setStatus().

◆ htmAbortTransaction()

void Iris::ThreadContext::htmAbortTransaction ( uint64_t  htm_uid,
HtmFailureFaultCause  cause 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 516 of file thread_context.hh.

References panic.

◆ initFromIrisInstance()

void ThreadContext::initFromIrisInstance ( const ResourceMap resources)
protectedvirtual

◆ initMemProxies()

void ThreadContext::initMemProxies ( ::ThreadContext tc)
override

◆ instAddr()

Addr ThreadContext::instAddr ( ) const
overridevirtual

Implements ThreadContext.

Definition at line 551 of file thread_context.cc.

References pcState().

◆ installBp()

void ThreadContext::installBp ( BpInfoIt  it)
protected

Definition at line 158 of file thread_context.cc.

References _instId, call(), getBpSpaceIds(), ArmISA::id, and MipsISA::pc.

Referenced by initFromIrisInstance(), and schedule().

◆ instanceRegistryChanged()

iris::IrisErrorCode ThreadContext::instanceRegistryChanged ( uint64_t  esId,
const iris::IrisValueMap &  fields,
uint64_t  time,
uint64_t  sInstId,
bool  syncEc,
std::string &  error_message_out 
)
protected

Definition at line 190 of file thread_context.cc.

References _instId, _irisPath, MipsISA::event, ArmISA::id, name(), and panic.

◆ maintainStepping()

void ThreadContext::maintainStepping ( )
protected

◆ microPC()

MicroPC Iris::ThreadContext::microPC ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 400 of file thread_context.hh.

◆ nextInstAddr()

Addr ThreadContext::nextInstAddr ( ) const
overridevirtual

Implements ThreadContext.

Definition at line 557 of file thread_context.cc.

References pcState().

◆ noThrow()

iris::IrisCppAdapter& Iris::ThreadContext::noThrow ( ) const
inlineprotected

Definition at line 164 of file thread_context.hh.

References client.

Referenced by ThreadContext(), and translateAddress().

◆ pcState() [1/2]

ArmISA::PCState ThreadContext::pcState ( ) const
overridevirtual

◆ pcState() [2/2]

void ThreadContext::pcState ( const ArmISA::PCState &  val)
override

◆ pcStateNoRecord()

void Iris::ThreadContext::pcStateNoRecord ( const ArmISA::PCState &  val)
inlineoverride

Definition at line 399 of file thread_context.hh.

References pcState(), and X86ISA::val.

◆ phaseInitLeave()

iris::IrisErrorCode ThreadContext::phaseInitLeave ( uint64_t  esId,
const iris::IrisValueMap &  fields,
uint64_t  time,
uint64_t  sInstId,
bool  syncEc,
std::string &  error_message_out 
)
protected

Definition at line 212 of file thread_context.cc.

References _instId, call(), initFromIrisInstance(), and name().

◆ readCCReg()

RegVal Iris::ThreadContext::readCCReg ( RegIndex  reg_idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 361 of file thread_context.hh.

References readCCRegFlat().

◆ readCCRegFlat()

RegVal ThreadContext::readCCRegFlat ( RegIndex  idx) const
overridevirtual

Implements ThreadContext.

Definition at line 632 of file thread_context.cc.

References _instId, call(), and ccRegIds.

Referenced by readCCReg(), and FastModel::CortexA76TC::readCCRegFlat().

◆ readFloatReg()

RegVal Iris::ThreadContext::readFloatReg ( RegIndex  reg_idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 279 of file thread_context.hh.

References panic.

◆ readFloatRegFlat()

RegVal Iris::ThreadContext::readFloatRegFlat ( RegIndex  idx) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 464 of file thread_context.hh.

References panic.

◆ readFuncExeInst()

Counter Iris::ThreadContext::readFuncExeInst ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 443 of file thread_context.hh.

References panic.

◆ readIntReg()

RegVal ThreadContext::readIntReg ( RegIndex  reg_idx) const
overridevirtual

Implements ThreadContext.

Definition at line 578 of file thread_context.cc.

References _instId, call(), intReg32Ids, intReg64Ids, ArmISA::MISCREG_CPSR, and readMiscRegNoEffect().

Referenced by semihostingEvent().

◆ readIntRegFlat()

RegVal ThreadContext::readIntRegFlat ( RegIndex  idx) const
overridevirtual

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 607 of file thread_context.cc.

References _instId, call(), and flattenedIntIds.

◆ readLastActivate()

Tick Iris::ThreadContext::readLastActivate ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 252 of file thread_context.hh.

References panic.

◆ readLastSuspend()

Tick Iris::ThreadContext::readLastSuspend ( )
inlineoverridevirtual

Implements ThreadContext.

Definition at line 256 of file thread_context.hh.

References panic.

◆ readMiscReg()

RegVal Iris::ThreadContext::readMiscReg ( RegIndex  misc_reg)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 409 of file thread_context.hh.

References readMiscRegNoEffect().

◆ readMiscRegNoEffect()

RegVal ThreadContext::readMiscRegNoEffect ( RegIndex  misc_reg) const
overridevirtual

◆ readStCondFailures()

unsigned Iris::ThreadContext::readStCondFailures ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 430 of file thread_context.hh.

References panic.

◆ readVec16BitLaneReg()

ConstVecLane16 Iris::ThreadContext::readVec16BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 16bit operand.

Implements ThreadContext.

Definition at line 302 of file thread_context.hh.

References panic.

◆ readVec32BitLaneReg()

ConstVecLane32 Iris::ThreadContext::readVec32BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 32bit operand.

Implements ThreadContext.

Definition at line 309 of file thread_context.hh.

References panic.

◆ readVec64BitLaneReg()

ConstVecLane64 Iris::ThreadContext::readVec64BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Reads source vector 64bit operand.

Implements ThreadContext.

Definition at line 316 of file thread_context.hh.

References panic.

◆ readVec8BitLaneReg()

ConstVecLane8 Iris::ThreadContext::readVec8BitLaneReg ( const RegId reg) const
inlineoverridevirtual

Vector Register Lane Interfaces.

Reads source vector 8bit operand.

Implements ThreadContext.

Definition at line 295 of file thread_context.hh.

References panic.

◆ readVecElem()

const VecElem& Iris::ThreadContext::readVecElem ( const RegId reg) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 348 of file thread_context.hh.

References panic.

◆ readVecElemFlat()

const VecElem& Iris::ThreadContext::readVecElemFlat ( RegIndex  idx,
const ElemIndex elemIdx 
) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 487 of file thread_context.hh.

References panic.

◆ readVecPredReg()

const ArmISA::VecPredRegContainer & ThreadContext::readVecPredReg ( const RegId reg) const
overridevirtual

Implements ThreadContext.

Definition at line 679 of file thread_context.cc.

References _instId, call(), RegId::index(), ArmISA::offset, X86ISA::reg, vecPredRegIds, and vecPredRegs.

Referenced by readVecPredRegFlat().

◆ readVecPredRegFlat()

const ArmISA::VecPredRegContainer & ThreadContext::readVecPredRegFlat ( RegIndex  idx) const
overridevirtual

Implements ThreadContext.

Definition at line 708 of file thread_context.cc.

References readVecPredReg(), and VecPredRegClass.

◆ readVecReg()

const ArmISA::VecRegContainer & ThreadContext::readVecReg ( const RegId reg) const
overridevirtual

Implements ThreadContext.

Definition at line 651 of file thread_context.cc.

References _instId, call(), RegId::index(), X86ISA::reg, vecRegIds, and vecRegs.

Referenced by readVecRegFlat().

◆ readVecRegFlat()

const ArmISA::VecRegContainer & ThreadContext::readVecRegFlat ( RegIndex  idx) const
overridevirtual

Implements ThreadContext.

Definition at line 673 of file thread_context.cc.

References readVecReg(), and VecRegClass.

◆ regStats()

void Iris::ThreadContext::regStats ( const std::string &  name)
inlineoverridevirtual

Reimplemented from ThreadContext.

Definition at line 247 of file thread_context.hh.

◆ remove()

bool ThreadContext::remove ( PCEvent e)
overridevirtual

Implements PCEventScope.

Definition at line 408 of file thread_context.cc.

References delBp(), ArmISA::e, and getOrAllocBp().

◆ schedule()

bool ThreadContext::schedule ( PCEvent e)
overridevirtual

Implements PCEventScope.

Definition at line 396 of file thread_context.cc.

References _instId, ArmISA::e, getOrAllocBp(), and installBp().

◆ scheduleInstCountEvent()

void ThreadContext::scheduleInstCountEvent ( Event event,
Tick  count 
)
overridevirtual

◆ semihostingEvent()

iris::IrisErrorCode ThreadContext::semihostingEvent ( uint64_t  esId,
const iris::IrisValueMap &  fields,
uint64_t  time,
uint64_t  sInstId,
bool  syncEc,
std::string &  error_message_out 
)
protected

◆ setCCReg()

void Iris::ThreadContext::setCCReg ( RegIndex  reg_idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 394 of file thread_context.hh.

References setCCRegFlat(), and X86ISA::val.

◆ setCCRegFlat()

void ThreadContext::setCCRegFlat ( RegIndex  idx,
RegVal  val 
)
overridevirtual

Implements ThreadContext.

Definition at line 642 of file thread_context.cc.

References _instId, call(), ccRegIds, panic_if, and X86ISA::val.

Referenced by setCCReg(), and FastModel::CortexA76TC::setCCRegFlat().

◆ setContextId()

void Iris::ThreadContext::setContextId ( int  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 193 of file thread_context.hh.

References _contextId, and ArmISA::id.

◆ setFloatReg()

void Iris::ThreadContext::setFloatReg ( RegIndex  reg_idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 369 of file thread_context.hh.

References panic.

◆ setFloatRegFlat()

void Iris::ThreadContext::setFloatRegFlat ( RegIndex  idx,
RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 469 of file thread_context.hh.

References panic.

◆ setHtmCheckpointPtr()

void Iris::ThreadContext::setHtmCheckpointPtr ( BaseHTMCheckpointPtr  cpt)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 528 of file thread_context.hh.

References panic.

◆ setIntReg()

void ThreadContext::setIntReg ( RegIndex  reg_idx,
RegVal  val 
)
overridevirtual

◆ setIntRegFlat()

void ThreadContext::setIntRegFlat ( RegIndex  idx,
uint64_t  val 
)
overridevirtual

Implements ThreadContext.

Definition at line 620 of file thread_context.cc.

References _instId, call(), flattenedIntIds, panic_if, and X86ISA::val.

◆ setMiscReg()

void Iris::ThreadContext::setMiscReg ( RegIndex  misc_reg,
const RegVal  val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 416 of file thread_context.hh.

References setMiscRegNoEffect(), and X86ISA::val.

Referenced by FastModel::CortexA76TC::setIntRegFlat().

◆ setMiscRegNoEffect()

void ThreadContext::setMiscRegNoEffect ( RegIndex  misc_reg,
const RegVal  val 
)
overridevirtual

Implements ThreadContext.

Definition at line 571 of file thread_context.cc.

References _instId, call(), miscRegIds, and X86ISA::val.

Referenced by setMiscReg().

◆ setProcessPtr()

void Iris::ThreadContext::setProcessPtr ( Process p)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 230 of file thread_context.hh.

References panic.

◆ setStatus()

void ThreadContext::setStatus ( Status  new_status)
overridevirtual

◆ setStCondFailures()

void Iris::ThreadContext::setStCondFailures ( unsigned  sc_failures)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 436 of file thread_context.hh.

References panic.

◆ setThreadId()

void Iris::ThreadContext::setThreadId ( int  id)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 190 of file thread_context.hh.

References _threadId, and ArmISA::id.

◆ setVecElem()

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

Implements ThreadContext.

Definition at line 381 of file thread_context.hh.

References panic.

◆ setVecElemFlat()

void Iris::ThreadContext::setVecElemFlat ( RegIndex  idx,
const ElemIndex elemIdx,
const VecElem val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 492 of file thread_context.hh.

References panic.

◆ setVecLane() [1/4]

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

Write a lane of the destination vector register.

Implements ThreadContext.

Definition at line 323 of file thread_context.hh.

References panic.

◆ setVecLane() [2/4]

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

Implements ThreadContext.

Definition at line 340 of file thread_context.hh.

References panic.

◆ setVecLane() [3/4]

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

Implements ThreadContext.

Definition at line 334 of file thread_context.hh.

References panic.

◆ setVecLane() [4/4]

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

Implements ThreadContext.

Definition at line 328 of file thread_context.hh.

References panic.

◆ setVecPredReg()

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

Implements ThreadContext.

Definition at line 387 of file thread_context.hh.

References panic.

◆ setVecPredRegFlat()

void Iris::ThreadContext::setVecPredRegFlat ( RegIndex  idx,
const VecPredRegContainer val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 505 of file thread_context.hh.

References panic.

◆ setVecReg()

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

Implements ThreadContext.

Definition at line 375 of file thread_context.hh.

References panic.

◆ setVecRegFlat()

void Iris::ThreadContext::setVecRegFlat ( RegIndex  idx,
const VecRegContainer val 
)
inlineoverridevirtual

Implements ThreadContext.

Definition at line 481 of file thread_context.hh.

References panic.

◆ simulationTimeEvent()

iris::IrisErrorCode ThreadContext::simulationTimeEvent ( uint64_t  esId,
const iris::IrisValueMap &  fields,
uint64_t  time,
uint64_t  sInstId,
bool  syncEc,
std::string &  error_message_out 
)
protected

Definition at line 242 of file thread_context.cc.

References call(), and maintainStepping().

◆ socketId()

uint32_t Iris::ThreadContext::socketId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 187 of file thread_context.hh.

References _cpu, and BaseCPU::socketId().

◆ status()

ThreadContext::Status ThreadContext::status ( ) const
overridevirtual

Implements ThreadContext.

Definition at line 492 of file thread_context.cc.

References _status.

◆ suspend()

void Iris::ThreadContext::suspend ( )
inlineoverridevirtual

Set the status to Suspended.

Implements ThreadContext.

Definition at line 238 of file thread_context.hh.

References setStatus(), and ThreadContext::Suspended.

Referenced by initFromIrisInstance().

◆ takeOverFrom()

void Iris::ThreadContext::takeOverFrom ( ::ThreadContext old_context)
inlineoverride

Definition at line 242 of file thread_context.hh.

References panic.

◆ threadId()

int Iris::ThreadContext::threadId ( ) const
inlineoverridevirtual

Implements ThreadContext.

Definition at line 189 of file thread_context.hh.

References _threadId.

◆ translateAddress() [1/2]

virtual bool Iris::ThreadContext::translateAddress ( Addr paddr,
Addr  vaddr 
)
pure virtual

Implemented in FastModel::CortexA76TC.

◆ translateAddress() [2/2]

bool ThreadContext::translateAddress ( Addr paddr,
iris::MemorySpaceId  p_space,
Addr  vaddr,
iris::MemorySpaceId  v_space 
)
protected

Definition at line 420 of file thread_context.cc.

References _instId, noThrow(), panic, translations, MipsISA::vaddr, and warn.

◆ uninstallBp()

void ThreadContext::uninstallBp ( BpInfoIt  it)
protected

Definition at line 170 of file thread_context.cc.

References _instId, and call().

Referenced by delBp().

Member Data Documentation

◆ _contextId

ContextID Iris::ThreadContext::_contextId
protected

Definition at line 58 of file thread_context.hh.

Referenced by contextId(), and setContextId().

◆ _cpu

::BaseCPU* Iris::ThreadContext::_cpu
protected

Definition at line 56 of file thread_context.hh.

Referenced by cpuId(), getCpuPtr(), getSystemPtr(), initMemProxies(), and socketId().

◆ _dtb

::BaseTLB* Iris::ThreadContext::_dtb
protected

Definition at line 60 of file thread_context.hh.

Referenced by getDTBPtr().

◆ _instId

iris::InstanceId Iris::ThreadContext::_instId = iris::IRIS_UINT64_MAX
protected

◆ _irisPath

std::string Iris::ThreadContext::_irisPath
protected

Definition at line 64 of file thread_context.hh.

Referenced by instanceRegistryChanged().

◆ _isa

::BaseISA* Iris::ThreadContext::_isa
protected

Definition at line 62 of file thread_context.hh.

Referenced by getIsaPtr().

◆ _itb

::BaseTLB* Iris::ThreadContext::_itb
protected

Definition at line 61 of file thread_context.hh.

Referenced by getITBPtr().

◆ _status

Status Iris::ThreadContext::_status = Active
protected

Definition at line 72 of file thread_context.hh.

Referenced by initFromIrisInstance(), setStatus(), and status().

◆ _system

System* Iris::ThreadContext::_system
protected

Definition at line 59 of file thread_context.hh.

◆ _threadId

int Iris::ThreadContext::_threadId
protected

Definition at line 57 of file thread_context.hh.

Referenced by setThreadId(), and threadId().

◆ bps

BpInfoMap Iris::ThreadContext::bps
protected

Definition at line 129 of file thread_context.hh.

Referenced by delBp(), getOrAllocBp(), and initFromIrisInstance().

◆ breakpointEventStreamId

iris::EventStreamId Iris::ThreadContext::breakpointEventStreamId
protected

Definition at line 159 of file thread_context.hh.

Referenced by initFromIrisInstance(), and ThreadContext().

◆ ccRegIds

ResourceIds Iris::ThreadContext::ccRegIds
protected

◆ client

iris::IrisInstance Iris::ThreadContext::client
mutableprotected

Definition at line 162 of file thread_context.hh.

Referenced by call(), initFromIrisInstance(), noThrow(), ThreadContext(), and ~ThreadContext().

◆ comInstEventQueue

EventQueue Iris::ThreadContext::comInstEventQueue
protected

◆ enableAfterPseudoEvent

Event* Iris::ThreadContext::enableAfterPseudoEvent
protected

Definition at line 73 of file thread_context.hh.

Referenced by semihostingEvent(), setStatus(), ThreadContext(), and ~ThreadContext().

◆ flattenedIntIds

ResourceIds Iris::ThreadContext::flattenedIntIds
protected

◆ icountRscId

iris::ResourceId Iris::ThreadContext::icountRscId
protected

Definition at line 90 of file thread_context.hh.

◆ initEventStreamId

iris::EventStreamId Iris::ThreadContext::initEventStreamId
protected

Definition at line 157 of file thread_context.hh.

Referenced by ThreadContext(), and ~ThreadContext().

◆ intReg32Ids

ResourceIds Iris::ThreadContext::intReg32Ids
protected

◆ intReg64Ids

ResourceIds Iris::ThreadContext::intReg64Ids
protected

◆ memorySpaces

std::vector<iris::MemorySpaceInfo> Iris::ThreadContext::memorySpaces
protected

◆ miscRegIds

ResourceIds Iris::ThreadContext::miscRegIds
protected

◆ pcRscId

iris::ResourceId Iris::ThreadContext::pcRscId = iris::IRIS_UINT64_MAX
protected

Definition at line 89 of file thread_context.hh.

Referenced by FastModel::CortexA76TC::initFromIrisInstance(), and pcState().

◆ physProxy

std::unique_ptr<PortProxy> Iris::ThreadContext::physProxy = nullptr
protected

Definition at line 99 of file thread_context.hh.

Referenced by getPhysProxy(), and initMemProxies().

◆ regEventStreamId

iris::EventStreamId Iris::ThreadContext::regEventStreamId
protected

Definition at line 156 of file thread_context.hh.

Referenced by ThreadContext(), and ~ThreadContext().

◆ semihostingEventStreamId

iris::EventStreamId Iris::ThreadContext::semihostingEventStreamId
protected

Definition at line 160 of file thread_context.hh.

Referenced by initFromIrisInstance(), and ThreadContext().

◆ timeEventStreamId

iris::EventStreamId Iris::ThreadContext::timeEventStreamId
protected

Definition at line 158 of file thread_context.hh.

Referenced by ThreadContext(), and ~ThreadContext().

◆ translations

std::vector<iris::MemorySupportedAddressTranslationResult> Iris::ThreadContext::translations
protected

Definition at line 96 of file thread_context.hh.

Referenced by initFromIrisInstance(), and translateAddress().

◆ vecPredRegIds

ResourceIds Iris::ThreadContext::vecPredRegIds
protected

Definition at line 93 of file thread_context.hh.

Referenced by readVecPredReg().

◆ vecPredRegs

std::vector<ArmISA::VecPredRegContainer> Iris::ThreadContext::vecPredRegs
mutableprotected

Definition at line 70 of file thread_context.hh.

Referenced by readVecPredReg().

◆ vecRegIds

ResourceIds Iris::ThreadContext::vecRegIds
protected

Definition at line 92 of file thread_context.hh.

Referenced by FastModel::CortexA76TC::initFromIrisInstance(), and readVecReg().

◆ vecRegs

std::vector<ArmISA::VecRegContainer> Iris::ThreadContext::vecRegs
mutableprotected

Definition at line 69 of file thread_context.hh.

Referenced by readVecReg().

◆ virtProxy

std::unique_ptr<PortProxy> Iris::ThreadContext::virtProxy = nullptr
protected

Definition at line 98 of file thread_context.hh.

Referenced by getVirtProxy(), and initMemProxies().


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

Generated on Wed Sep 30 2020 14:03:06 for gem5 by doxygen 1.8.17