Go to the documentation of this file.
36 #include "debug/GPUMem.hh"
45 (
Addr)0), numScalarReqs(0), isSaveRestore(false),
46 _staticInst(static_inst), _seqNum(instSeqNum)
57 for (
int i = 0;
i < (16 *
sizeof(uint32_t)); ++
i) {
241 const std::string& extStr)
const
265 Enums::StorageClassType
277 for (
int j = 0;
j <
s->getNumOperands(); ++
j) {
278 if (
s->isVectorRegister(
j) &&
s->isDstOperand(
j)) {
294 for (
int j = 0;
j <
s->getNumOperands(); ++
j) {
295 if (
s->isScalarRegister(
j) &&
s->isDstOperand(
j)) {
309 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector=%#x\n",
318 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector="
755 fatal(
"flat access is in GPUVM APE\n");
756 }
else if (
bits(
addr[lane], 63, 47) != 0x1FFFF &&
759 fatal(
"flat access at addr %#x has a memory violation\n",
782 }
else if (
executedAs() == Enums::SC_PRIVATE) {
801 assert(!(
bits(
addr[lane], 63, 47) != 0x1FFFF
831 panic(
"Invalid memory operation!\n");
838 panic(
"Flat group memory operation is unimplemented!\n");
851 panic(
"Invalid memory operation!\n");
853 }
else if (
executedAs() == Enums::SC_PRIVATE) {
884 uint32_t physSgprIdx =
911 panic(
"Invalid memory operation!\n");
916 panic(
"flat addr %#llx maps to bad segment %d\n",
942 assert(number_pages_touched);
951 .insert(ComputeUnit::pageDataStruct::value_type(it.first,
952 std::make_pair(1, it.second)));
956 ret.first->second.first++;
957 ret.first->second.second += it.second;
989 }
else if (hopId == 0) {
bool isAtomicExch() const
#define fatal(...)
This implements a cprintf based fatal() function.
GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
void initiateAcc(GPUDynInstPtr gpuDynInst)
bool readsExecMask() const
std::map< Addr, int > pagesTouched
bool hasSgprRawDependence(GPUDynInstPtr s)
bool srcIsVgpr(int index) const
bool isEndOfKernel() const
Stats::Scalar dynamicLMemInstrCnt
bool isSystemCoherent() const
bool isKernArgSeg() const
virtual int numSrcRegOperands()=0
bool isDstOperand(int operandIdx)
bool isKernelLaunch() const
virtual int getNumOperands()=0
Stats::Scalar dynamicFlatMemInstrCnt
void decVMemInstsIssued()
bool hasSourceVgpr() const
uint64_t Tick
Tick count type.
bool isKernelLaunch() const
int numOpdDWORDs(int operandIdx)
int mapSgpr(Wavefront *w, int sgprIndex)
int getOperandSize(int operandIdx)
virtual TheGpuISA::ScalarRegU32 srcLiteral() const
Enums::StorageClassType executed_as
RegisterManager * registerManager
bool isScalarRegister(int operandIdx)
void profileRoundTripTime(Tick currentTime, int hopId)
virtual int getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst)=0
Stats::Distribution pageDivergenceDist
const std::string & disassemble()
void completeAcc(GPUDynInstPtr gpuDynInst)
virtual int numDstRegOperands()=0
virtual bool isVectorRegister(int operandIndex)=0
std::map< Addr, std::vector< Tick > > lineAddressTime
const std::string & opcode() const
bool writesFlatScratch() const
bool isSystemCoherent() const
virtual void execute(GPUDynInstPtr gpuDynInst)=0
void doApertureCheck(const VectorMask &mask)
virtual bool isExecMaskRegister(int opIdx)=0
virtual void initiateAcc(GPUDynInstPtr gpuDynInst)
ComputeUnit * computeUnit
std::vector< ScalarRegisterFile * > srf
bool isAtomicExch() const
bool isUnconditionalJump() const
bool hasVgprRawDependence(GPUDynInstPtr s)
GPUStaticInst * staticInstruction()
Enums::StorageClassType executedAs()
virtual bool isDstOperand(int operandIndex)=0
bool hasDestinationVgpr() const
void resolveFlatSegment(const VectorMask &mask)
virtual bool isSrcOperand(int operandIndex)=0
constexpr unsigned NumVecElemPerVecReg
TheGpuISA::ScalarRegU32 srcLiteral() const
bool isUnconditionalJump() const
bool readsFlatScratch() const
void execute(GPUDynInstPtr gpuDynInst)
virtual bool isFlatScratchRegister(int opIdx)=0
Addr getHiddenPrivateBase()
virtual bool isScalarRegister(int operandIndex)=0
bool isCondBranch() const
bool isGloballyCoherent() const
InstSeqNum seqNum() const
bool isGloballyCoherent() const
Coherence domain of a memory instruction.
bool isAtomicNoRet() const
bool isOpcode(const std::string &opcodeStr) const
virtual int getOperandSize(int operandIndex)=0
bool isPrivateSeg() const
int getRegisterIndex(int operandIdx, GPUDynInstPtr gpuDynInst)
bool isReadOnlySeg() 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)
void decLGKMInstsIssued()
bool isEndOfKernel() const
bool isReadOnlySeg() const
bool hasDestinationSgpr() const
GPUStaticInst * _staticInst
bool writesExecMask() const
std::vector< int > tlbHitLevel
pageDataStruct pageAccesses
bool isSrcOperand(int operandIdx)
std::vector< Tick > roundTripTime
bool isVectorRegister(int operandIdx)
bool isKernArgSeg() const
std::shared_ptr< GPUDynInst > GPUDynInstPtr
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
bool hasSourceSgpr() const
int numOpdDWORDs(int operandIdx)
bool isPrivateSeg() const
ComputeUnit * computeUnit()
bool isALU() const
accessor methods for the attributes of the underlying GPU static instruction
bool isAtomicNoRet() const
bool isLdsApe(Addr addr) const
bool isCondBranch() const
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
virtual void completeAcc(GPUDynInstPtr gpuDynInst)
std::vector< int > statusVector
Stats::Scalar dynamicGMemInstrCnt
#define panic(...)
This implements a cprintf based panic() function.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17