Go to the documentation of this file.
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);
119 panic(
"ExecContext::initiateHtmCmd() not implemented on MinorCPU\n");
129 assert(byte_enable.empty() || byte_enable.size() == size);
131 size,
addr, flags, res,
nullptr, byte_enable);
140 size,
addr, flags,
nullptr, std::move(amo_op));
147 assert(
reg.isIntReg());
155 assert(
reg.isFloatReg());
163 assert(
reg.isVecReg());
171 assert(
reg.isVecReg());
179 assert(
reg.isVecElem());
187 assert(
reg.isVecPredReg());
195 assert(
reg.isVecPredReg());
203 assert(
reg.isIntReg());
211 assert(
reg.isFloatReg());
220 assert(
reg.isVecReg());
229 assert(
reg.isVecPredReg());
241 assert(
reg.isVecReg());
251 assert(
reg.isVecReg());
261 assert(
reg.isVecReg());
271 assert(
reg.isVecReg());
276 template <
typename LD>
281 assert(
reg.isVecReg());
315 assert(
reg.isVecElem());
347 panic(
"ExecContext::getHtmTransactionUid() not"
348 "implemented on MinorCPU\n");
355 panic(
"ExecContext::newHtmTransactionUid() not"
356 "implemented on MinorCPU\n");
371 panic(
"ExecContext::getHtmTransactionalDepth() not"
372 "implemented on MinorCPU\n");
410 assert(
reg.isMiscReg());
418 assert(
reg.isMiscReg());
445 assert(
reg.isCCReg());
453 assert(
reg.isCCReg());
bool mwait(ThreadID tid, PacketPtr pkt)
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
ConstVecLane32 readVec32BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 32bit operand.
ContextID contextId() const override
TheISA::PCState pcState() const override
void setMemAccPredicate(bool val)
TheISA::VecRegContainer & getWritableVecRegOperand(const StaticInst *si, int idx) override
Gets destination vector register operand for modification.
void setVecReg(const RegId ®, const VecRegContainer &val) override
RegVal readIntRegOperand(const StaticInst *si, int idx) override
Reads an integer register.
VecReg::Container VecRegContainer
const VecRegContainer & readVecReg(const RegId ®) const override
TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override
Vector Elem Interfaces.
RegVal readCCRegOperand(const StaticInst *si, int idx) override
ConstVecLane16 readVec16BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 16bit operand.
bool inHtmTransactionalState() const override
BaseTLB * getITBPtr() override
Base, ISA-independent static instruction class.
virtual ConstVecLane8 readVec8BitLaneReg(const RegId ®) const override
Reads source vector 8bit operand.
uint64_t newHtmTransactionUid() const override
MinorDynInstPtr inst
Instruction for the benefit of memory operations and for PC.
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector operand.
int ContextID
Globally unique thread context ID.
VecRegContainer & getWritableVecReg(const RegId ®) override
void setVecPredRegOperand(const StaticInst *si, int idx, const TheISA::VecPredRegContainer &val) override
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
void setPredicate(bool val)
RegVal readMiscRegNoEffect(int misc_reg) const
virtual ConstVecLane16 readVec16BitLaneReg(const RegId ®) const override
Reads source vector 16bit operand.
void armMonitor(ThreadID tid, Addr address)
VecPredReg::Container VecPredRegContainer
void mwaitAtomic(ThreadContext *tc) override
void setIntReg(RegIndex reg_idx, RegVal val) override
void setCCReg(RegIndex reg_idx, RegVal val) 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.
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
virtual ConstVecLane64 readVec64BitLaneReg(const RegId ®) const override
Reads source vector 64bit operand.
ConstVecLane64 readVec64BitLaneOperand(const StaticInst *si, int idx) const override
Reads source vector 64bit operand.
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
Execute & execute
The execute stage so we can peek at its contents.
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.
RegVal readCCReg(RegIndex reg_idx) const override
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::TwoByte > &val) override
Register ID: describe an architectural register with its class and index.
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
void setMiscReg(RegIndex misc_reg, RegVal val) override
void setVecElemOperand(const StaticInst *si, int idx, const TheISA::VecElem val) override
Sets a vector register to a value.
ConstVecLane8 readVec8BitLaneOperand(const StaticInst *si, int idx) const override
Vector Register Lane Interfaces.
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
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.
void setPredicate(bool val) override
ExecContext(MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void setStCondFailures(unsigned int st_cond_failures) override
Sets the number of consecutive store conditional failures.
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
Vector Lane abstraction Another view of a container.
MinorCPU is an in-order CPU model with four fixed pipeline stages:
TheISA::PCState pcState() const override
VecPredRegContainer & getWritableVecPredReg(const RegId ®) override
std::shared_ptr< FaultBase > Fault
bool mwait(PacketPtr pkt) override
RegVal readMiscReg(RegIndex misc_reg) override
virtual ConstVecLane32 readVec32BitLaneReg(const RegId ®) const override
Reads source vector 32bit operand.
RegVal readFloatRegOperandBits(const StaticInst *si, int idx) override
Reads a floating point register in its binary format, instead of by value.
const TheISA::VecRegContainer & readVecRegOperand(const StaticInst *si, int idx) const override
Vector Register Interfaces.
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 setVecElem(const RegId ®, const VecElem &val) override
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
bool readMemAccPredicate()
void demapDataPage(Addr vaddr, uint64_t asn)
RegVal readIntReg(RegIndex reg_idx) const override
bool readMemAccPredicate() const override
const TheISA::VecPredRegContainer & readVecPredRegOperand(const StaticInst *si, int idx) const override
Predicate registers interface.
constexpr decltype(nullptr) NoFault
void setVecPredReg(const RegId ®, const VecPredRegContainer &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
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::FourByte > &val) override
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.
void setFloatReg(RegIndex reg_idx, RegVal val) override
const VecPredRegContainer & readVecPredReg(const RegId ®) const override
LSQ & getLSQ()
To allow ExecContext to find the LSQ.
virtual void demapPage(Addr vaddr, uint64_t asn)=0
BaseTLB * getDTBPtr() override
void armMonitor(Addr address) override
void setMemAccPredicate(bool val) override
bool readPredicate() const override
ExecContext bears the exec_context interface for Minor.
GenericISA::DelaySlotPCState< MachInst > PCState
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
AddressMonitor * getAddrMonitor() override
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual void setVecLaneOperand(const StaticInst *si, int idx, const LaneData< LaneSize::EightByte > &val) override
SimpleThread & thread
ThreadState object, provides all the architectural state.
void demapInstPage(Addr vaddr, uint64_t asn)
uint64_t getHtmTransactionalDepth() const override
void setCCRegOperand(const StaticInst *si, int idx, RegVal val) override
void setIntRegOperand(const StaticInst *si, int idx, RegVal val) override
Sets an integer register to a value.
void syscall() override
Executes a syscall.
virtual void setVecLane(const RegId ®, const LaneData< LaneSize::Byte > &val) override
Write a lane of the destination vector register.
void setVecRegOperand(const StaticInst *si, int idx, const TheISA::VecRegContainer &val) override
uint64_t getHtmTransactionUid() const override
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
const VecElem & readVecElem(const RegId ®) const override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
LaneSize is an abstraction of a LS byte value for the execution and thread contexts to handle values ...
void setVecLaneOperandT(const StaticInst *si, int idx, const LD &val)
Write a lane of the destination vector operand.
bool readPredicate() const
TheISA::VecPredRegContainer & getWritableVecPredRegOperand(const StaticInst *si, int idx) override
Gets destination predicate register operand for modification.
void pcState(const TheISA::PCState &val) override
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17