Go to the documentation of this file.
34 #ifndef __GPU_DYN_INST_HH__
35 #define __GPU_DYN_INST_HH__
44 #include "debug/GPUMem.hh"
45 #include "enums/StorageClassType.hh"
122 uint64_t instSeqNum);
157 bool isOpcode(
const std::string& opcodeStr)
const;
158 bool isOpcode(
const std::string& opcodeStr,
159 const std::string& extStr)
const;
306 return std::make_unique<AtomicOpAnd<c0>>(*reg0);
308 return std::make_unique<AtomicOpOr<c0>>(*reg0);
310 return std::make_unique<AtomicOpXor<c0>>(*reg0);
312 return std::make_unique<AtomicOpCAS<c0>>(*reg0, *reg1,
cu);
314 return std::make_unique<AtomicOpExch<c0>>(*reg0);
316 return std::make_unique<AtomicOpAdd<c0>>(*reg0);
318 return std::make_unique<AtomicOpSub<c0>>(*reg0);
320 return std::make_unique<AtomicOpInc<c0>>();
322 return std::make_unique<AtomicOpDec<c0>>();
324 return std::make_unique<AtomicOpMax<c0>>(*reg0);
326 return std::make_unique<AtomicOpMin<c0>>(*reg0);
328 fatal(
"Unrecognized atomic operation");
383 assert((newVal >= 0) && (newVal <= 2));
419 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: lane: %d has %d pending "
427 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: all lanes have no pending"
437 std::string statusVec_str =
"[";
444 statusVec_str +=
"]";
446 return statusVec_str;
497 #endif // __GPU_DYN_INST_HH__
#define fatal(...)
This implements a cprintf based fatal() function.
constexpr unsigned NumVecElemPerVecReg
bool hasDestinationSgpr() const
std::vector< int > tlbHitLevel
const int opIdx
Index of this operand within the set of its parent instruction's operand list.
bool writesFlatScratch() const
AtomicOpFunctorPtr makeAtomicOpFunctor(c0 *reg0, c0 *reg1)
void doApertureCheck(const VectorMask &mask)
bool isCondBranch() const
bool isKernelLaunch() const
std::unordered_map< Addr, std::vector< int > > StatusVector
std::vector< Tick > roundTripTime
const std::map< Addr, std::vector< Tick > > & getLineAddressTime() const
void setAccessTime(Tick currentTime)
bool isKernArgSeg() const
void decrementStatusVector(int lane)
InstSeqNum seqNum() const
Tick getAccessTime() const
bool isOpcode(const std::string &opcodeStr) const
GPUStaticInst * _staticInst
void profileRoundTripTime(Tick currentTime, int hopId)
const std::string to_string(sc_enc enc)
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
const std::vector< OperandInfo > & srcVecRegOperands() const
@ SLC_BIT
user-policy flags
gem5::ComputeUnit::ComputeUnitStats stats
int maxSrcVecRegOperandSize()
const std::vector< int > physIndices
int numSrcScalarRegOperands() const
void initiateAcc(GPUDynInstPtr gpuDynInst)
int numSrcVecRegOperands() const
AtomicOpFunctor * clone()
const std::string & disassemble() const
bool isAtomicNoRet() const
void profileLineAddressTime(Addr addr, Tick currentTime, int hopId)
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
const int numDWORDs
Size of this operand in DWORDs.
int getLaneStatus(int lane) const
int numRegisters() const
The number of registers required to store this operand.
StatusVector memStatusVector
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
bool hasDestinationVgpr() const
bool isGloballyCoherent() const
std::vector< int > statusVector
@ ATOMIC_NO_RETURN_OP
The request is an atomic that does not return data.
GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
bool hasSourceVgpr() const
bool isUnconditionalJump() const
ComputeUnit * computeUnit
const std::vector< OperandInfo > & dstScalarRegOperands() const
uint64_t Tick
Tick count type.
void resolveFlatSegment(const VectorMask &mask)
std::shared_ptr< Request > RequestPtr
statistics::Scalar numCASOps
bool isSystemCoherent() const
int getNumOperands() const
const std::vector< OperandInfo > & dstVecRegOperands() const
const int RegSizeDWords
Size of a single-precision register in DWords.
AtomicOpCAS(T _c, T _s, ComputeUnit *compute_unit)
GPUStaticInst * staticInstruction()
bool allLanesZero() const
const std::vector< int > virtIndices
int maxSrcScalarRegOpSize
int numDstScalarRegOperands() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::shared_ptr< GPUDynInst > GPUDynInstPtr
std::string printStatusVector() const
RegisterOperandInfo()=delete
void setRequestFlags(RequestPtr req) const
std::vector< Tick > getRoundTripTime() const
void execute(GPUDynInstPtr gpuDynInst)
RegisterOperandInfo(int op_idx, int num_dwords, const std::vector< int > &virt_indices, const std::vector< int > &phys_indices)
bool readsFlatScratch() const
bool readsExecMask() const
int numDstVecRegOperands() const
void resetEntireStatusVector()
void completeAcc(GPUDynInstPtr gpuDynInst)
bool isEndOfKernel() const
TheGpuISA::ScalarRegU32 srcLiteral() const
std::map< Addr, std::vector< Tick > > lineAddressTime
int maxSrcScalarRegOperandSize()
bool isReadOnlySeg() const
bool isPrivateSeg() const
bool writesExecMask() const
bool hasSourceSgpr() const
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
statistics::Scalar numFailedCASOps
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void resetStatusVector(int lane)
bool isAtomicExch() const
int virtIdx(int reg_num=0) const
We typically only need the first virtual register for the operand regardless of its size.
bool isALU() const
accessor methods for the attributes of the underlying GPU static instruction
void setStatusVector(int lane, int newVal)
const std::vector< OperandInfo > & srcScalarRegOperands() const
enums::StorageClassType executedAs()
Generated on Wed Jul 28 2021 12:10:27 for gem5 by doxygen 1.8.17