45 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
46 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
48 #include "arch/registers.hh"
50 #include "config/the_isa.hh"
279 {
panic(
"BaseSimpleCPU::setEA() not implemented\n"); }
287 {
panic(
"BaseSimpleCPU::getEA() not implemented\n"); }
304 return cpu->
writeMem(data, size, addr, flags, res);
329 panic(
"Syscall emulation isn't available in FS mode.");
400 #if THE_ISA == MIPS_ISA
404 panic(
"Simple CPU models do not support multithreaded "
411 panic(
"Simple CPU models do not support multithreaded "
419 #endif // __CPU_EXEC_CONTEXT_HH__
MiscReg readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register...
uint64_t readIntReg(int reg_idx)
Stats::Scalar numFpAluAccesses
void setMiscReg(int misc_reg, const MiscReg &val, ThreadID tid=0)
Stats::Average notIdleFraction
A stat that calculates the per tick average of a value.
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res) override
For atomic-mode contexts, perform an atomic memory write operation.
FloatReg readFloatRegOperand(const StaticInst *si, int idx) override
Reads a floating point register of single register width.
MiscReg readMiscRegOperand(const StaticInst *si, int idx) override
Stats::Scalar numLoadInsts
Stats::Scalar numIntAluAccesses
Stats::Vector statExecutedInstType
TheISA::FloatRegBits FloatRegBits
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
void setCCRegOperand(const StaticInst *si, int idx, CCReg val) override
bool readPredicate() override
TheISA::FloatReg FloatReg
RegIndex destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
Stats::Scalar numCCRegReads
bool simPalCheck(int palFunc)
Check for special simulator handling of specific PAL calls.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Stats::Scalar numFpRegWrites
Stats::Scalar numIntRegReads
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
A vector of scalar stats.
Stats::Formula numIdleCycles
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
void setStCondFailures(unsigned sc_failures)
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
This is a simple scalar statistic, like a counter.
void setCCReg(int reg_idx, CCReg val)
PCState pcState() const override
void syscall(int64_t callnum, Fault *fault)
ThreadID threadId() const
unsigned readStCondFailures()
TheISA::FloatReg FloatReg
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.
Stats::Scalar icacheStallCycles
AddressMonitor * getAddrMonitor() override
void setPredicate(bool val) override
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
FloatRegBits readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags)=0
void mwaitAtomic(ThreadContext *tc) override
TheISA::FloatRegBits FloatRegBits
Stats::Scalar numPredictedBranches
Number of branches predicted as taken.
MiscReg readMiscReg(int misc_reg, ThreadID tid=0)
ThreadContext * tcBase() override
Returns a pointer to the ThreadContext.
Stats::Scalar dcacheStallCycles
Stats::Scalar numIntRegWrites
void setPredicate(bool val)
void setMiscRegOperand(const StaticInst *si, int idx, const MiscReg &val) override
MiscReg readRegOtherThread(int regIdx, ThreadID tid=InvalidThreadID) override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Stats::Scalar numIntInsts
void demapPage(Addr vaddr, uint64_t asn)
void setFloatRegBits(int reg_idx, FloatRegBits val)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
Stats::Formula numBusyCycles
int64_t Counter
Statistics counter type.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void setFloatReg(int reg_idx, FloatReg val)
RegIndex srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
void pcState(const PCState &val) override
Stats::Scalar numBranches
const ThreadID InvalidThreadID
void setRegOtherThread(int regIdx, MiscReg val, ThreadID tid=InvalidThreadID) override
Counter numInst
PER-THREAD STATS.
TheISA::PCState pcState()
CCReg readCCReg(int reg_idx)
int16_t ThreadID
Thread index/ID type.
FloatReg readFloatReg(int reg_idx)
bool mwait(PacketPtr pkt) override
Stats::Scalar numCallsReturns
void setIntReg(int reg_idx, uint64_t val)
void setFloatRegOperand(const StaticInst *si, int idx, FloatReg val) override
Sets a floating point register of single width to a value.
void setMiscReg(int misc_reg, const MiscReg &val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register...
Stats::Scalar numFpRegReads
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res)=0
void setIntRegOperand(const StaticInst *si, int idx, IntReg val) override
Sets an integer register to a value.
FloatRegBits readFloatRegBits(int reg_idx)
Trace::InstRecord * traceData
void setEA(Addr EA) override
Record the effective address of the instruction.
GenericISA::SimplePCState< MachInst > PCState
Fault hwrei() override
Somewhat Alpha-specific function that handles returning from an error or interrupt.
CCReg readCCRegOperand(const StaticInst *si, int idx) override
Base, ISA-independent static instruction class.
Stats::Scalar numStoreInsts
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags)=0
IntReg readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
Stats::Scalar numCCRegWrites
Stats::Formula idleFraction
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags) override
Perform an atomic memory read operation.
void syscall(int64_t callnum, Fault *fault) override
Executes a syscall specified by the callnum.
void armMonitor(Addr address) override
bool simPalCheck(int palFunc) override
Check for special simulator handling of specific PAL calls.
Addr getEA() const override
Get the effective address of the instruction.
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags) override
Initiate a timing memory read operation.
std::shared_ptr< FaultBase > Fault
Stats::Scalar numBranchMispred
Number of misprediced branches.
void setPredicate(bool val)
Stats::Scalar numCondCtrlInsts