gem5  v21.2.1.1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gem5::Checker< DynInstPtr > Class Template Reference

Templated Checker class. More...

#include <cpu.hh>

Inheritance diagram for gem5::Checker< DynInstPtr >:
gem5::CheckerCPU gem5::ExecContext gem5::o3::Checker

Public Member Functions

 Checker (const Params &p)
 
void switchOut ()
 
void takeOverFrom (BaseCPU *oldCPU)
 
void advancePC (const Fault &fault)
 
void verify (const DynInstPtr &inst)
 
void validateInst (const DynInstPtr &inst)
 
void validateExecution (const DynInstPtr &inst)
 
void validateState ()
 
void copyResult (const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
 
void handlePendingInt ()
 
- Public Member Functions inherited from gem5::CheckerCPU
void init () override
 
 PARAMS (CheckerCPU)
 
 CheckerCPU (const Params &p)
 
virtual ~CheckerCPU ()
 
void setSystem (System *system)
 
void setIcachePort (RequestPort *icache_port)
 
void setDcachePort (RequestPort *dcache_port)
 
PortgetDataPort () override
 
PortgetInstPort () override
 
BaseMMUgetMMUPtr ()
 
virtual Counter totalInsts () const override
 
virtual Counter totalOps () const override
 
void serialize (CheckpointOut &cp) const override
 
void unserialize (CheckpointIn &cp) override
 
RegVal readIntRegOperand (const StaticInst *si, int idx) override
 Reads an integer register. More...
 
RegVal readFloatRegOperandBits (const StaticInst *si, int idx) override
 Reads a floating point register in its binary format, instead of by value. More...
 
const TheISA::VecRegContainer & readVecRegOperand (const StaticInst *si, int idx) const override
 Read source vector register operand. More...
 
TheISA::VecRegContainer & getWritableVecRegOperand (const StaticInst *si, int idx) override
 Read destination vector register operand for modification. More...
 
RegVal readVecElemOperand (const StaticInst *si, int idx) const override
 Vector Elem Interfaces. More...
 
const TheISA::VecPredRegContainer & readVecPredRegOperand (const StaticInst *si, int idx) const override
 Predicate registers interface. More...
 
TheISA::VecPredRegContainer & getWritableVecPredRegOperand (const StaticInst *si, int idx) override
 Gets destination predicate register operand for modification. More...
 
RegVal readCCRegOperand (const StaticInst *si, int idx) override
 
void setIntRegOperand (const StaticInst *si, int idx, RegVal val) override
 Sets an integer register to a value. More...
 
void setFloatRegOperandBits (const StaticInst *si, int idx, RegVal val) override
 Sets the bits of a floating point register of single width to a binary value. More...
 
void setCCRegOperand (const StaticInst *si, int idx, RegVal val) override
 
void setVecRegOperand (const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
 Sets a destination vector register operand to a value. More...
 
void setVecElemOperand (const StaticInst *si, int idx, RegVal val) override
 Sets a vector register to a value. More...
 
void setVecPredRegOperand (const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
 Sets a destination predicate register operand to a value. More...
 
bool readPredicate () const override
 
void setPredicate (bool val) override
 
bool readMemAccPredicate () const override
 
void setMemAccPredicate (bool val) override
 
uint64_t getHtmTransactionUid () const override
 
uint64_t newHtmTransactionUid () const override
 
Fault initiateHtmCmd (Request::Flags flags) override
 Initiate an HTM command, e.g. More...
 
bool inHtmTransactionalState () const override
 
uint64_t getHtmTransactionalDepth () const override
 
const PCStateBasepcState () const override
 
void pcState (const PCStateBase &val) override
 
RegVal readMiscRegNoEffect (int misc_reg) const
 
RegVal readMiscReg (int misc_reg) override
 Reads a miscellaneous register, handling any architectural side effects due to reading that register. More...
 
void setMiscRegNoEffect (int misc_reg, RegVal val)
 
void setMiscReg (int misc_reg, RegVal val) override
 Sets a miscellaneous register, handling any architectural side effects due to writing that register. More...
 
RegVal readMiscRegOperand (const StaticInst *si, int idx) override
 
void setMiscRegOperand (const StaticInst *si, int idx, RegVal val) override
 
void recordPCChange (const PCStateBase &val)
 
void demapPage (Addr vaddr, uint64_t asn) override
 Invalidate a page in the DTLB and ITLB. More...
 
void armMonitor (Addr address) override
 
bool mwait (PacketPtr pkt) override
 
void mwaitAtomic (ThreadContext *tc) override
 
AddressMonitor * getAddrMonitor () override
 
RequestPtr genMemFragmentRequest (Addr frag_addr, int size, Request::Flags flags, const std::vector< bool > &byte_enable, int &frag_size, int &size_left) const
 Helper function used to generate the request for a single fragment of a memory access. More...
 
Fault readMem (Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
 
Fault writeMem (uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
 
Fault amoMem (Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
 
unsigned int readStCondFailures () const override
 Returns the number of consecutive store conditional failures. More...
 
void setStCondFailures (unsigned int sc_failures) override
 Sets the number of consecutive store conditional failures. More...
 
void wakeup (ThreadID tid) override
 
void handleError ()
 
bool checkFlags (const RequestPtr &unverified_req, Addr vAddr, Addr pAddr, int flags)
 Checks if the flags set by the Checker and Checkee match. More...
 
void dumpAndExit ()
 
ThreadContexttcBase () const override
 Returns a pointer to the ThreadContext. More...
 
SimpleThreadthreadBase ()
 
- Public Member Functions inherited from gem5::ExecContext
virtual Fault readMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable)
 Perform an atomic memory read operation. More...
 
virtual Fault initiateMemRead (Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable)
 Initiate a timing memory read operation. More...
 
virtual Fault writeMem (uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable)=0
 For atomic-mode contexts, perform an atomic memory write operation. More...
 
virtual Fault amoMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
 For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation) More...
 
virtual Fault initiateMemAMO (Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
 For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation) More...
 

Private Types

typedef std::list< DynInstPtr >::iterator InstListIt
 

Private Member Functions

void handleError (const DynInstPtr &inst)
 
void dumpAndExit (const DynInstPtr &inst)
 
void dumpInsts ()
 

Private Attributes

bool updateThisCycle
 
DynInstPtr unverifiedInst
 
std::list< DynInstPtr > instList
 

Additional Inherited Members

- Public Attributes inherited from gem5::CheckerCPU
SimpleThreadthread
 
Counter numLoad
 
Counter startNumLoad
 
InstResult unverifiedResult
 
RequestPtr unverifiedReq
 
uint8_t * unverifiedMemData
 
bool changedPC
 
bool willChangePC
 
std::unique_ptr< PCStateBasenewPCState
 
bool exitOnError
 
bool updateOnError
 
bool warnOnlyOnLoadError
 
InstSeqNum youngestSN
 
- Protected Attributes inherited from gem5::CheckerCPU
RequestorID requestorId
 id attached to all issued requests More...
 
const RegIndex zeroReg
 
std::vector< Process * > workload
 
SystemsystemPtr
 
RequestPorticachePort
 
RequestPortdcachePort
 
ThreadContexttc
 
BaseMMUmmu
 
std::queue< InstResultresult
 
StaticInstPtr curStaticInst
 
StaticInstPtr curMacroStaticInst
 
Counter numInst
 
Counter startNumInst
 
std::queue< int > miscRegIdxs
 

Detailed Description

template<class DynInstPtr>
class gem5::Checker< DynInstPtr >

Templated Checker class.

This Checker class is templated on the DynInstPtr of the instruction type that will be verified. Proper template instantiations of the Checker must be placed at the bottom of checker/cpu.cc.

Definition at line 531 of file cpu.hh.

Member Typedef Documentation

◆ InstListIt

template<class DynInstPtr >
typedef std::list<DynInstPtr>::iterator gem5::Checker< DynInstPtr >::InstListIt
private

Definition at line 571 of file cpu.hh.

Constructor & Destructor Documentation

◆ Checker()

template<class DynInstPtr >
gem5::Checker< DynInstPtr >::Checker ( const Params &  p)
inline

Definition at line 534 of file cpu.hh.

Member Function Documentation

◆ advancePC()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::advancePC ( const Fault fault)

Definition at line 67 of file cpu_impl.hh.

◆ copyResult()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::copyResult ( const DynInstPtr &  inst,
const InstResult mismatch_val,
int  start_idx 
)

Definition at line 579 of file cpu_impl.hh.

◆ dumpAndExit()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::dumpAndExit ( const DynInstPtr &  inst)
private

Definition at line 643 of file cpu_impl.hh.

◆ dumpInsts()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::dumpInsts
private

Definition at line 658 of file cpu_impl.hh.

◆ handleError()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::handleError ( const DynInstPtr &  inst)
inlineprivate

Definition at line 555 of file cpu.hh.

◆ handlePendingInt()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::handlePendingInt

Definition at line 86 of file cpu_impl.hh.

◆ switchOut()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::switchOut

Definition at line 435 of file cpu_impl.hh.

◆ takeOverFrom()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::takeOverFrom ( BaseCPU *  oldCPU)

Definition at line 441 of file cpu_impl.hh.

◆ validateExecution()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::validateExecution ( const DynInstPtr &  inst)

Definition at line 466 of file cpu_impl.hh.

◆ validateInst()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::validateInst ( const DynInstPtr &  inst)

Definition at line 445 of file cpu_impl.hh.

◆ validateState()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::validateState

Definition at line 553 of file cpu_impl.hh.

◆ verify()

template<class DynInstPtr >
void gem5::Checker< DynInstPtr >::verify ( const DynInstPtr &  inst)

Definition at line 120 of file cpu_impl.hh.

Member Data Documentation

◆ instList

template<class DynInstPtr >
std::list<DynInstPtr> gem5::Checker< DynInstPtr >::instList
private

Definition at line 570 of file cpu.hh.

◆ unverifiedInst

template<class DynInstPtr >
DynInstPtr gem5::Checker< DynInstPtr >::unverifiedInst
private

Definition at line 568 of file cpu.hh.

◆ updateThisCycle

template<class DynInstPtr >
bool gem5::Checker< DynInstPtr >::updateThisCycle
private

Definition at line 566 of file cpu.hh.

Referenced by gem5::Checker< gem5::RefCountingPtr >::handleError().


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

Generated on Wed May 4 2022 12:14:31 for gem5 by doxygen 1.8.17