gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::CheckerThreadContext< TC > Class Template Reference

Derived ThreadContext class for use with the Checker. More...

#include <thread_context.hh>

Inheritance diagram for gem5::CheckerThreadContext< TC >:
gem5::ThreadContext gem5::PCEventScope

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
 
BaseCPUgetCpuPtr () 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
 
BaseMMUgetMMUPtr () override
 
CheckerCPUgetCheckerCpuPtr () override
 
BaseISAgetIsaPtr () const override
 
InstDecodergetDecoderPtr () override
 
SystemgetSystemPtr () override
 
ProcessgetProcessPtr () 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 &reg) const override
 
void getReg (const RegId &reg, void *val) const override
 
void * getWritableReg (const RegId &reg) override
 
void setReg (const RegId &reg, RegVal val) override
 
void setReg (const RegId &reg, const void *val) override
 
const PCStateBasepcState () 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
 
BaseHTMCheckpointPtrgetHtmCheckpointPtr () 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.
 
SimpleThreadcheckerTC
 The checker's own SimpleThread.
 
CheckerCPUcheckerCPU
 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
 

Detailed Description

template<class TC>
class gem5::CheckerThreadContext< TC >

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.

Constructor & Destructor Documentation

◆ CheckerThreadContext()

template<class TC >
gem5::CheckerThreadContext< TC >::CheckerThreadContext ( TC * actual_tc,
CheckerCPU * checker_cpu )
inline

Definition at line 66 of file thread_context.hh.

Member Function Documentation

◆ activate()

template<class TC >
void gem5::CheckerThreadContext< TC >::activate ( )
inlineoverridevirtual

Set the status to Active.

Implements gem5::ThreadContext.

Definition at line 180 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ clearArchRegs()

template<class TC >
void gem5::CheckerThreadContext< TC >::clearArchRegs ( )
inlineoverridevirtual

◆ connectMemPorts()

template<class TC >
void gem5::CheckerThreadContext< TC >::connectMemPorts ( ThreadContext * tc)
inline

Definition at line 165 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ contextId()

template<class TC >
ContextID gem5::CheckerThreadContext< TC >::contextId ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 124 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ copyArchRegs()

template<class TC >
void gem5::CheckerThreadContext< TC >::copyArchRegs ( ThreadContext * tc)
inlineoverridevirtual

◆ cpuId()

template<class TC >
int gem5::CheckerThreadContext< TC >::cpuId ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 122 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ descheduleInstCountEvent()

template<class TC >
void gem5::CheckerThreadContext< TC >::descheduleInstCountEvent ( Event * event)
inlineoverridevirtual

◆ getCheckerCpuPtr()

template<class TC >
CheckerCPU * gem5::CheckerThreadContext< TC >::getCheckerCpuPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 145 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::checkerCPU.

◆ getCpuPtr()

template<class TC >
BaseCPU * gem5::CheckerThreadContext< TC >::getCpuPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 118 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getCurrentInstCount()

template<class TC >
Tick gem5::CheckerThreadContext< TC >::getCurrentInstCount ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 113 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getDecoderPtr()

template<class TC >
InstDecoder * gem5::CheckerThreadContext< TC >::getDecoderPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 153 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getHtmCheckpointPtr()

template<class TC >
BaseHTMCheckpointPtr & gem5::CheckerThreadContext< TC >::getHtmCheckpointPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 325 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getIsaPtr()

template<class TC >
BaseISA * gem5::CheckerThreadContext< TC >::getIsaPtr ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 150 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getMMUPtr()

template<class TC >
BaseMMU * gem5::CheckerThreadContext< TC >::getMMUPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 142 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getProcessPtr()

template<class TC >
Process * gem5::CheckerThreadContext< TC >::getProcessPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 160 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getReg() [1/2]

template<class TC >
RegVal gem5::CheckerThreadContext< TC >::getReg ( const RegId & reg) const
inlineoverridevirtual

Reimplemented from gem5::ThreadContext.

Definition at line 224 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC, and gem5::X86ISA::reg.

◆ getReg() [2/2]

template<class TC >
void gem5::CheckerThreadContext< TC >::getReg ( const RegId & reg,
void * val ) const
inlineoverridevirtual

◆ getSystemPtr()

template<class TC >
System * gem5::CheckerThreadContext< TC >::getSystemPtr ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 158 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ getWritableReg()

template<class TC >
void * gem5::CheckerThreadContext< TC >::getWritableReg ( const RegId & reg)
inlineoverridevirtual

◆ halt()

template<class TC >
void gem5::CheckerThreadContext< TC >::halt ( )
inlineoverridevirtual

Set the status to Halted.

Implements gem5::ThreadContext.

Definition at line 186 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ htmAbortTransaction()

template<class TC >
void gem5::CheckerThreadContext< TC >::htmAbortTransaction ( uint64_t htm_uid,
HtmFailureFaultCause cause )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 319 of file thread_context.hh.

References panic.

