Go to the documentation of this file.
34 #include "debug/GPUInst.hh"
35 #include "debug/GPUMem.hh"
47 (
Addr)0), numScalarReqs(0), isSaveRestore(false),
48 _staticInst(static_inst), _seqNum(instSeqNum),
49 maxSrcVecRegOpSize(-1), maxSrcScalarRegOpSize(-1)
61 for (
int i = 0;
i < (16 *
sizeof(uint32_t)); ++
i) {
89 DPRINTF(GPUInst,
"%s: generating operand info for %d operands\n",
261 const std::string& extStr)
const
297 enums::StorageClassType
307 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector=%#x\n",
316 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector="
563 if (dstScalarOp.isFlatScratch())
573 if (srcScalarOp.isFlatScratch())
771 fatal(
"flat access is in GPUVM APE\n");
772 }
else if (
bits(
addr[lane], 63, 47) != 0x1FFFF &&
775 fatal(
"flat access at addr %#x has a memory violation\n",
798 }
else if (
executedAs() == enums::SC_PRIVATE) {
817 assert(!(
bits(
addr[lane], 63, 47) != 0x1FFFF
846 panic(
"Invalid memory operation!\n");
869 panic(
"Invalid memory operation!\n");
871 }
else if (
executedAs() == enums::SC_PRIVATE) {
902 uint32_t physSgprIdx =
929 panic(
"Invalid memory operation!\n");
934 panic(
"flat addr %#llx maps to bad segment %d\n",
960 assert(number_pages_touched);
969 .insert(ComputeUnit::pageDataStruct::value_type(it.first,
970 std::make_pair(1, it.second)));
974 ret.first->second.first++;
975 ret.first->second.second += it.second;
1007 }
else if (hopId == 0) {
void initDynOperandInfo(Wavefront *wf, ComputeUnit *cu)
#define fatal(...)
This implements a cprintf based fatal() function.
constexpr unsigned NumVecElemPerVecReg
bool hasDestinationSgpr() const
std::vector< int > tlbHitLevel
bool writesFlatScratch() const
void doApertureCheck(const VectorMask &mask)
bool isCondBranch() const
bool isKernelLaunch() const
virtual int numSrcRegOperands()=0
AddrRange getAddrRange() const
std::vector< Tick > roundTripTime
bool isAtomicExch() const
bool isKernArgSeg() const
std::vector< ScalarRegisterFile * > srf
const std::string & disassemble()
InstSeqNum seqNum() const
bool isOpcode(const std::string &opcodeStr) const
GPUStaticInst * _staticInst
void profileRoundTripTime(Tick currentTime, int hopId)
statistics::Scalar dynamicGMemInstrCnt
bool isAtomicNoRet() const
virtual void initiateAcc(GPUDynInstPtr gpuDynInst)
std::map< Addr, int > pagesTouched
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
const std::vector< OperandInfo > & srcVecRegOperands() const
gem5::ComputeUnit::ComputeUnitStats stats
int maxSrcVecRegOperandSize()
enums::StorageClassType executed_as
int numSrcScalarRegOperands() const
const std::vector< OperandInfo > & srcScalarRegOperands() const
const std::vector< OperandInfo > & dstVecRegOperands() const
bool isFlatGlobal() const
void initiateAcc(GPUDynInstPtr gpuDynInst)
int numSrcVecRegOperands() const
LdsState & getLds() const
const std::string & disassemble() const
bool isGloballyCoherent() const
Coherence domain of a memory instruction.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
bool isAtomicNoRet() const
statistics::Scalar dynamicFlatMemInstrCnt
void profileLineAddressTime(Addr addr, Tick currentTime, int hopId)
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
ComputeUnit * computeUnit()
const std::string & opcode() const
bool isEndOfKernel() const
int mapSgpr(Wavefront *w, int sgprIndex)
bool hasDestinationVgpr() const
pageDataStruct pageAccesses
bool isGloballyCoherent() const
std::vector< int > statusVector
virtual void execute(GPUDynInstPtr gpuDynInst)=0
GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
bool hasSourceVgpr() const
virtual int getNumOperands()=0
bool isUnconditionalJump() const
virtual TheGpuISA::ScalarRegU32 srcLiteral() const
const std::vector< OperandInfo > & dstScalarRegOperands() const
uint64_t Tick
Tick count type.
const std::vector< OperandInfo > & srcVecRegOperands() const
void resolveFlatSegment(const VectorMask &mask)
bool isFlatGlobal() const
RegisterManager * registerManager
bool isSystemCoherent() const
int getNumOperands() const
const std::vector< OperandInfo > & dstVecRegOperands() const
Addr size() const
Get the size of the address range.
GPUStaticInst * staticInstruction()
const std::vector< OperandInfo > & dstScalarRegOperands() const
const ApertureRegister & ldsApe() const
int numDstScalarOperands()
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
bool isReadOnlySeg() const
int maxSrcScalarRegOpSize
ComputeUnit * computeUnit
int numDstScalarRegOperands() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool isLdsApe(Addr addr) const
const std::vector< OperandInfo > & srcOperands() const
std::shared_ptr< GPUDynInst > GPUDynInstPtr
bool isKernArgSeg() const
void decVMemInstsIssued()
const std::vector< OperandInfo > & dstOperands() const
bool isUnconditionalJump() const
bool isKernelLaunch() const
void execute(GPUDynInstPtr gpuDynInst)
void decLGKMInstsIssued()
bool readsFlatScratch() const
bool readsExecMask() const
int numDstVecRegOperands() const
void completeAcc(GPUDynInstPtr gpuDynInst)
bool isSystemCoherent() const
bool isEndOfKernel() const
int numSrcScalarOperands()
TheGpuISA::ScalarRegU32 srcLiteral() const
std::map< Addr, std::vector< Tick > > lineAddressTime
int maxSrcScalarRegOperandSize()
bool isReadOnlySeg() const
statistics::Distribution pageDivergenceDist
bool isPrivateSeg() const
bool writesExecMask() const
bool hasSourceSgpr() const
statistics::Scalar dynamicLMemInstrCnt
virtual void initOperandInfo()=0
virtual void completeAcc(GPUDynInstPtr gpuDynInst)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool isAtomicExch() const
bool isPrivateSeg() const
bool isALU() const
accessor methods for the attributes of the underlying GPU static instruction
virtual int numDstRegOperands()=0
#define panic(...)
This implements a cprintf based panic() function.
const std::vector< OperandInfo > & srcScalarRegOperands() const
bool isCondBranch() const
enums::StorageClassType executedAs()
Addr getHiddenPrivateBase()
Generated on Tue Feb 8 2022 11:47:09 for gem5 by doxygen 1.8.17