gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Checker< Impl > Class Template Reference

Templated Checker class. More...

#include <cpu.hh>

Inheritance diagram for Checker< Impl >:
CheckerCPU BaseCPU ExecContext

Public Member Functions

 Checker (Params *p)
 
void switchOut ()
 
void takeOverFrom (BaseCPU *oldCPU)
 
void advancePC (const Fault &fault)
 
void verify (DynInstPtr &inst)
 
void validateInst (DynInstPtr &inst)
 
void validateExecution (DynInstPtr &inst)
 
void validateState ()
 
void copyResult (DynInstPtr &inst, uint64_t mismatch_val, int start_idx)
 
void handlePendingInt ()
 
- Public Member Functions inherited from CheckerCPU
void init () override
 
 CheckerCPU (Params *p)
 
virtual ~CheckerCPU ()
 
void setSystem (System *system)
 
void setIcachePort (MasterPort *icache_port)
 
void setDcachePort (MasterPort *dcache_port)
 
MasterPortgetDataPort () override
 
MasterPortgetInstPort () override
 
TheISA::TLB * getITBPtr ()
 
TheISA::TLB * getDTBPtr ()
 
virtual Counter totalInsts () const override
 
virtual Counter totalOps () const override
 
void serialize (CheckpointOut &cp) const override
 
void unserialize (CheckpointIn &cp) override
 
void setEA (Addr EA) override
 Record the effective address of the instruction. More...
 
Addr getEA () const override
 Get the effective address of the instruction. More...
 
IntReg readIntRegOperand (const StaticInst *si, int idx) override
 Reads an integer register. More...
 
FloatReg readFloatRegOperand (const StaticInst *si, int idx) override
 Reads a floating point register of single register width. More...
 
FloatRegBits readFloatRegOperandBits (const StaticInst *si, int idx) override
 Reads a floating point register in its binary format, instead of by value. More...
 
CCReg readCCRegOperand (const StaticInst *si, int idx) override
 
template<class T >
void setResult (T t)
 
void setIntRegOperand (const StaticInst *si, int idx, IntReg val) override
 Sets an integer register to a value. More...
 
void setFloatRegOperand (const StaticInst *si, int idx, FloatReg val) override
 Sets a floating point register of single width to a value. More...
 
void setFloatRegOperandBits (const StaticInst *si, int idx, FloatRegBits 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, CCReg val) override
 
bool readPredicate () override
 
void setPredicate (bool val) override
 
TheISA::PCState pcState () const override
 
void pcState (const TheISA::PCState &val) override
 
Addr instAddr ()
 
Addr nextInstAddr ()
 
MicroPC microPC ()
 
MiscReg readMiscRegNoEffect (int misc_reg) const
 
MiscReg 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, const MiscReg &val)
 
void setMiscReg (int misc_reg, const MiscReg &val) override
 Sets a miscellaneous register, handling any architectural side effects due to writing that register. More...
 
MiscReg readMiscRegOperand (const StaticInst *si, int idx) override
 
void setMiscRegOperand (const StaticInst *si, int idx, const MiscReg &val) override
 
MiscReg readRegOtherThread (int misc_reg, ThreadID tid) override
 
void setRegOtherThread (int misc_reg, MiscReg val, ThreadID tid) override
 
void recordPCChange (const TheISA::PCState &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
 
void demapInstPage (Addr vaddr, uint64_t asn)
 
void demapDataPage (Addr vaddr, uint64_t asn)
 
Fault readMem (Addr addr, uint8_t *data, unsigned size, Request::Flags flags) override
 
Fault writeMem (uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res) 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...
 
Fault hwrei () override
 Somewhat Alpha-specific function that handles returning from an error or interrupt. More...
 
bool simPalCheck (int palFunc) override
 Check for special simulator handling of specific PAL calls. More...
 
void wakeup (ThreadID tid) override
 
void syscall (int64_t callnum, Fault *fault) override
 Executes a syscall specified by the callnum. More...
 
void handleError ()
 
bool checkFlags (Request *unverified_req, Addr vAddr, Addr pAddr, int flags)
 Checks if the flags set by the Checker and Checkee match. More...
 
void dumpAndExit ()
 
ThreadContexttcBase () override
 Returns a pointer to the ThreadContext. More...
 
SimpleThreadthreadBase ()
 
- Public Member Functions inherited from ExecContext
virtual Fault readMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags)
 Perform an atomic memory read operation. More...
 
virtual Fault initiateMemRead (Addr addr, unsigned int size, Request::Flags flags)
 Initiate a timing memory read operation. More...
 
virtual Fault writeMem (uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res)=0
 For atomic-mode contexts, perform an atomic memory write operation. More...
 

Private Types

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

Private Member Functions

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

Private Attributes

bool updateThisCycle
 
DynInstPtr unverifiedInst
 
std::list< DynInstPtrinstList
 

