48 #ifndef __CPU_MINOR_EXEC_CONTEXT_HH__ 49 #define __CPU_MINOR_EXEC_CONTEXT_HH__ 57 #include "debug/MinorExecute.hh" 92 DPRINTF(MinorExecute,
"ExecContext setting PC: %s\n", inst->pc);
111 assert(byte_enable.empty() || byte_enable.size() == size);
113 size, addr, flags,
nullptr,
nullptr, byte_enable);
122 assert(byte_enable.empty() || byte_enable.size() == size);
124 size, addr, flags, res,
nullptr, byte_enable);
133 size, addr, flags,
nullptr, std::move(amo_op));
269 template <
typename LD>
virtual void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
bool readMemAccPredicate() const override
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
bool isMiscReg() const
true if it is a condition-code physical register.
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Vector Register Interfaces.
bool readPredicate() const
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
RegVal readCCReg(RegIndex reg_idx) const override
RegVal readMiscRegNoEffect(int misc_reg) const
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
All the fun of executing instructions from Decode and sending branch/new instruction stream info...
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
ContextID contextId() const override
LSQ & getLSQ()
To allow ExecContext to find the LSQ.
void setMemAccPredicate(bool val) override
MinorDynInstPtr inst
Instruction for the benefit of memory operations and for PC.
TheISA::PCState pcState() const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
Execute & execute
The execute stage so we can peek at its contents.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
void setMemAccPredicate(bool val)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
ExecContext bears the exec_context interface for Minor.
RegVal readMiscReg(RegIndex misc_reg) override
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
VecRegContainer & getWritableVecReg(const RegId ®) override
void armMonitor(ThreadID tid, Addr address)
bool isCCReg() const
true if it is a condition-code physical register.
TheISA::PCState pcState() const override
void setVecElem(const RegId ®, const VecElem &val) override
virtual ConstVecLane32 readVec32BitLaneReg(const RegId ®) const override
Reads source vector 32bit operand.
bool isVecElem() const
true if it is a condition-code physical register.
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 setIntReg(RegIndex reg_idx, RegVal val) override
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
void syscall(Fault *fault) override
Executes a syscall.
void demapInstPage(Addr vaddr, uint64_t asn)
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
virtual ConstVecLane64 readVec64BitLaneReg(const RegId ®) const override
Reads source vector 64bit operand.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
virtual ConstVecLane16 readVec16BitLaneReg(const RegId ®) const override
Reads source vector 16bit operand.
bool readMemAccPredicate()
void setCCReg(RegIndex reg_idx, RegVal val) override
RegVal readIntReg(RegIndex reg_idx) const override
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets a vector register to a value.
void setFloatReg(RegIndex reg_idx, RegVal val) override
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
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.
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
RegVal readCCRegOperand(const StaticInst *si, int idx) override
void setStCondFailures(unsigned int st_cond_failures) override
Sets the number of consecutive store conditional failures.
VecPredReg::Container VecPredRegContainer
void pcState(const TheISA::PCState &val) override
const VecPredRegContainer & readVecPredReg(const RegId ®) const override
Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable=std::vector< bool >())
Single interface for readMem/writeMem/amoMem to issue requests into the LSQ.
void demapDataPage(Addr vaddr, uint64_t asn)
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
BaseTLB * getDTBPtr() override
void setMiscReg(RegIndex misc_reg, RegVal val) override
AddressMonitor * getAddrMonitor() override
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
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.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
bool isVecReg() const
true if it is a condition-code physical register.
bool readPredicate() const override
bool mwait(ThreadID tid, PacketPtr pkt)
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Initiate a timing memory read operation.
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
For atomic-mode contexts, perform an atomic memory write operation.
SimpleThread & thread
ThreadState object, provides all the architectural state.
VecReg::Container VecRegContainer
const VecElem & readVecElem(const RegId ®) const override
void armMonitor(Addr address) override
RegVal readFloatReg(RegIndex reg_idx) const override
Base, ISA-independent static instruction class.
const RegIndex & index() const
Index accessors.
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register...
void setPredicate(bool val) override
The constructed pipeline.
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
void setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
virtual void demapPage(Addr vaddr, uint64_t asn)=0
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
ExecContext(MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_)
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
Register ID: describe an architectural register with its class and index.
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register...
void mwaitAtomic(ThreadContext *tc) override
bool isVecPredReg() const
true if it is a predicate physical register.
void setVecReg(const RegId ®, const VecRegContainer &val) override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
MinorCPU is an in-order CPU model with four fixed pipeline stages:
ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Gets destination vector register operand for modification.
Vector Lane abstraction Another view of a container.
GenericISA::DelaySlotPCState< MachInst > PCState
std::shared_ptr< FaultBase > Fault
virtual ConstVecLane8 readVec8BitLaneReg(const RegId ®) const override
Reads source vector 8bit operand.
ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
const VecRegContainer & readVecReg(const RegId ®) const override
int ContextID
Globally unique thread context ID.
BaseTLB * getITBPtr() override
void syscall(Fault *fault) override
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
void setPredicate(bool val)
bool mwait(PacketPtr pkt) override