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"
191 assert(
reg.isIntReg());
199 assert(
reg.isFloatReg());
210 assert(
reg.isVecReg());
221 assert(
reg.isVecReg());
232 assert(
reg.isVecReg());
241 assert(
reg.isVecReg());
250 assert(
reg.isVecReg());
259 assert(
reg.isVecReg());
264 template <
typename LD>
269 assert(
reg.isVecReg());
309 assert(
reg.isVecPredReg());
317 assert(
reg.isVecPredReg());
325 assert(
reg.isCCReg());
365 assert(
reg.isIntReg());
374 assert(
reg.isFloatReg());
383 assert(
reg.isCCReg());
393 assert(
reg.isVecReg());
403 assert(
reg.isVecElem());
412 assert(
reg.isVecPredReg());
440 panic(
"not yet supported!");
447 panic(
"not yet supported!");
454 panic(
"not yet supported!");
461 panic(
"not yet supported!");
468 panic(
"not yet supported!");
500 DPRINTF(
Checker,
"Setting misc reg %d with no effect to check later\n",
509 DPRINTF(
Checker,
"Setting misc reg %d with effect to check later\n",
519 assert(
reg.isMiscReg());
527 assert(
reg.isMiscReg());
586 int& frag_size,
int& size_left)
const;
601 panic(
"AMO is not supported yet in CPU checker\n");
625 Addr pAddr,
int flags);
652 template <
class Impl>
699 #endif // __CPU_CHECKER_CPU_HH__
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
std::queue< InstResult > result
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Read destination vector register operand for modification.
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.
Generic predicate register container.
void setVecReg(const RegId ®, const VecRegContainer &val) override
void setVecElemOperand(const StaticInst *si, int idx, const VecElem val) override
Sets a vector register to a value.
void demapInstPage(Addr vaddr, uint64_t asn)
VecReg::Container VecRegContainer
const VecRegContainer & readVecReg(const RegId ®) const override
RegVal readCCRegOperand(const StaticInst *si, int idx) override
void serialize(CheckpointOut &cp) const override
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.
VecRegContainer & getWritableVecReg(const RegId ®) override
RegVal readMiscRegNoEffect(int misc_reg) const
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)
void setIntReg(RegIndex reg_idx, RegVal val) override
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) 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
VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
virtual ConstVecLane64 readVec64BitLaneReg(const RegId ®) const override
Reads source vector 64bit operand.
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
void setVecPredResult(T &&t)
void validateInst(const DynInstPtr &inst)
void validateExecution(const DynInstPtr &inst)
RegVal readCCReg(RegIndex reg_idx) const override
uint64_t newHtmTransactionUid() const override
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.
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 setVecPredRegOperand(const StaticInst *si, int idx, const VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
void setMiscReg(RegIndex misc_reg, RegVal val) override
TheISA::PCState newPCState
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
TheISA::MachInst MachInst
void unserialize(CheckpointIn &cp) override
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.
void demapDataPage(Addr vaddr, uint64_t asn)
Vector Lane abstraction Another view of a container.
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
void setVecRegOperand(const StaticInst *si, int idx, const VecRegContainer &val) override
Sets a destination vector register operand to a value.
VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
void handleError(const DynInstPtr &inst)
std::shared_ptr< FaultBase > Fault
void mwaitAtomic(ThreadContext *tc) override
void setPredicate(bool val) override
Ports are used to interface objects to each other.
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...
VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
std::queue< int > miscRegIdxs
void setVecElem(const RegId ®, const VecElem &val) override
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 setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
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
const VecPredRegContainer & readVecPredReg(const RegId ®) const override
const VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
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
virtual void demapPage(Addr vaddr, uint64_t asn)=0
bool readPredicate() const override
bool readMemAccPredicate() const override
GenericISA::DelaySlotPCState< MachInst > PCState
StaticInstPtr curMacroStaticInst
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
const VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Read source vector register operand.
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.
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
void syscall() override
Executes a syscall.
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 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
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
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 Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17