Go to the documentation of this file.
42 #ifndef __CPU_CHECKER_CPU_HH__
43 #define __CPU_CHECKER_CPU_HH__
49 #include "arch/types.hh"
58 #include "debug/Checker.hh"
60 #include "params/CheckerCPU.hh"
187 assert(
reg.isIntReg());
195 assert(
reg.isFloatReg());
206 assert(
reg.isVecReg());
217 assert(
reg.isVecReg());
228 assert(
reg.isVecReg());
237 assert(
reg.isVecReg());
246 assert(
reg.isVecReg());
255 assert(
reg.isVecReg());
260 template <
typename LD>
265 assert(
reg.isVecReg());
305 assert(
reg.isVecPredReg());
313 assert(
reg.isVecPredReg());
321 assert(
reg.isCCReg());
361 assert(
reg.isIntReg());
370 assert(
reg.isFloatReg());
379 assert(
reg.isCCReg());
389 assert(
reg.isVecReg());
399 assert(
reg.isVecElem());
408 assert(
reg.isVecPredReg());
436 panic(
"not yet supported!");
443 panic(
"not yet supported!");
450 panic(
"not yet supported!");
457 panic(
"not yet supported!");
464 panic(
"not yet supported!");
496 DPRINTF(
Checker,
"Setting misc reg %d with no effect to check later\n",
505 DPRINTF(
Checker,
"Setting misc reg %d with effect to check later\n",
515 assert(
reg.isMiscReg());
523 assert(
reg.isMiscReg());
574 int& frag_size,
int& size_left)
const;
589 panic(
"AMO is not supported yet in CPU checker\n");
610 Addr pAddr,
int flags);
637 template <
class Impl>
684 #endif // __CPU_CHECKER_CPU_HH__
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
bool mwait(ThreadID tid, PacketPtr pkt)
virtual ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void setVecReg(const RegId ®, const TheISA::VecRegContainer &val) override
std::queue< InstResult > result
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
TheISA::VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
TheISA::PCState pcState() const override
void setMemAccPredicate(bool val)
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
VecReg::Container VecRegContainer
RegVal readCCRegOperand(const StaticInst *si, int idx) override
void serialize(CheckpointOut &cp) const override
Serialize this object to the given output stream.
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Base, ISA-independent static instruction class.
int16_t ThreadID
Thread index/ID type.
virtual ConstVecLane8 readVec8BitLaneReg(const RegId ®) const override
Reads source vector 8bit operand.
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.
RegVal readMiscRegNoEffect(int misc_reg) const
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Read destination vector register operand for modification.
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
std::vector< Process * > workload
void setPredicate(bool val)
virtual ConstVecLane16 readVec16BitLaneReg(const RegId ®) const override
Reads source vector 16bit operand.
void setSystem(System *system)
void setMiscRegNoEffect(int misc_reg, RegVal val)
virtual ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
uint64_t getHtmTransactionUid() const override
void armMonitor(ThreadID tid, Addr address)
VecPredReg::Container VecPredRegContainer
void setIntReg(RegIndex reg_idx, RegVal val) override
bool inHtmTransactionalState() const override
void setCCReg(RegIndex reg_idx, RegVal val) override
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
std::shared_ptr< Request > RequestPtr
virtual ConstVecLane64 readVec64BitLaneReg(const RegId ®) const override
Reads source vector 64bit operand.
void setVecPredResult(T &&t)
void validateInst(const DynInstPtr &inst)
const TheISA::VecPredRegContainer & readVecPredReg(const RegId ®) const override
void validateExecution(const DynInstPtr &inst)
RegVal readCCReg(RegIndex reg_idx) const override
uint64_t newHtmTransactionUid() const override
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Read source vector register operand.
void recordPCChange(const TheISA::PCState &val)
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
void setScalarResult(T &&t)
unsigned readStCondFailures() const override
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
Register ID: describe an architectural register with its class and index.
TheISA::VecRegContainer & getWritableVecReg(const RegId ®) override
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void switchOut()
Prepare for another CPU to take over execution.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
void setMiscReg(RegIndex misc_reg, RegVal val) override
TheISA::PCState newPCState
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets a vector register to a value.
StaticInstPtr curStaticInst
int64_t Counter
Statistics counter type.
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
void armMonitor(Addr address) override
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Addr instAddr() const override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
ClockedObjectParams Params
Parameters of ClockedObject.
Vector Lane abstraction Another view of a container.
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
void handleError(const DynInstPtr &inst)
std::shared_ptr< FaultBase > Fault
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
void setVecElem(const RegId ®, const TheISA::VecElem &val) override
void mwaitAtomic(ThreadContext *tc) override
void setPredicate(bool val) override
Ports are used to interface objects to each other.
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
void setIcachePort(RequestPort *icache_port)
RegVal readMiscReg(RegIndex misc_reg) override
virtual ConstVecLane32 readVec32BitLaneReg(const RegId ®) const override
Reads source vector 32bit operand.
void advancePC(const Fault &fault)
virtual ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
void setVecPredReg(const RegId ®, const TheISA::VecPredRegContainer &val) override
std::queue< int > miscRegIdxs
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
bool readMemAccPredicate()
RegVal readIntReg(RegIndex reg_idx) const override
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Impl::DynInstPtr DynInstPtr
Addr nextInstAddr() const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
constexpr decltype(nullptr) NoFault
RequestorID requestorId
id attached to all issued requests
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
virtual Counter totalOps() const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
void setMemAccPredicate(bool val) override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RegVal readFloatReg(RegIndex reg_idx) const override
MicroPC microPC() const override
bool checkFlags(const RequestPtr &unverified_req, Addr vAddr, Addr pAddr, int flags)
Checks if the flags set by the Checker and Checkee match.
virtual Counter totalInsts() const override
void setFloatReg(RegIndex reg_idx, RegVal val) override
void takeOverFrom(BaseCPU *oldCPU)
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
void verify(const DynInstPtr &inst)
void setVecElemResult(T &&t)
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
void wakeup(ThreadID tid) override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Sets a destination vector register operand to a value.
bool readPredicate() const override
bool readMemAccPredicate() const override
void demapPage(Addr vaddr, uint64_t asn)
GenericISA::DelaySlotPCState< MachInst > PCState
StaticInstPtr curMacroStaticInst
const TheISA::VecRegContainer & readVecReg(const RegId ®) const override
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
std::list< DynInstPtr >::iterator InstListIt
uint64_t getHtmTransactionalDepth() const override
DynInstPtr unverifiedInst
InstResult unverifiedResult
void setDcachePort(RequestPort *dcache_port)
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
AddressMonitor * getAddrMonitor() override
std::ostream CheckpointOut
const RegIndex & index() const
Index accessors.
CheckerCPU(const Params &p)
virtual void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
std::list< DynInstPtr > instList
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.
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
const TheISA::VecElem & readVecElem(const RegId ®) const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
virtual ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
void pcState(const TheISA::PCState &val) override
bool readPredicate() const
SimpleThread * threadBase()
TheISA::PCState pcState() const override
uint8_t * unverifiedMemData
#define panic(...)
This implements a cprintf based panic() function.
bool mwait(PacketPtr pkt) override
Generated on Tue Jun 22 2021 15:28:19 for gem5 by doxygen 1.8.17