gem5 v24.0.0.0
|
Derived ThreadContext class for use with the Checker. More...
#include <thread_context.hh>
Public Member Functions | |
CheckerThreadContext (TC *actual_tc, CheckerCPU *checker_cpu) | |
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 |
BaseCPU * | getCpuPtr () override |
uint32_t | socketId () const override |
int | cpuId () const override |
ContextID | contextId () const override |
void | setContextId (ContextID id) override |
int | threadId () const override |
Returns this thread's ID number. | |
void | setThreadId (int id) override |
BaseMMU * | getMMUPtr () override |
CheckerCPU * | getCheckerCpuPtr () override |
BaseISA * | getIsaPtr () const override |
InstDecoder * | getDecoderPtr () override |
System * | getSystemPtr () override |
Process * | getProcessPtr () override |
void | setProcessPtr (Process *p) override |
void | connectMemPorts (ThreadContext *tc) |
Status | status () const override |
void | setStatus (Status new_status) override |
void | activate () override |
Set the status to Active. | |
void | suspend () override |
Set the status to Suspended. | |
void | halt () override |
Set the status to Halted. | |
void | takeOverFrom (ThreadContext *oldContext) override |
void | regStats (const std::string &name) override |
Tick | readLastActivate () override |
Tick | readLastSuspend () override |
void | copyArchRegs (ThreadContext *tc) override |
void | clearArchRegs () override |
RegVal | getReg (const RegId ®) const override |
void | getReg (const RegId ®, void *val) const override |
void * | getWritableReg (const RegId ®) override |
void | setReg (const RegId ®, RegVal val) override |
void | setReg (const RegId ®, const void *val) override |
const PCStateBase & | pcState () const override |
Reads this thread's PC state. | |
void | pcState (const PCStateBase &val) override |
Sets this thread's PC state. | |
void | pcStateNoRecord (const PCStateBase &val) override |
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 |
unsigned | readStCondFailures () const override |
void | setStCondFailures (unsigned sc_failures) override |
void | htmAbortTransaction (uint64_t htm_uid, HtmFailureFaultCause cause) override |
BaseHTMCheckpointPtr & | getHtmCheckpointPtr () override |
void | setHtmCheckpointPtr (BaseHTMCheckpointPtr new_cpt) override |
Public Member Functions inherited from gem5::ThreadContext | |
bool | getUseForClone () |
void | setUseForClone (bool new_val) |
virtual | ~ThreadContext () |
virtual void | sendFunctional (PacketPtr pkt) |
void | quiesce () |
Quiesce thread context. | |
void | quiesceTick (Tick resume) |
Quiesce, suspend, and schedule activate at resume. | |
void | pcState (Addr addr) |
virtual int | exit () |
Private Attributes | |
TC * | actualTC |
The main CPU's ThreadContext, or class that implements the ThreadContext interface. | |
SimpleThread * | checkerTC |
The checker's own SimpleThread. | |
CheckerCPU * | checkerCPU |
Pointer to the checker CPU. | |
Additional Inherited Members | |
Public Types inherited from gem5::ThreadContext | |
enum | Status { Active , Suspended , Halting , Halted } |
Static Public Member Functions inherited from gem5::ThreadContext | |
static void | compare (ThreadContext *one, ThreadContext *two) |
function to compare two thread contexts (for debugging) | |
Public Attributes inherited from gem5::ThreadContext | |
int | intResult = DefaultIntResult |
double | floatResult = DefaultFloatResult |
int | intOffset = 0 |
Static Public Attributes inherited from gem5::ThreadContext | |
static const int | ints [] |
static const double | floats [] |
static const int | DefaultIntResult = 0 |
static const double | DefaultFloatResult = 0.0 |
Protected Attributes inherited from gem5::ThreadContext | |
bool | useForClone = false |
Derived ThreadContext class for use with the Checker.
The template parameter is the ThreadContext class used by the specific CPU being verified. This CheckerThreadContext is then used by the main CPU in place of its usual ThreadContext class. It handles updating the checker's state any time state is updated externally through the ThreadContext.
Definition at line 63 of file thread_context.hh.
|
inline |
Definition at line 66 of file thread_context.hh.
|
inlineoverridevirtual |
Set the status to Active.
Implements gem5::ThreadContext.
Definition at line 180 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 214 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::clearArchRegs().
|
inline |
Definition at line 165 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 124 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 207 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::copyArchRegs().
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 122 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 108 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, and gem5::MipsISA::event.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 145 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::checkerCPU.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 118 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 113 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 153 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 325 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 150 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 142 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 160 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Reimplemented from gem5::ThreadContext.
Definition at line 224 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, and gem5::X86ISA::reg.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 230 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::X86ISA::reg, and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 158 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 236 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, and gem5::X86ISA::reg.
|
inlineoverridevirtual |
Set the status to Halted.
Implements gem5::ThreadContext.
Definition at line 186 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Reads this thread's PC state.
Implements gem5::ThreadContext.
Definition at line 256 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Sets this thread's PC state.
Implements gem5::ThreadContext.
Definition at line 260 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerCPU, gem5::CheckerThreadContext< TC >::checkerTC, DPRINTF, gem5::SimpleThread::pcState(), gem5::CheckerCPU::recordPCChange(), and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 270 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 202 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 203 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 282 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 276 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 306 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Reimplemented from gem5::ThreadContext.
Definition at line 196 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, name(), and gem5::ThreadContext::regStats().
|
inlineoverridevirtual |
Implements gem5::PCEventScope.
Definition at line 94 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, gem5::ArmISA::e, and gem5::SimpleThread::remove().
|
inlineoverridevirtual |
Implements gem5::PCEventScope.
Definition at line 85 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, gem5::ArmISA::e, and gem5::SimpleThread::schedule().
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 103 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::X86ISA::count, and gem5::MipsISA::event.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 127 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::setContextId().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 297 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, DPRINTF, gem5::SimpleThread::setMiscReg(), and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 288 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, DPRINTF, gem5::SimpleThread::setMiscRegNoEffect(), and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 162 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, and gem5::MipsISA::p.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 249 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, gem5::X86ISA::reg, gem5::SimpleThread::setReg(), and gem5::X86ISA::val.
|
inlineoverridevirtual |
Reimplemented from gem5::ThreadContext.
Definition at line 242 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, gem5::X86ISA::reg, gem5::SimpleThread::setReg(), and gem5::X86ISA::val.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 173 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::setStatus().
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 312 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 136 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::setThreadId().
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 120 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 170 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Set the status to Suspended.
Implements gem5::ThreadContext.
Definition at line 183 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
inlineoverridevirtual |
Implements gem5::ThreadContext.
Definition at line 189 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC, gem5::CheckerThreadContext< TC >::checkerTC, and gem5::SimpleThread::copyState().
|
inlineoverridevirtual |
Returns this thread's ID number.
Implements gem5::ThreadContext.
Definition at line 134 of file thread_context.hh.
References gem5::CheckerThreadContext< TC >::actualTC.
|
private |
The main CPU's ThreadContext, or class that implements the ThreadContext interface.
Definition at line 75 of file thread_context.hh.
Referenced by gem5::CheckerThreadContext< TC >::activate(), gem5::CheckerThreadContext< TC >::clearArchRegs(), gem5::CheckerThreadContext< TC >::connectMemPorts(), gem5::CheckerThreadContext< TC >::contextId(), gem5::CheckerThreadContext< TC >::copyArchRegs(), gem5::CheckerThreadContext< TC >::cpuId(), gem5::CheckerThreadContext< TC >::descheduleInstCountEvent(), gem5::CheckerThreadContext< TC >::getCpuPtr(), gem5::CheckerThreadContext< TC >::getCurrentInstCount(), gem5::CheckerThreadContext< TC >::getDecoderPtr(), gem5::CheckerThreadContext< TC >::getHtmCheckpointPtr(), gem5::CheckerThreadContext< TC >::getIsaPtr(), gem5::CheckerThreadContext< TC >::getMMUPtr(), gem5::CheckerThreadContext< TC >::getProcessPtr(), gem5::CheckerThreadContext< TC >::getReg(), gem5::CheckerThreadContext< TC >::getReg(), gem5::CheckerThreadContext< TC >::getSystemPtr(), gem5::CheckerThreadContext< TC >::getWritableReg(), gem5::CheckerThreadContext< TC >::halt(), gem5::CheckerThreadContext< TC >::pcState(), gem5::CheckerThreadContext< TC >::pcState(), gem5::CheckerThreadContext< TC >::pcStateNoRecord(), gem5::CheckerThreadContext< TC >::readLastActivate(), gem5::CheckerThreadContext< TC >::readLastSuspend(), gem5::CheckerThreadContext< TC >::readMiscReg(), gem5::CheckerThreadContext< TC >::readMiscRegNoEffect(), gem5::CheckerThreadContext< TC >::readStCondFailures(), gem5::CheckerThreadContext< TC >::regStats(), gem5::CheckerThreadContext< TC >::remove(), gem5::CheckerThreadContext< TC >::schedule(), gem5::CheckerThreadContext< TC >::scheduleInstCountEvent(), gem5::CheckerThreadContext< TC >::setContextId(), gem5::CheckerThreadContext< TC >::setMiscReg(), gem5::CheckerThreadContext< TC >::setMiscRegNoEffect(), gem5::CheckerThreadContext< TC >::setProcessPtr(), gem5::CheckerThreadContext< TC >::setReg(), gem5::CheckerThreadContext< TC >::setReg(), gem5::CheckerThreadContext< TC >::setStatus(), gem5::CheckerThreadContext< TC >::setStCondFailures(), gem5::CheckerThreadContext< TC >::setThreadId(), gem5::CheckerThreadContext< TC >::socketId(), gem5::CheckerThreadContext< TC >::status(), gem5::CheckerThreadContext< TC >::suspend(), gem5::CheckerThreadContext< TC >::takeOverFrom(), and gem5::CheckerThreadContext< TC >::threadId().
|
private |
Pointer to the checker CPU.
Definition at line 81 of file thread_context.hh.
Referenced by gem5::CheckerThreadContext< TC >::getCheckerCpuPtr(), and gem5::CheckerThreadContext< TC >::pcState().
|
private |
The checker's own SimpleThread.
Will be updated any time anything uses this ThreadContext to externally update a thread's state.
Definition at line 79 of file thread_context.hh.
Referenced by gem5::CheckerThreadContext< TC >::clearArchRegs(), gem5::CheckerThreadContext< TC >::copyArchRegs(), gem5::CheckerThreadContext< TC >::pcState(), gem5::CheckerThreadContext< TC >::regStats(), gem5::CheckerThreadContext< TC >::remove(), gem5::CheckerThreadContext< TC >::schedule(), gem5::CheckerThreadContext< TC >::setContextId(), gem5::CheckerThreadContext< TC >::setMiscReg(), gem5::CheckerThreadContext< TC >::setMiscRegNoEffect(), gem5::CheckerThreadContext< TC >::setReg(), gem5::CheckerThreadContext< TC >::setReg(), gem5::CheckerThreadContext< TC >::setStatus(), gem5::CheckerThreadContext< TC >::setThreadId(), and gem5::CheckerThreadContext< TC >::takeOverFrom().