Go to the documentation of this file.
32 #ifndef __GPU_DYN_INST_HH__
33 #define __GPU_DYN_INST_HH__
42 #include "debug/GPUMem.hh"
43 #include "enums/StorageClassType.hh"
120 uint64_t instSeqNum);
155 bool isOpcode(
const std::string& opcodeStr)
const;
156 bool isOpcode(
const std::string& opcodeStr,
157 const std::string& extStr)
const;
308 return std::make_unique<AtomicOpAnd<c0>>(*reg0);
310 return std::make_unique<AtomicOpOr<c0>>(*reg0);
312 return std::make_unique<AtomicOpXor<c0>>(*reg0);
314 return std::make_unique<AtomicOpCAS<c0>>(*reg0, *reg1,
cu);
316 return std::make_unique<AtomicOpExch<c0>>(*reg0);
318 return std::make_unique<AtomicOpAdd<c0>>(*reg0);
320 return std::make_unique<AtomicOpSub<c0>>(*reg0);
322 return std::make_unique<AtomicOpInc<c0>>();
324 return std::make_unique<AtomicOpDec<c0>>();
326 return std::make_unique<AtomicOpMax<c0>>(*reg0);
328 return std::make_unique<AtomicOpMin<c0>>(*reg0);
330 fatal(
"Unrecognized atomic operation");
385 assert((newVal >= 0) && (newVal <= 2));
421 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: lane: %d has %d pending "
429 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: all lanes have no pending"
439 std::string statusVec_str =
"[";
446 statusVec_str +=
"]";
448 return statusVec_str;
499 #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)
@ SLC_BIT
user-policy flags
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
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
bool hasDestinationVgpr() const
bool isGloballyCoherent() const
std::vector< int > statusVector
GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
bool hasSourceVgpr() const
bool isUnconditionalJump() const
@ ATOMIC_NO_RETURN_OP
The request is an atomic that does not return data.
ComputeUnit * computeUnit
const std::vector< OperandInfo > & dstScalarRegOperands() const
uint64_t Tick
Tick count type.
void resolveFlatSegment(const VectorMask &mask)
bool isFlatGlobal() const
std::shared_ptr< Request > RequestPtr
statistics::Scalar numCASOps
bool isSystemCoherent() const
int getNumOperands() const
const std::vector< OperandInfo > & dstVecRegOperands() const
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
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 Tue Feb 8 2022 11:47:09 for gem5 by doxygen 1.8.17