Additional Inherited Members

- Public Types inherited from CheckerCPU
typedef CheckerCPUParams Params
 
- Public Types inherited from ExecContext
typedef TheISA::IntReg IntReg
 
typedef TheISA::PCState PCState
 
typedef TheISA::FloatReg FloatReg
 
typedef TheISA::FloatRegBits FloatRegBits
 
typedef TheISA::MiscReg MiscReg
 
typedef TheISA::CCReg CCReg
 
- Static Public Member Functions inherited from BaseCPU
static int numSimulatedInsts ()
 
static int numSimulatedOps ()
 
static void wakeup (ThreadID tid)
 
- Public Attributes inherited from CheckerCPU
SimpleThreadthread
 
Counter numLoad
 
Counter startNumLoad
 
Result unverifiedResult
 
RequestunverifiedReq
 
uint8_t * unverifiedMemData
 
bool changedPC
 
bool willChangePC
 
TheISA::PCState newPCState
 
bool exitOnError
 
bool updateOnError
 
bool warnOnlyOnLoadError
 
InstSeqNum youngestSN
 
- Protected Types inherited from CheckerCPU
typedef TheISA::MachInst MachInst
 
typedef TheISA::FloatReg FloatReg
 
typedef TheISA::FloatRegBits FloatRegBits
 
typedef TheISA::MiscReg MiscReg
 
- Protected Member Functions inherited from CheckerCPU
Addr dbg_vtophys (Addr addr)
 
- Protected Attributes inherited from CheckerCPU
MasterID masterId
 id attached to all issued requests More...
 
std::vector< Process * > workload
 
SystemsystemPtr
 
MasterPorticachePort
 
MasterPortdcachePort
 
ThreadContexttc
 
TheISA::TLB * itb
 
TheISA::TLB * dtb
 
std::queue< Resultresult
 
RequestPtr memReq
 
StaticInstPtr curStaticInst
 
StaticInstPtr curMacroStaticInst
 
Counter numInst
 
Counter startNumInst
 
std::queue< int > miscRegIdxs
 

Detailed Description

template<class Impl>
class Checker< Impl >

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 433 of file cpu.hh.

Member Typedef Documentation

template<class Impl>
typedef Impl::DynInstPtr Checker< Impl >::DynInstPtr
private

Definition at line 436 of file cpu.hh.

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

Definition at line 474 of file cpu.hh.

Constructor & Destructor Documentation

template<class Impl>
Checker< Impl >::Checker ( Params p)
inline

Definition at line 439 of file cpu.hh.

Member Function Documentation

template<class Impl >
void Checker< Impl >::advancePC ( const Fault fault)
template<class Impl >
void Checker< Impl >::copyResult ( DynInstPtr inst,
uint64_t  mismatch_val,
int  start_idx 
)
template<class Impl >
void Checker< Impl >::dumpAndExit ( DynInstPtr inst)
private

Definition at line 641 of file cpu_impl.hh.

References cprintf(), and CheckerCPU::dumpAndExit().

template<class Impl >
void Checker< Impl >::dumpInsts ( )
private

Definition at line 657 of file cpu_impl.hh.

References cprintf().

template<class Impl>
void Checker< Impl >::handleError ( DynInstPtr inst)
inlineprivate

Definition at line 458 of file cpu.hh.

template<class Impl >
void Checker< Impl >::handlePendingInt ( )

Definition at line 93 of file cpu_impl.hh.

References curTick(), DPRINTF, StaticInst::nullStaticInstPtr, panic, and CheckerCPU::pcState().

template<class Impl >
void Checker< Impl >::switchOut ( )

Definition at line 448 of file cpu_impl.hh.

template<class Impl >
void Checker< Impl >::takeOverFrom ( BaseCPU oldCPU)

Definition at line 455 of file cpu_impl.hh.

template<class Impl >
void Checker< Impl >::validateExecution ( DynInstPtr inst)

Definition at line 482 of file cpu_impl.hh.

References curTick(), DPRINTF, ArmISA::i, and warn.

template<class Impl >
void Checker< Impl >::validateInst ( DynInstPtr inst)

Definition at line 461 of file cpu_impl.hh.

References curTick(), and warn.

template<class Impl >
void Checker< Impl >::validateState ( )

Definition at line 567 of file cpu_impl.hh.

References AlphaISA::advancePC(), curTick(), NoFault, and panic.

template<class Impl >
void Checker< Impl >::verify ( DynInstPtr inst)

Member Data Documentation

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

Definition at line 473 of file cpu.hh.

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

Definition at line 471 of file cpu.hh.

template<class Impl>
bool Checker< Impl >::updateThisCycle
private

Definition at line 469 of file cpu.hh.

Referenced by Checker< O3CPUImpl >::handleError().


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

Generated on Fri Jun 9 2017 13:04:04 for gem5 by doxygen 1.8.6