gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
GPUDynInst Class Reference

#include <gpu_dyn_inst.hh>

Inheritance diagram for GPUDynInst:
GPUExecContext

Public Types

typedef std::unordered_map
< Addr, std::vector< int > > 
StatusVector
 

Public Member Functions

 GPUDynInst (ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *static_inst, uint64_t instSeqNum)
 
 ~GPUDynInst ()
 
void execute (GPUDynInstPtr gpuDynInst)
 
int numSrcRegOperands ()
 
int numDstRegOperands ()
 
int getNumOperands ()
 
bool isVectorRegister (int operandIdx)
 
bool isScalarRegister (int operandIdx)
 
bool isCondRegister (int operandIdx)
 
int getRegisterIndex (int operandIdx, GPUDynInstPtr gpuDynInst)
 
int getOperandSize (int operandIdx)
 
bool isDstOperand (int operandIdx)
 
bool isSrcOperand (int operandIdx)
 
const std::string & disassemble () const
 
uint64_t seqNum () const
 
Enums::StorageClassType executedAs ()
 
void initiateAcc (GPUDynInstPtr gpuDynInst)
 
void completeAcc (GPUDynInstPtr gpuDynInst)
 
void updateStats ()
 
GPUStaticInststaticInstruction ()
 
bool isALU () const
 accessor methods for the attributes of the underlying GPU static instruction More...
 
bool isBranch () const
 
bool isNop () const
 
bool isReturn () const
 
bool isUnconditionalJump () const
 
bool isSpecialOp () const
 
bool isWaitcnt () const
 
bool isBarrier () const
 
bool isMemFence () const
 
bool isMemRef () const
 
bool isFlat () const
 
bool isLoad () const
 
bool isStore () const
 
bool isAtomic () const
 
bool isAtomicNoRet () const
 
bool isAtomicRet () const
 
bool isScalar () const
 
bool readsSCC () const
 
bool writesSCC () const
 
bool readsVCC () const
 
bool writesVCC () const
 
bool isAtomicAnd () const
 
bool isAtomicOr () const
 
bool isAtomicXor () const
 
bool isAtomicCAS () const
 
bool isAtomicExch () const
 
bool isAtomicAdd () const
 
bool isAtomicSub () const
 
bool isAtomicInc () const
 
bool isAtomicDec () const
 
bool isAtomicMax () const
 
bool isAtomicMin () const
 
bool isArgLoad () const
 
bool isGlobalMem () const
 
bool isLocalMem () const
 
bool isArgSeg () const
 
bool isGlobalSeg () const
 
bool isGroupSeg () const
 
bool isKernArgSeg () const
 
bool isPrivateSeg () const
 
bool isReadOnlySeg () const
 
bool isSpillSeg () const
 
bool isWorkitemScope () const
 
bool isWavefrontScope () const
 
bool isWorkgroupScope () const
 
bool isDeviceScope () const
 
bool isSystemScope () const
 
bool isNoScope () const
 
bool isRelaxedOrder () const
 
bool isAcquire () const
 
bool isRelease () const
 
bool isAcquireRelease () const
 
bool isNoOrder () const
 
bool isGloballyCoherent () const
 
bool isSystemCoherent () const
 
template<typename c0 >
AtomicOpFunctormakeAtomicOpFunctor (c0 *reg0, c0 *reg1)
 
void setRequestFlags (Request *req, bool setMemOrder=true)
 
- Public Member Functions inherited from GPUExecContext
 GPUExecContext (ComputeUnit *_cu, Wavefront *_wf)
 
Wavefrontwavefront ()
 
ComputeUnitcomputeUnit ()
 
TheGpuISA::MiscReg readMiscReg (int opIdx) const
 
void writeMiscReg (int opIdx, TheGpuISA::MiscReg operandVal)
 

Public Attributes

std::vector< Addraddr
 
Addr pAddr
 
uint8_t * d_data
 
uint8_t * a_data
 
uint8_t * x_data
 
VectorMask exec_mask
 
Enums::MemType m_type
 
int equiv
 
vgpr_type v_type
 
int n_reg
 
int dst_reg
 
int dst_reg_vec [4]
 
int simdId
 
int wfDynId
 
int kern_id
 
int cu_id
 
int wfSlotId
 
int pipeId
 
Tick time
 
WaitClass latency
 
uint32_t bc [4]
 
uint8_t * rom
 
int sz_rom
 
