44 #ifndef __CPU_CHECKER_THREAD_CONTEXT_HH__
45 #define __CPU_CHECKER_THREAD_CONTEXT_HH__
47 #include "arch/types.hh"
48 #include "config/the_isa.hh"
52 #include "debug/Checker.hh"
129 {
return actualTC->getKernelStats(); }
138 {
return actualTC->getVirtProxy(); }
152 {
return actualTC->syscall(callnum, fault); }
210 {
return actualTC->readIntReg(reg_idx); }
213 {
return actualTC->readFloatReg(reg_idx); }
216 {
return actualTC->readFloatRegBits(reg_idx); }
219 {
return actualTC->readCCReg(reg_idx); }
229 actualTC->setFloatReg(reg_idx, val);
235 actualTC->setFloatRegBits(reg_idx, val);
276 {
return actualTC->nextInstAddr(); }
283 {
return actualTC->readMiscRegNoEffect(misc_reg); }
286 {
return actualTC->readMiscReg(misc_reg); }
290 DPRINTF(
Checker,
"Setting misc reg with no effect: %d to both Checker"
291 " and O3..\n", misc_reg);
293 actualTC->setMiscRegNoEffect(misc_reg, val);
298 DPRINTF(
Checker,
"Setting misc reg with effect: %d to both Checker"
299 " and O3..\n", misc_reg);
301 actualTC->setMiscReg(misc_reg, val);
310 {
return actualTC->readStCondFailures(); }
314 actualTC->setStCondFailures(sc_failures);
320 {
return actualTC->readIntRegFlat(idx); }
323 {
actualTC->setIntRegFlat(idx, val); }
326 {
return actualTC->readFloatRegFlat(idx); }
329 {
actualTC->setFloatRegFlat(idx, val); }
332 {
return actualTC->readFloatRegBitsFlat(idx); }
335 {
actualTC->setFloatRegBitsFlat(idx, val); }
338 {
return actualTC->readCCRegFlat(idx); }
341 {
actualTC->setCCRegFlat(idx, val); }
344 #endif // __CPU_CHECKER_EXEC_CONTEXT_HH__
A TranslatingPortProxy in FS mode translates a virtual address to a physical address and then calls t...
void setContextId(ContextID id)
CheckerCPU * checkerCPU
Pointer to the checker CPU.
void setProcessPtr(Process *p)
int flattenMiscIndex(int reg)
void setMiscReg(int misc_reg, const MiscReg &val, ThreadID tid=0)
TheISA::Decoder * getDecoderPtr()
CCReg readCCRegFlat(int idx)
void setFloatRegBits(int reg_idx, FloatRegBits val)
void regStats(const std::string &name)
const std::string & name()
int threadId() const
Returns this thread's ID number.
uint32_t socketId() const
FloatReg readFloatRegFlat(int idx)
void setStatus(Status newStatus)
void copyArchRegs(ThreadContext *tc)
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
void setThreadId(ThreadID id)
void setFloatRegBitsFlat(int idx, FloatRegBits val)
void pcState(const TheISA::PCState &val)
Sets this thread's PC state.
void setIntRegFlat(int idx, uint64_t val)
void setFloatRegFlat(int idx, FloatReg val)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void setIntReg(int reg_idx, uint64_t val)
int flattenFloatIndex(int reg)
Event for timing out quiesce instruction.
void setMiscReg(int misc_reg, const MiscReg &val)
void setStatus(Status new_status)
TC * actualTC
The main CPU's ThreadContext, or class that implements the ThreadContext interface.
void setCCReg(int reg_idx, CCReg val)
int flattenCCIndex(int reg)
FloatRegBits readFloatRegBits(int reg_idx)
int flattenIntIndex(int reg)
MiscReg readMiscReg(int misc_reg)
Derived ThreadContext class for use with the Checker.
EndQuiesceEvent * getQuiesceEvent()
SETranslatingPortProxy & getMemProxy()
uint64_t Tick
Tick count type.
FloatReg readFloatReg(int reg_idx)
TheISA::FloatRegBits FloatRegBits
CCReg readCCReg(int reg_idx)
ContextID contextId() const
void setMiscRegNoEffect(int misc_reg, const MiscReg &val, ThreadID tid=0)
unsigned readStCondFailures()
Addr instAddr()
Reads this thread's PC.
TheISA::PCState pcState()
Reads this thread's PC state.
FSTranslatingPortProxy & getVirtProxy()
uint64_t readIntReg(int reg_idx)
MicroPC microPC()
Reads this thread's next PC.
TheISA::FloatReg FloatReg
void setFloatRegBits(int reg_idx, FloatRegBits val)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setFloatReg(int reg_idx, FloatReg val)
void setStCondFailures(unsigned sc_failures)
int64_t Counter
Statistics counter type.
void setFloatReg(int reg_idx, FloatReg val)
void activate()
Set the status to Active.
void setCCRegFlat(int idx, CCReg val)
CheckerThreadContext(TC *actual_tc, CheckerCPU *checker_cpu)
CheckerCPU * getCheckerCpuPtr()
TheISA::PCState pcState()
This object is a proxy for a structural port, to be used for debug accesses.
void setIntReg(int reg_idx, uint64_t val)
void syscall(int64_t callnum, Fault *fault)
Executes a syscall in SE mode.
void regStats(const std::string &name)
void pcStateNoRecord(const TheISA::PCState &val)
void copyArchRegs(ThreadContext *tc)
Counter readFuncExeInst()
void copyState(ThreadContext *oldContext)
void initMemProxies(ThreadContext *tc)
Initialise the physical and virtual port proxies and tie them to the data port of the CPU...
GenericISA::SimplePCState< MachInst > PCState
void setContextId(ContextID id)
void suspend()
Set the status to Suspended.
void halt()
Set the status to Halted.
TheISA::TLB * getITBPtr()
PortProxy & getPhysProxy()
uint64_t readIntRegFlat(int idx)
Flat register interfaces.
void setCCReg(int reg_idx, CCReg val)
SimpleThread * checkerTC
The checker's own SimpleThread.
void recordPCChange(const TheISA::PCState &val)
TheISA::TLB * getDTBPtr()
TheISA::Kernel::Statistics * getKernelStats()
void takeOverFrom(ThreadContext *oldContext)
void setMiscRegNoEffect(int misc_reg, const MiscReg &val)
Process * getProcessPtr()
std::shared_ptr< FaultBase > Fault
Addr nextInstAddr()
Reads this thread's next PC.
MiscReg readMiscRegNoEffect(int misc_reg) const
int ContextID
Globally unique thread context ID.
FloatRegBits readFloatRegBitsFlat(int idx)
void connectMemPorts(ThreadContext *tc)