◆ pcState() [1/2]

template<class TC >
const PCStateBase & gem5::CheckerThreadContext< TC >::pcState ( ) const
inlineoverridevirtual

Reads this thread's PC state.

Implements gem5::ThreadContext.

Definition at line 256 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ pcState() [2/2]

◆ pcStateNoRecord()

template<class TC >
void gem5::CheckerThreadContext< TC >::pcStateNoRecord ( const PCStateBase & val)
inlineoverridevirtual

◆ readLastActivate()

template<class TC >
Tick gem5::CheckerThreadContext< TC >::readLastActivate ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 202 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ readLastSuspend()

template<class TC >
Tick gem5::CheckerThreadContext< TC >::readLastSuspend ( )
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 203 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ readMiscReg()

template<class TC >
RegVal gem5::CheckerThreadContext< TC >::readMiscReg ( RegIndex misc_reg)
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 282 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ readMiscRegNoEffect()

template<class TC >
RegVal gem5::CheckerThreadContext< TC >::readMiscRegNoEffect ( RegIndex misc_reg) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 276 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ readStCondFailures()

template<class TC >
unsigned gem5::CheckerThreadContext< TC >::readStCondFailures ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 306 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ regStats()

template<class TC >
void gem5::CheckerThreadContext< TC >::regStats ( const std::string & name)
inlineoverridevirtual

◆ remove()

template<class TC >
bool gem5::CheckerThreadContext< TC >::remove ( PCEvent * e)
inlineoverridevirtual

◆ schedule()

template<class TC >
bool gem5::CheckerThreadContext< TC >::schedule ( PCEvent * e)
inlineoverridevirtual

◆ scheduleInstCountEvent()

template<class TC >
void gem5::CheckerThreadContext< TC >::scheduleInstCountEvent ( Event * event,
Tick count )
inlineoverridevirtual

◆ setContextId()

template<class TC >
void gem5::CheckerThreadContext< TC >::setContextId ( ContextID id)
inlineoverridevirtual

◆ setHtmCheckpointPtr()

template<class TC >
void gem5::CheckerThreadContext< TC >::setHtmCheckpointPtr ( BaseHTMCheckpointPtr new_cpt)
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 331 of file thread_context.hh.

References panic.

◆ setMiscReg()

template<class TC >
void gem5::CheckerThreadContext< TC >::setMiscReg ( RegIndex misc_reg,
RegVal val )
inlineoverridevirtual

◆ setMiscRegNoEffect()

template<class TC >
void gem5::CheckerThreadContext< TC >::setMiscRegNoEffect ( RegIndex misc_reg,
RegVal val )
inlineoverridevirtual

◆ setProcessPtr()

template<class TC >
void gem5::CheckerThreadContext< TC >::setProcessPtr ( Process * p)
inlineoverridevirtual

◆ setReg() [1/2]

template<class TC >
void gem5::CheckerThreadContext< TC >::setReg ( const RegId & reg,
const void * val )
inlineoverridevirtual

◆ setReg() [2/2]

template<class TC >
void gem5::CheckerThreadContext< TC >::setReg ( const RegId & reg,
RegVal val )
inlineoverridevirtual

◆ setStatus()

template<class TC >
void gem5::CheckerThreadContext< TC >::setStatus ( Status new_status)
inlineoverridevirtual

◆ setStCondFailures()

template<class TC >
void gem5::CheckerThreadContext< TC >::setStCondFailures ( unsigned sc_failures)
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 312 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ setThreadId()

template<class TC >
void gem5::CheckerThreadContext< TC >::setThreadId ( int id)
inlineoverridevirtual

◆ socketId()

template<class TC >
uint32_t gem5::CheckerThreadContext< TC >::socketId ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 120 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ status()

template<class TC >
Status gem5::CheckerThreadContext< TC >::status ( ) const
inlineoverridevirtual

Implements gem5::ThreadContext.

Definition at line 170 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ suspend()

template<class TC >
void gem5::CheckerThreadContext< TC >::suspend ( )
inlineoverridevirtual

Set the status to Suspended.

Implements gem5::ThreadContext.

Definition at line 183 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

◆ takeOverFrom()

template<class TC >
void gem5::CheckerThreadContext< TC >::takeOverFrom ( ThreadContext * oldContext)
inlineoverridevirtual

◆ threadId()

template<class TC >
int gem5::CheckerThreadContext< TC >::threadId ( ) const
inlineoverridevirtual

Returns this thread's ID number.

Implements gem5::ThreadContext.

Definition at line 134 of file thread_context.hh.

References gem5::CheckerThreadContext< TC >::actualTC.

Member Data Documentation

◆ actualTC

template<class TC >
TC* 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().

◆ checkerCPU

template<class TC >
CheckerCPU* gem5::CheckerThreadContext< TC >::checkerCPU
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().

◆ checkerTC


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

Generated on Tue Jun 18 2024 16:24:10 for gem5 by doxygen 1.11.0