std::function< void(GPUStaticInst
*, GPUDynInstPtr)> 
execContinuation
 
bool useContinuation
 
StatusVector memStatusVector
 
VectorMask statusBitVector
 
std::vector< int > statusVector
 
std::vector< int > tlbHitLevel
 

Private Attributes

GPUStaticInst_staticInst
 
uint64_t _seqNum
 

Additional Inherited Members

- Protected Attributes inherited from GPUExecContext
ComputeUnitcu
 
Wavefrontwf
 
TheGpuISA::GPUISA * gpuISA
 

Detailed Description

Definition at line 185 of file gpu_dyn_inst.hh.

Member Typedef Documentation

typedef std::unordered_map<Addr, std::vector<int> > GPUDynInst::StatusVector

Definition at line 446 of file gpu_dyn_inst.hh.

Constructor & Destructor Documentation

GPUDynInst::GPUDynInst ( ComputeUnit _cu,
Wavefront _wf,
GPUStaticInst static_inst,
uint64_t  instSeqNum 
)
GPUDynInst::~GPUDynInst ( )

Definition at line 62 of file gpu_dyn_inst.cc.

References a_data, d_data, and x_data.

Member Function Documentation

void GPUDynInst::completeAcc ( GPUDynInstPtr  gpuDynInst)

Definition at line 165 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::completeAcc().

const std::string & GPUDynInst::disassemble ( ) const

Definition at line 136 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::disassemble().

Referenced by setRequestFlags().

void GPUDynInst::execute ( GPUDynInstPtr  gpuDynInst)

Definition at line 70 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::execute().

Enums::StorageClassType GPUDynInst::executedAs ( )

Definition at line 148 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::executed_as.

int GPUDynInst::getNumOperands ( )

Definition at line 88 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::getNumOperands().

int GPUDynInst::getOperandSize ( int  operandIdx)

Definition at line 118 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::getOperandSize().

int GPUDynInst::getRegisterIndex ( int  operandIdx,
GPUDynInstPtr  gpuDynInst 
)

Definition at line 112 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::getRegisterIndex().

void GPUDynInst::initiateAcc ( GPUDynInstPtr  gpuDynInst)
bool GPUDynInst::isAcquire ( ) const

Definition at line 468 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAcquire().

Referenced by setRequestFlags().

bool GPUDynInst::isAcquireRelease ( ) const

Definition at line 480 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAcquireRelease().

Referenced by setRequestFlags().

bool GPUDynInst::isALU ( ) const

accessor methods for the attributes of the underlying GPU static instruction

Definition at line 175 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isALU().

bool GPUDynInst::isArgLoad ( ) const

Definition at line 366 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isArgLoad().

bool GPUDynInst::isArgSeg ( ) const

Definition at line 384 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isArgSeg().

bool GPUDynInst::isAtomic ( ) const

Definition at line 253 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomic().

bool GPUDynInst::isAtomicAdd ( ) const

Definition at line 330 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicAdd().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicAnd ( ) const

Definition at line 301 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicAnd().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicCAS ( ) const

Definition at line 319 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicCAS().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicDec ( ) const

Definition at line 348 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicDec().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicExch ( ) const

Definition at line 324 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicExch().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicInc ( ) const

Definition at line 342 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicInc().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicMax ( ) const

Definition at line 354 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicMax().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicMin ( ) const

Definition at line 360 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicMin().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicNoRet ( ) const

Definition at line 259 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicNoRet().

Referenced by setRequestFlags().

bool GPUDynInst::isAtomicOr ( ) const

Definition at line 307 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicOr().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicRet ( ) const

Definition at line 265 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicRet().

Referenced by setRequestFlags().

bool GPUDynInst::isAtomicSub ( ) const

Definition at line 336 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicSub().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isAtomicXor ( ) const

Definition at line 313 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isAtomicXor().

Referenced by makeAtomicOpFunctor().

bool GPUDynInst::isBarrier ( ) const

Definition at line 217 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isBarrier().

bool GPUDynInst::isBranch ( ) const

Definition at line 181 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isBranch().

bool GPUDynInst::isCondRegister ( int  operandIdx)

Definition at line 106 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isCondRegister().

bool GPUDynInst::isDeviceScope ( ) const

Definition at line 444 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isDeviceScope().

Referenced by setRequestFlags().

bool GPUDynInst::isDstOperand ( int  operandIdx)

Definition at line 124 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isDstOperand().

