30 #ifndef __ARCH_ARM_FASTMODEL_IRIS_THREAD_CONTEXT_HH__ 31 #define __ARCH_ARM_FASTMODEL_IRIS_THREAD_CONTEXT_HH__ 39 #include "iris/IrisInstance.h" 40 #include "iris/detail/IrisErrorCode.h" 41 #include "iris/detail/IrisObjects.h" 52 typedef std::map<std::string, iris::ResourceInfo>
ResourceMap;
66 iris::InstanceId
_instId = iris::IRIS_UINT64_MAX;
78 const ResourceMap &resources,
const std::string &
name);
80 const ResourceMap &resources,
const IdxNameMap &idx_names);
89 iris::ResourceId
pcRscId = iris::IRIS_UINT64_MAX;
119 bool empty()
const {
return events.empty(); }
120 bool validId()
const {
return id != iris::IRIS_UINT64_MAX; }
121 void clearId() {
id = iris::IRIS_UINT64_MAX; }
140 uint64_t esId,
const iris::IrisValueMap &fields, uint64_t time,
141 uint64_t sInstId,
bool syncEc, std::string &error_message_out);
143 uint64_t esId,
const iris::IrisValueMap &fields, uint64_t time,
144 uint64_t sInstId,
bool syncEc, std::string &error_message_out);
146 uint64_t esId,
const iris::IrisValueMap &fields, uint64_t time,
147 uint64_t sInstId,
bool syncEc, std::string &error_message_out);
149 uint64_t esId,
const iris::IrisValueMap &fields, uint64_t time,
150 uint64_t sInstId,
bool syncEc, std::string &error_message_out);
158 iris::IrisCppAdapter &
call()
const {
return client.irisCall(); }
159 iris::IrisCppAdapter &
noThrow()
const {
return client.irisCallNoThrow(); }
162 Addr vaddr, iris::MemorySpaceId v_space);
167 iris::IrisConnectionInterface *iris_if,
168 const std::string &iris_path);
203 panic(
"%s not implemented.", __FUNCTION__);
208 panic(
"%s not implemented.", __FUNCTION__);
216 panic(
"%s not implemented.", __FUNCTION__);
222 panic(
"%s not implemented.", __FUNCTION__);
232 panic(
"%s not implemented.", __FUNCTION__);
237 panic(
"%s not implemented.", __FUNCTION__);
249 panic(
"%s not implemented.", __FUNCTION__);
255 panic(
"%s not implemented.", __FUNCTION__);
263 panic(
"%s not implemented.", __FUNCTION__);
271 panic(
"%s not implemented.", __FUNCTION__);
275 panic(
"%s not implemented.", __FUNCTION__);
281 panic(
"%s not implemented.", __FUNCTION__);
286 panic(
"%s not implemented.", __FUNCTION__);
292 panic(
"%s not implemented.", __FUNCTION__);
298 panic(
"%s not implemented.", __FUNCTION__);
309 panic(
"%s not implemented.", __FUNCTION__);
316 panic(
"%s not implemented.", __FUNCTION__);
325 panic(
"%s not implemented.", __FUNCTION__);
332 panic(
"%s not implemented.", __FUNCTION__);
339 panic(
"%s not implemented.", __FUNCTION__);
346 panic(
"%s not implemented.", __FUNCTION__);
353 panic(
"%s not implemented.", __FUNCTION__);
359 panic(
"%s not implemented.", __FUNCTION__);
365 panic(
"%s not implemented.", __FUNCTION__);
371 panic(
"%s not implemented.", __FUNCTION__);
378 panic(
"%s not implemented.", __FUNCTION__);
385 panic(
"%s not implemented.", __FUNCTION__);
399 panic(
"%s not implemented.", __FUNCTION__);
405 panic(
"%s not implemented.", __FUNCTION__);
411 panic(
"%s not implemented.", __FUNCTION__);
418 panic(
"%s not implemented.", __FUNCTION__);
452 panic(
"%s not implemented.", __FUNCTION__);
460 panic(
"%s not implemented.", __FUNCTION__);
466 panic(
"%s not implemented.", __FUNCTION__);
473 panic(
"%s not implemented.", __FUNCTION__);
479 panic(
"%s not implemented.", __FUNCTION__);
500 panic(
"%s not implemented.", __FUNCTION__);
505 panic(
"%s not implemented.", __FUNCTION__);
512 panic(
"%s not implemented.", __FUNCTION__);
517 panic(
"%s not implemented.", __FUNCTION__);
523 panic(
"%s not implemented.", __FUNCTION__);
529 panic(
"%s not implemented.", __FUNCTION__);
536 panic(
"%s not implemented.", __FUNCTION__);
541 panic(
"%s not implemented.", __FUNCTION__);
552 #endif // __ARCH_ARM_FASTMODEL_IRIS_THREAD_CONTEXT_HH__
void setStatus(Status new_status) override
void setCCRegFlat(RegIndex idx, RegVal val) override
#define panic(...)
This implements a cprintf based panic() function.
VecRegContainer & getWritableVecReg(const RegId ®) override
void setThreadId(int id) override
Addr instAddr() const override
RegVal readCCRegFlat(RegIndex idx) const override
void clearArchRegs() override
void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
const std::string & name()
BaseISA * getIsaPtr() override
std::vector< iris::MemorySpaceInfo > memorySpaces
VecPredRegContainer & getWritableVecPredRegFlat(RegIndex idx) override
VecRegContainer & getWritableVecRegFlat(RegIndex idx) override
iris::EventStreamId initEventStreamId
std::vector< ArmISA::VecPredRegContainer > vecPredRegs
Vector Register Abstraction This generic class is the model in a particularization of MVC...
const VecPredRegContainer & readVecPredRegFlat(RegIndex idx) const override
int cpuId() const override
CheckerCPU * getCheckerCpuPtr() override
RegVal readFloatRegFlat(RegIndex idx) const override
iris::IrisCppAdapter & noThrow() const
void setStCondFailures(unsigned sc_failures) override
std::vector< iris::MemorySupportedAddressTranslationResult > translations
BpInfoIt getOrAllocBp(Addr pc)
const VecRegContainer & readVecReg(const RegId ®) const override
ArmISA::PCState pcState() const override
std::unique_ptr< PortProxy > physProxy
void setMiscRegNoEffect(RegIndex misc_reg, const RegVal val) override
RegVal readIntRegFlat(RegIndex idx) const override
Flat register interfaces.
const VecElem & readVecElemFlat(RegIndex idx, const ElemIndex &elemIdx) const override
std::map< std::string, iris::ResourceInfo > ResourceMap
std::vector< iris::ResourceId > ResourceIds
int cpuId() const
Reads this CPU's ID.
void setIntReg(RegIndex reg_idx, RegVal val) override
iris::EventStreamId timeEventStreamId
Event for timing out quiesce instruction.
std::map< Addr, BpInfoPtr > BpInfoMap
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
void setMiscReg(RegIndex misc_reg, const RegVal val) override
iris::ResourceId icountRscId
EndQuiesceEvent * getQuiesceEvent() override
VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
RegVal readCCReg(RegIndex reg_idx) const override
void setIntRegFlat(RegIndex idx, uint64_t val) override
void descheduleInstCountEvent(Event *event) override
BaseTLB * getDTBPtr() override
RegVal readIntReg(RegIndex reg_idx) const override
int threadId() const override
void setVecLane(const RegId ®, const LaneData< LaneSize::TwoByte > &val) override
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
ConstVecLane8 readVec8BitLaneReg(const RegId ®) const override
Vector Register Lane Interfaces.
EventQueue comInstEventQueue
Queue of events sorted in time order.
std::unique_ptr< PortProxy > virtProxy
const VecRegContainer & readVecRegFlat(RegIndex idx) const override
void setVecElem(const RegId ®, const VecElem &val) override
virtual void initFromIrisInstance(const ResourceMap &resources)
iris::IrisErrorCode phaseInitLeave(uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
uint64_t Tick
Tick count type.
void setCCReg(RegIndex reg_idx, RegVal val) override
void halt() override
Set the status to Halted.
virtual iris::MemorySpaceId getBpSpaceId(Addr pc) const =0
PortProxy & getPhysProxy() override
BaseTLB * getITBPtr() override
void syscall(Fault *fault) override
unsigned readStCondFailures() const override
iris::ResourceId extractResourceId(const ResourceMap &resources, const std::string &name)
RegVal readMiscReg(RegIndex misc_reg) override
void setVecElemFlat(RegIndex idx, const ElemIndex &elemIdx, const VecElem &val) override
iris::EventStreamId regEventStreamId
ConstVecLane32 readVec32BitLaneReg(const RegId ®) const override
Reads source vector 32bit operand.
const VecElem & readVecElem(const RegId ®) const override
iris::IrisCppAdapter & call() const
iris::IrisErrorCode breakpointHit(uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
System * getSystemPtr() override
void setVecRegFlat(RegIndex idx, const VecRegContainer &val) override
iris::IrisErrorCode simulationTimeEvent(uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
bool schedule(PCEvent *e) override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setFloatReg(RegIndex reg_idx, RegVal val) override
void setVecLane(const RegId ®, const LaneData< LaneSize::EightByte > &val) override
void setProcessPtr(Process *p) override
int64_t Counter
Statistics counter type.
BpInfoMap::iterator BpInfoIt
void activate() override
Set the status to Active.
Tick getCurrentInstCount() override
void profileClear() override
ArmISA::Decoder * getDecoderPtr() override
Kernel::Statistics * getKernelStats() override
void initMemProxies(::ThreadContext *tc) override
void profileSample() override
void setVecPredRegFlat(RegIndex idx, const VecPredRegContainer &val) override
void setContextId(int id) override
This object is a proxy for a port or other object which implements the functional response protocol...
const VecPredRegContainer & readVecPredReg(const RegId ®) const override
MicroPC microPC() const override
void setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
int contextId() const override
uint16_t ElemIndex
Logical vector register elem index type.
std::map< int, std::string > IdxNameMap
GenericISA::SimplePCState< MachInst > PCState
ConstVecLane64 readVec64BitLaneReg(const RegId ®) const override
Reads source vector 64bit operand.
std::unique_ptr< BpInfo > BpInfoPtr
ResourceIds vecPredRegIds
uint32_t socketId() const
Reads this CPU's Socket ID.
std::vector< ArmISA::VecRegContainer > vecRegs
Generic predicate register container.
ResourceIds flattenedIntIds
Process * getProcessPtr() override
void dumpFuncProfile() override
void setVecReg(const RegId ®, const VecRegContainer &val) override
::BaseCPU * getCpuPtr() override
void uninstallBp(BpInfoIt it)
Status status() const override
ThreadContext(::BaseCPU *cpu, int id, System *system, ::BaseTLB *dtb, ::BaseTLB *itb, iris::IrisConnectionInterface *iris_if, const std::string &iris_path)
void regStats(const std::string &name) override
Tick readLastSuspend() override
Register ID: describe an architectural register with its class and index.
Addr nextInstAddr() const override
void setVecLane(const RegId ®, const LaneData< LaneSize::FourByte > &val) override
iris::IrisInstance client
void suspend() override
Set the status to Suspended.
std::list< PCEvent * > events
iris::EventStreamId breakpointEventStreamId
ConstVecLane16 readVec16BitLaneReg(const RegId ®) const override
Reads source vector 16bit operand.
PortProxy & getVirtProxy() override
iris::IrisErrorCode instanceRegistryChanged(uint64_t esId, const iris::IrisValueMap &fields, uint64_t time, uint64_t sInstId, bool syncEc, std::string &error_message_out)
Vector Lane abstraction Another view of a container.
Counter readFuncExeInst() const override
void extractResourceMap(ResourceIds &ids, const ResourceMap &resources, const IdxNameMap &idx_names)
void copyArchRegs(::ThreadContext *tc) override
RegVal readFloatReg(RegIndex reg_idx) const override
std::shared_ptr< FaultBase > Fault
Tick readLastActivate() override
RegId flattenRegId(const RegId ®Id) const override
void installBp(BpInfoIt it)
uint32_t socketId() const override
int ContextID
Globally unique thread context ID.
void setFloatRegFlat(RegIndex idx, RegVal val) override
void pcStateNoRecord(const ArmISA::PCState &val) override
void takeOverFrom(::ThreadContext *old_context) override
void scheduleInstCountEvent(Event *event, Tick count) override
bool translateAddress(Addr &paddr, iris::MemorySpaceId p_space, Addr vaddr, iris::MemorySpaceId v_space)