42#ifndef __CPU_CHECKER_CPU_HH__
43#define __CPU_CHECKER_CPU_HH__
57#include "debug/Checker.hh"
59#include "params/CheckerCPU.hh"
179 const RegId&
id =
si->srcRegIdx(idx);
200 const RegId&
id =
si->destRegIdx(idx);
211 const RegId&
id =
si->destRegIdx(idx);
242 panic(
"not yet supported!");
249 panic(
"not yet supported!");
256 panic(
"not yet supported!");
302 DPRINTF(
Checker,
"Setting misc reg %d with no effect to check later\n",
311 DPRINTF(
Checker,
"Setting misc reg %d with effect to check later\n",
383 int& frag_size,
int& size_left)
const;
397 panic(
"AMO is not supported yet in CPU checker\n");
446template <
class DynInstPtr>
459 void verify(
const DynInstPtr &inst);
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
bool mwait(ThreadID tid, PacketPtr pkt)
void armMonitor(ThreadID tid, Addr address)
void demapPage(Addr vaddr, uint64_t asn)
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
uint64_t newHtmTransactionUid() const override
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
uint64_t getHtmTransactionalDepth() const override
void recordPCChange(const PCStateBase &val)
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
virtual Counter totalOps() const override
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
InstResult unverifiedResult
StaticInstPtr curStaticInst
void serialize(CheckpointOut &cp) const override
Serialize this object to the given output stream.
std::queue< int > miscRegIdxs
std::unique_ptr< PCStateBase > newPCState
std::queue< InstResult > result
void setIcachePort(RequestPort *icache_port)
void setSystem(System *system)
RegVal getRegOperand(const StaticInst *si, int idx) override
uint64_t getHtmTransactionUid() const override
const PCStateBase & pcState() const override
std::vector< Process * > workload
void pcState(const PCStateBase &val) override
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
void armMonitor(Addr address) override
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
RegVal readMiscRegNoEffect(int misc_reg) const
void setPredicate(bool val) override
virtual Counter totalInsts() const override
void wakeup(ThreadID tid) override
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
void setMemAccPredicate(bool val) override
SimpleThread * threadBase()
RequestorID requestorId
id attached to all issued requests
bool readPredicate() const override
void setMiscRegNoEffect(int misc_reg, RegVal val)
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
bool checkFlags(const RequestPtr &unverified_req, Addr vAddr, Addr pAddr, int flags)
Checks if the flags set by the Checker and Checkee match.
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
bool inHtmTransactionalState() const override
void setRegOperand(const StaticInst *si, int idx, const void *val) override
uint8_t * unverifiedMemData
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
bool readMemAccPredicate() const 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.
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
void mwaitAtomic(ThreadContext *tc) override
bool mwait(PacketPtr pkt) override
AddressMonitor * getAddrMonitor() override
void getRegOperand(const StaticInst *si, int idx, void *val) override
void setDcachePort(RequestPort *dcache_port)
StaticInstPtr curMacroStaticInst
void * getWritableRegOperand(const StaticInst *si, int idx) override
void validateExecution(const DynInstPtr &inst)
DynInstPtr unverifiedInst
void verify(const DynInstPtr &inst)
void validateInst(const DynInstPtr &inst)
std::list< DynInstPtr > instList
void advancePC(const Fault &fault)
void copyResult(const DynInstPtr &inst, const InstResult &mismatch_val, int start_idx)
void handleError(const DynInstPtr &inst)
void switchOut()
Prepare for another CPU to take over execution.
std::list< DynInstPtr >::iterator InstListIt
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...
ClockedObjectParams Params
Parameters of ClockedObject.
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
Register ID: describe an architectural register with its class and index.
constexpr const RegClass & regClass() const
Class accessor.
constexpr RegIndex index() const
Index accessors.
RegId flatten(const BaseISA &isa) const
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
bool readPredicate() const
void setPredicate(bool val)
int64_t htmTransactionStops
bool readMemAccPredicate()
const PCStateBase & pcState() const override
void setMiscReg(RegIndex misc_reg, RegVal val) override
void * getWritableReg(const RegId &arch_reg) override
unsigned readStCondFailures() const override
void setReg(const RegId &arch_reg, RegVal val) override
int64_t htmTransactionStarts
void setMiscRegNoEffect(RegIndex misc_reg, RegVal val) override
RegVal readMiscReg(RegIndex misc_reg) override
void setMemAccPredicate(bool val)
BaseISA * getIsaPtr() const override
RegVal getReg(const RegId &arch_reg) const override
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
#define panic(...)
This implements a cprintf based panic() function.
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
std::shared_ptr< Request > RequestPtr
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
constexpr decltype(nullptr) NoFault
@ MiscRegClass
Control (misc) register.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
Declaration of Statistics objects.