Go to the documentation of this file.
34 #ifndef __GPU_DYN_INST_HH__
35 #define __GPU_DYN_INST_HH__
43 #include "debug/GPUMem.hh"
44 #include "enums/StorageClassType.hh"
108 bool isOpcode(
const std::string& opcodeStr)
const;
109 bool isOpcode(
const std::string& opcodeStr,
110 const std::string& extStr)
const;
258 return m5::make_unique<AtomicOpAnd<c0>>(*reg0);
260 return m5::make_unique<AtomicOpOr<c0>>(*reg0);
262 return m5::make_unique<AtomicOpXor<c0>>(*reg0);
264 return m5::make_unique<AtomicOpCAS<c0>>(*reg0, *reg1,
cu);
266 return m5::make_unique<AtomicOpExch<c0>>(*reg0);
268 return m5::make_unique<AtomicOpAdd<c0>>(*reg0);
270 return m5::make_unique<AtomicOpSub<c0>>(*reg0);
272 return m5::make_unique<AtomicOpInc<c0>>();
274 return m5::make_unique<AtomicOpDec<c0>>();
276 return m5::make_unique<AtomicOpMax<c0>>(*reg0);
278 return m5::make_unique<AtomicOpMin<c0>>(*reg0);
280 fatal(
"Unrecognized atomic operation");
335 assert((newVal >= 0) && (newVal <= 2));
371 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: lane: %d has %d pending "
379 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: all lanes have no pending"
389 std::string statusVec_str =
"[";
396 statusVec_str +=
"]";
398 return statusVec_str;
445 #endif // __GPU_DYN_INST_HH__
#define fatal(...)
This implements a cprintf based fatal() function.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
@ ACQUIRE
The request should be marked with ACQUIRE.
GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
void initiateAcc(GPUDynInstPtr gpuDynInst)
StatusVector memStatusVector
bool readsExecMask() const
bool allLanesZero() const
bool hasSgprRawDependence(GPUDynInstPtr s)
bool srcIsVgpr(int index) const
bool isKernArgSeg() const
bool isDstOperand(int operandIdx)
bool isKernelLaunch() const
void resetStatusVector(int lane)
const std::string to_string(sc_enc enc)
bool hasSourceVgpr() const
std::unordered_map< Addr, std::vector< int > > StatusVector
uint64_t Tick
Tick count type.
int getOperandSize(int operandIdx)
std::shared_ptr< Request > RequestPtr
bool isScalarRegister(int operandIdx)
AtomicOpCAS(T _c, T _s, ComputeUnit *compute_unit)
void profileRoundTripTime(Tick currentTime, int hopId)
AtomicOpFunctorPtr makeAtomicOpFunctor(c0 *reg0, c0 *reg1)
void completeAcc(GPUDynInstPtr gpuDynInst)
std::map< Addr, std::vector< Tick > > lineAddressTime
bool writesFlatScratch() const
bool isSystemCoherent() const
void doApertureCheck(const VectorMask &mask)
ComputeUnit * computeUnit
bool isAtomicExch() const
bool isUnconditionalJump() const
bool hasVgprRawDependence(GPUDynInstPtr s)
GPUStaticInst * staticInstruction()
Enums::StorageClassType executedAs()
bool hasDestinationVgpr() const
std::string printStatusVector() const
@ SLC_BIT
user-policy flags
void resolveFlatSegment(const VectorMask &mask)
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
constexpr unsigned NumVecElemPerVecReg
TheGpuISA::ScalarRegU32 srcLiteral() const
bool readsFlatScratch() const
void execute(GPUDynInstPtr gpuDynInst)
Stats::Scalar numFailedCASOps
bool isCondBranch() const
void decrementStatusVector(int lane)
bool isGloballyCoherent() const
InstSeqNum seqNum() const
bool isAtomicNoRet() const
bool isOpcode(const std::string &opcodeStr) const
bool isPrivateSeg() const
int getRegisterIndex(int operandIdx, GPUDynInstPtr gpuDynInst)
bool isReadOnlySeg() const
void setRequestFlags(RequestPtr req) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & disassemble() const
void profileLineAddressTime(Addr addr, Tick currentTime, int hopId)
const std::map< Addr, std::vector< Tick > > & getLineAddressTime() const
Tick getAccessTime() const
bool isEndOfKernel() const
bool hasDestinationSgpr() const
AtomicOpFunctor * clone()
GPUStaticInst * _staticInst
void resetEntireStatusVector()
void setAccessTime(Tick currentTime)
bool writesExecMask() const
std::vector< int > tlbHitLevel
bool isSrcOperand(int operandIdx)
std::vector< Tick > roundTripTime
bool isVectorRegister(int operandIdx)
void setStatusVector(int lane, int newVal)
@ ATOMIC_NO_RETURN_OP
The request is an atomic that does not return data.
std::shared_ptr< GPUDynInst > GPUDynInstPtr
bool hasSourceSgpr() const
int numOpdDWORDs(int operandIdx)
std::vector< Tick > getRoundTripTime() const
bool isALU() const
accessor methods for the attributes of the underlying GPU static instruction
int getLaneStatus(int lane) const
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
std::vector< int > statusVector
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17