bool GPUDynInst::isFlat ( ) const

Definition at line 235 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isFlat().

Referenced by setRequestFlags().

bool GPUDynInst::isGloballyCoherent ( ) const

Definition at line 492 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isGloballyCoherent().

bool GPUDynInst::isGlobalMem ( ) const

Definition at line 372 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isGlobalMem().

bool GPUDynInst::isGlobalSeg ( ) const

Definition at line 390 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isGlobalSeg().

Referenced by setRequestFlags().

bool GPUDynInst::isGroupSeg ( ) const

Definition at line 396 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isGroupSeg().

Referenced by setRequestFlags().

bool GPUDynInst::isKernArgSeg ( ) const

Definition at line 402 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isKernArgSeg().

bool GPUDynInst::isLoad ( ) const

Definition at line 241 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isLoad().

bool GPUDynInst::isLocalMem ( ) const

Definition at line 378 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isLocalMem().

bool GPUDynInst::isMemFence ( ) const

Definition at line 223 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isMemFence().

bool GPUDynInst::isMemRef ( ) const

Definition at line 229 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isMemRef().

bool GPUDynInst::isNoOrder ( ) const

Definition at line 486 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isNoOrder().

Referenced by setRequestFlags().

bool GPUDynInst::isNop ( ) const

Definition at line 187 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isNop().

bool GPUDynInst::isNoScope ( ) const

Definition at line 456 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isNoScope().

Referenced by setRequestFlags().

bool GPUDynInst::isPrivateSeg ( ) const

Definition at line 408 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isPrivateSeg().

Referenced by setRequestFlags().

bool GPUDynInst::isReadOnlySeg ( ) const

Definition at line 414 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isReadOnlySeg().

Referenced by setRequestFlags().

bool GPUDynInst::isRelaxedOrder ( ) const

Definition at line 462 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isRelaxedOrder().

bool GPUDynInst::isRelease ( ) const

Definition at line 474 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isRelease().

Referenced by setRequestFlags().

bool GPUDynInst::isReturn ( ) const

Definition at line 193 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isReturn().

bool GPUDynInst::isScalar ( ) const

Definition at line 271 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isScalar().

bool GPUDynInst::isScalarRegister ( int  operandIdx)

Definition at line 100 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isScalarRegister().

bool GPUDynInst::isSpecialOp ( ) const

Definition at line 205 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isSpecialOp().

bool GPUDynInst::isSpillSeg ( ) const

Definition at line 420 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isSpillSeg().

Referenced by setRequestFlags().

bool GPUDynInst::isSrcOperand ( int  operandIdx)

Definition at line 130 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isSrcOperand().

bool GPUDynInst::isStore ( ) const

Definition at line 247 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isStore().

bool GPUDynInst::isSystemCoherent ( ) const

Definition at line 498 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isSystemCoherent().

bool GPUDynInst::isSystemScope ( ) const

Definition at line 450 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isSystemScope().

Referenced by setRequestFlags().

bool GPUDynInst::isUnconditionalJump ( ) const

Definition at line 199 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isUnconditionalJump().

bool GPUDynInst::isVectorRegister ( int  operandIdx)

Definition at line 94 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isVectorRegister().

bool GPUDynInst::isWaitcnt ( ) const

Definition at line 211 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isWaitcnt().

bool GPUDynInst::isWavefrontScope ( ) const

Definition at line 432 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isWavefrontScope().

Referenced by setRequestFlags().

bool GPUDynInst::isWorkgroupScope ( ) const

Definition at line 438 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isWorkgroupScope().

Referenced by setRequestFlags().

bool GPUDynInst::isWorkitemScope ( ) const

Definition at line 426 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::isWorkitemScope().

Referenced by setRequestFlags().

template<typename c0 >
AtomicOpFunctor* GPUDynInst::makeAtomicOpFunctor ( c0 *  reg0,
c0 *  reg1 
)
inline
int GPUDynInst::numDstRegOperands ( )

Definition at line 82 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::numDstRegOperands().

int GPUDynInst::numSrcRegOperands ( )

Definition at line 76 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::numSrcRegOperands().

bool GPUDynInst::readsSCC ( ) const

Definition at line 277 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::readsSCC().

bool GPUDynInst::readsVCC ( ) const

Definition at line 289 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::readsVCC().

uint64_t GPUDynInst::seqNum ( ) const

