Go to the documentation of this file.
36 #include "debug/GPUInst.hh"
37 #include "debug/GPUMem.hh"
49 (
Addr)0), numScalarReqs(0), isSaveRestore(false),
50 _staticInst(static_inst), _seqNum(instSeqNum),
51 maxSrcVecRegOpSize(-1), maxSrcScalarRegOpSize(-1)
63 for (
int i = 0;
i < (16 *
sizeof(uint32_t)); ++
i) {
91 DPRINTF(GPUInst,
"%s: generating operand info for %d operands\n",
263 const std::string& extStr)
const
287 enums::StorageClassType
297 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector=%#x\n",
306 DPRINTF(GPUMem,
"CU%d: WF[%d][%d]: mempacket status bitvector="
547 if (dstScalarOp.isFlatScratch())
557 if (srcScalarOp.isFlatScratch())
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
830 panic(
"Invalid memory operation!\n");
837 panic(
"Flat group memory operation is unimplemented!\n");
850 panic(
"Invalid memory operation!\n");
852 }
else if (
executedAs() == enums::SC_PRIVATE) {
883 uint32_t physSgprIdx =
910 panic(
"Invalid memory operation!\n");
915 panic(
"flat addr %#llx maps to bad segment %d\n",
941 assert(number_pages_touched);
950 .insert(ComputeUnit::pageDataStruct::value_type(it.first,
951 std::make_pair(1, it.second)));
955 ret.first->second.first++;
956 ret.first->second.second += it.second;
988 }
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
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
void initiateAcc(GPUDynInstPtr gpuDynInst)
int numSrcVecRegOperands() 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)
RegisterManager * registerManager
bool isSystemCoherent() const
int getNumOperands() const
const std::vector< OperandInfo > & dstVecRegOperands() const
GPUStaticInst * staticInstruction()
const std::vector< OperandInfo > & dstScalarRegOperands() 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 Wed Jul 28 2021 12:10:27 for gem5 by doxygen 1.8.17