Go to the documentation of this file.
41 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
42 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
44 #include "arch/vecregs.hh"
46 #include "config/the_isa.hh"
90 thread->threadId()).c_str()),
92 "Number of instructions committed"),
94 "Number of ops (including micro ops) committed"),
96 "Number of integer alu accesses"),
98 "Number of float alu accesses"),
100 "Number of vector alu accesses"),
102 "Number of times a function call or return occured"),
104 "Number of instructions that are conditional controls"),
106 "Number of integer instructions"),
108 "Number of float instructions"),
110 "Number of vector instructions"),
112 "Number of times the integer registers were read"),
114 "Number of times the integer registers were written"),
116 "Number of times the floating registers were read"),
118 "Number of times the floating registers were written"),
120 "Number of times the vector registers were read"),
122 "Number of times the vector registers were written"),
124 "Number of times the predicate registers were read"),
126 "Number of times the predicate registers were written"),
128 "Number of times the CC registers were read"),
130 "Number of times the CC registers were written"),
132 "Number of memory refs"),
134 "Number of load instructions"),
136 "Number of store instructions"),
138 "Number of idle cycles"),
140 "Number of busy cycles"),
142 "Percentage of non-idle cycles"),
144 "Percentage of idle cycles"),
146 "ICache total stall cycles"),
148 "DCache total stall cycles"),
150 "Number of branches fetched"),
152 "Number of branches predicted as taken"),
154 "Number of branch mispredictions"),
156 "Class of executed instruction.")
171 .
init(enums::Num_OpClass)
481 assert(byte_enable.size() == size);
491 assert(byte_enable.size() == size);
501 assert(byte_enable.size() == size);
634 #endif // __CPU_EXEC_CONTEXT_HH__
This is a simple scalar statistic, like a counter.
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
RegVal readMiscReg(RegIndex misc_reg) override
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
RegVal readIntReg(RegIndex reg_idx) const override
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
@ VecElemClass
Vector Register Native Elem lane.
const TheISA::VecElem & readVecElem(const RegId ®) const override
@ CCRegClass
Condition-code register.
void armMonitor(ThreadID tid, Addr address)
statistics::Scalar numIntRegWrites
int64_t htmTransactionStops
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
void setIntReg(RegIndex reg_idx, RegVal val) override
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
VecPredReg::Container VecPredRegContainer
const TheISA::VecRegContainer & readVecReg(const RegId ®) const override
ExecContextStats(BaseSimpleCPU *cpu, SimpleThread *thread)
Trace::InstRecord * traceData
bool readMemAccPredicate() const override
statistics::Scalar icacheStallCycles
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
statistics::Scalar numCallsReturns
statistics::Scalar numVecPredRegWrites
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Reads a vector register.
statistics::Scalar numVecRegReads
const FlagsType nozero
Don't print if this is zero.
@ FloatRegClass
Floating-point register.
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
void setMiscReg(RegIndex misc_reg, RegVal val) override
gem5::SimpleExecContext::ExecContextStats execContextStats
void setStCondFailures(unsigned sc_failures) override
uint64_t newHtmTransactionUid() const override
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
A stat that calculates the per tick average of a value.
@ MiscRegClass
Control (misc) register.
RegVal readCCRegOperand(const StaticInst *si, int idx) override
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
A vector of scalar stats.
void setVecReg(const RegId ®, const TheISA::VecRegContainer &val) override
RegVal readCCReg(RegIndex reg_idx) const override
std::string csprintf(const char *format, const Args &...args)
void setPredicate(bool val)
TheISA::PCState pcState() const override
int64_t htmTransactionStarts
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
statistics::Scalar numPredictedBranches
Number of branches predicted as taken.
statistics::Scalar numVecInsts
uint64_t getHtmTransactionalDepth() const override
void setVecElem(const RegId ®, const TheISA::VecElem &val) override
void setVecPredReg(const RegId ®, const TheISA::VecPredRegContainer &val) override
const FlagsType dist
Print the distribution.
void setPredicate(bool val) override
Fault amoMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
const FlagsType pdf
Print the percent of the total that this entry represents.
unsigned readStCondFailures() const override
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >())
void pcState(const TheISA::PCState &val) override
bool mwait(PacketPtr pkt) override
statistics::Scalar numCCRegReads
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
bool readMemAccPredicate()
gem5::BaseCPU::BaseCPUStats baseStats
statistics::Formula numIdleCycles
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
statistics::Scalar numInsts
std::shared_ptr< FaultBase > Fault
bool readPredicate() const
bool inHtmTransactionalState() const override
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
statistics::Scalar numFpRegReads
void mwaitAtomic(ThreadContext *tc) override
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
statistics::Scalar numCCRegWrites
statistics::Scalar numCycles
GenericISA::DelaySlotPCState< 4 > PCState
statistics::Scalar numCondCtrlInsts
bool readPredicate() const override
void setMemAccPredicate(bool val)
statistics::Average notIdleFraction
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
For atomic-mode contexts, perform an atomic memory write operation.
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Reads a vector register for modification.
statistics::Vector statExecutedInstType
int threadId() const override
statistics::Formula numBusyCycles
statistics::Scalar dcacheStallCycles
gem5::VecRegContainer< NumVecElemPerVecReg *sizeof(VecElem)> VecRegContainer
Counter numInst
PER-THREAD STATS.
TheISA::PCState pcState() const override
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
Sets a destination predicate register operand to a value.
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setFloatReg(RegIndex reg_idx, RegVal val) override
statistics::Formula idleFraction
statistics::Scalar numFpInsts
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 readFloatReg(RegIndex reg_idx) const override
statistics::Scalar numVecAluAccesses
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
statistics::Scalar numStoreInsts
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Initiate a timing memory read operation.
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
TheISA::VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
statistics::Scalar numLoadInsts
@ VecRegClass
Vector Register.
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets an element of a vector register to a value.
TheISA::VecRegContainer & getWritableVecReg(const RegId ®) override
const TheISA::VecPredRegContainer & readVecPredReg(const RegId ®) const override
statistics::Scalar numIntInsts
statistics::Scalar numIntAluAccesses
void setMemAccPredicate(bool val) override
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Fault initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
void demapPage(Addr vaddr, uint64_t asn)
AddressMonitor * getAddrMonitor() override
double Counter
All counters are of 64-bit values.
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
statistics::Scalar numFpAluAccesses
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
statistics::Scalar numVecRegWrites
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
statistics::Scalar numIntRegReads
statistics::Scalar numBranches
statistics::Scalar numOps
statistics::Scalar numFpRegWrites
static const OpClass Num_OpClasses
void armMonitor(Addr address) override
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
bool mwait(ThreadID tid, PacketPtr pkt)
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Perform an atomic memory read operation.
statistics::Scalar numBranchMispred
Number of misprediced branches.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
@ IntRegClass
Integer register.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const FlagsType total
Print the total.
Derived & init(size_type size)
Set this vector to have the given size.
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Reads an element of a vector register.
uint64_t getHtmTransactionUid() const override
statistics::Scalar numVecPredRegReads
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
Sets a vector register to a value.
virtual Fault initiateHtmCmd(Request::Flags flags)=0
Hardware transactional memory commands (HtmCmds), e.g.
void setPredicate(bool val)
statistics::Scalar numMemRefs
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
void setCCReg(RegIndex reg_idx, RegVal val) override
Register ID: describe an architectural register with its class and index.
Generated on Tue Sep 21 2021 12:25:00 for gem5 by doxygen 1.8.17