Definition at line 142 of file gpu_dyn_inst.cc.

References _seqNum.

void GPUDynInst::setRequestFlags ( Request req,
bool  setMemOrder = true 
)
inline
GPUStaticInst* GPUDynInst::staticInstruction ( )
inline

Definition at line 269 of file gpu_dyn_inst.hh.

References _staticInst.

void GPUDynInst::updateStats ( )
bool GPUDynInst::writesSCC ( ) const

Definition at line 283 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::writesSCC().

bool GPUDynInst::writesVCC ( ) const

Definition at line 295 of file gpu_dyn_inst.cc.

References _staticInst, and GPUStaticInst::writesVCC().

Member Data Documentation

uint64_t GPUDynInst::_seqNum
private

Definition at line 457 of file gpu_dyn_inst.hh.

Referenced by seqNum().

GPUStaticInst* GPUDynInst::_staticInst
private
uint8_t* GPUDynInst::a_data

Definition at line 216 of file gpu_dyn_inst.hh.

Referenced by GPUDynInst(), and ~GPUDynInst().

std::vector<Addr> GPUDynInst::addr

Definition at line 210 of file gpu_dyn_inst.hh.

uint32_t GPUDynInst::bc[4]

Definition at line 252 of file gpu_dyn_inst.hh.

int GPUDynInst::cu_id

Definition at line 242 of file gpu_dyn_inst.hh.

uint8_t* GPUDynInst::d_data

Definition at line 214 of file gpu_dyn_inst.hh.

Referenced by GPUDynInst(), and ~GPUDynInst().

int GPUDynInst::dst_reg

Definition at line 232 of file gpu_dyn_inst.hh.

int GPUDynInst::dst_reg_vec[4]

Definition at line 234 of file gpu_dyn_inst.hh.

int GPUDynInst::equiv

Definition at line 226 of file gpu_dyn_inst.hh.

VectorMask GPUDynInst::exec_mask

Definition at line 220 of file gpu_dyn_inst.hh.

Referenced by initiateAcc().

std::function<void(GPUStaticInst*, GPUDynInstPtr)> GPUDynInst::execContinuation

Definition at line 349 of file gpu_dyn_inst.hh.

int GPUDynInst::kern_id

Definition at line 240 of file gpu_dyn_inst.hh.

WaitClass GPUDynInst::latency

Definition at line 250 of file gpu_dyn_inst.hh.

Enums::MemType GPUDynInst::m_type

Definition at line 223 of file gpu_dyn_inst.hh.

StatusVector GPUDynInst::memStatusVector

Definition at line 447 of file gpu_dyn_inst.hh.

int GPUDynInst::n_reg

Definition at line 230 of file gpu_dyn_inst.hh.

Addr GPUDynInst::pAddr

Definition at line 211 of file gpu_dyn_inst.hh.

int GPUDynInst::pipeId

Definition at line 246 of file gpu_dyn_inst.hh.

uint8_t* GPUDynInst::rom

Definition at line 255 of file gpu_dyn_inst.hh.

int GPUDynInst::simdId

Definition at line 236 of file gpu_dyn_inst.hh.

Referenced by initiateAcc().

VectorMask GPUDynInst::statusBitVector

Definition at line 450 of file gpu_dyn_inst.hh.

std::vector<int> GPUDynInst::statusVector

Definition at line 452 of file gpu_dyn_inst.hh.

int GPUDynInst::sz_rom

Definition at line 257 of file gpu_dyn_inst.hh.

Tick GPUDynInst::time

Definition at line 248 of file gpu_dyn_inst.hh.

Referenced by initiateAcc().

std::vector<int> GPUDynInst::tlbHitLevel

Definition at line 453 of file gpu_dyn_inst.hh.

Referenced by GPUDynInst().

bool GPUDynInst::useContinuation

Definition at line 352 of file gpu_dyn_inst.hh.

vgpr_type GPUDynInst::v_type

Definition at line 228 of file gpu_dyn_inst.hh.

int GPUDynInst::wfDynId

Definition at line 238 of file gpu_dyn_inst.hh.

int GPUDynInst::wfSlotId

Definition at line 244 of file gpu_dyn_inst.hh.

Referenced by initiateAcc().

uint8_t* GPUDynInst::x_data

Definition at line 218 of file gpu_dyn_inst.hh.

Referenced by GPUDynInst(), and ~GPUDynInst().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:12 for gem5 by doxygen 1.8.6