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

#include <compute_unit.hh>

Inheritance diagram for ComputeUnit:
MemObject ClockedObject SimObject Clocked EventManager Serializable Drainable

Classes

class  CUExitCallback
 
class  DataPort
 Data access Port. More...
 
class  DTLBPort
 Data TLB port. More...
 
class  ITLBPort
 
class  LDSPort
 the port intended to communicate between the CU and its LDS More...
 
class  SQCPort
 
class  waveIdentifier
 
class  waveQueue
 

Public Types

typedef ComputeUnitParams Params
 
typedef std::unordered_map
< Addr, std::pair< int, int > > 
pageDataStruct
 
- Public Types inherited from MemObject
typedef MemObjectParams Params
 
- Public Types inherited from ClockedObject
typedef ClockedObjectParams Params
 Parameters of ClockedObject. More...
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

void registerEvent (uint32_t simdId, uint32_t regIdx, uint32_t operandSize, uint64_t when, uint8_t newStatus)
 
void updateEvents ()
 
 ComputeUnit (const Params *p)
 
 ~ComputeUnit ()
 
int spBypassLength ()
 
int dpBypassLength ()
 
int storeBusLength ()
 
int loadBusLength ()
 
int wfSize () const
 
void resizeRegFiles (int num_cregs, int num_sregs, int num_dregs)
 
void exec ()
 
void initiateFetch (Wavefront *wavefront)
 
void fetch (PacketPtr pkt, Wavefront *wavefront)
 
void fillKernelState (Wavefront *w, NDRange *ndr)
 
void startWavefront (Wavefront *w, int waveId, LdsChunk *ldsChunk, NDRange *ndr)
 
void StartWorkgroup (NDRange *ndr)
 
int ReadyWorkgroup (NDRange *ndr)
 
bool isVecAlu (int unitId)
 
bool isGlbMem (int unitId)
 
bool isShrMem (int unitId)
 
int GlbMemUnitId ()
 
int ShrMemUnitId ()
 
int nextGlbRdBus ()
 
int nextLocRdBus ()
 
int AllAtBarrier (uint32_t _barrier_id, uint32_t bcnt, uint32_t bslots)
 
bool cedeSIMD (int simdId, int wfSlotId)
 
template<typename c0 , typename c1 >
void doSmReturn (GPUDynInstPtr gpuDynInst)
 
virtual void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
void sendRequest (GPUDynInstPtr gpuDynInst, int index, PacketPtr pkt)
 
void sendSyncRequest (GPUDynInstPtr gpuDynInst, int index, PacketPtr pkt)
 
void injectGlobalMemFence (GPUDynInstPtr gpuDynInst, bool kernelLaunch=true, RequestPtr req=nullptr)
 
void handleMemPacket (PacketPtr pkt, int memport_index)
 
bool processTimingPacket (PacketPtr pkt)
 
void processFetchReturn (PacketPtr pkt)
 
void updatePageDivergenceDist (Addr addr)
 
MasterID masterId ()
 
bool isDone () const
 
bool isSimdDone (uint32_t) const
 
void updateInstStats (GPUDynInstPtr gpuDynInst)
 
void regStats ()
 Register statistics for this object. More...
 
LdsStategetLds () const
 
int32_t getRefCounter (const uint32_t dispatchId, const uint32_t wgId) const
 
int cacheLineSize () const
 
bool sendToLds (GPUDynInstPtr gpuDynInst) __attribute__((warn_unused_result))
 send a general request to the LDS make sure to look at the return value here as your request might be NACK'd and returning false means that you have to have some backup plan More...
 
LDSPortgetLdsPort () const
 
virtual BaseMasterPortgetMasterPort (const std::string &if_name, PortID idx)
 Get a master port with a given name and index. More...
 
uint64_t getAndIncSeqNum ()
 
- Public Member Functions inherited from MemObject
const Paramsparams () const
 
 MemObject (const Params *params)
 
virtual BaseSlavePortgetSlavePort (const std::string &if_name, PortID idx=InvalidPortID)
 Get a slave port with a given name and index. More...
 
- Public Member Functions inherited from ClockedObject
 ClockedObject (const ClockedObjectParams *p)
 
const Paramsparams () const
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
Enums::PwrState pwrState () const
 
std::string pwrStateName () const
 
std::vector< double > pwrStateWeights () const
 Returns the percentage residency for each power state. More...
 
void computeStats ()
 Record stats values like state residency by computing the time difference from previous update. More...
 
void pwrState (Enums::PwrState)
 
void regStats () override
 Register statistics for this object. More...
 
- Public Member Functions inherited from SimObject
const Paramsparams () const
 
 SimObject (const Params *_params)
 
virtual ~SimObject ()
 
virtual const std::string name () const
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void resetStats ()
 Reset statistics associated with this object. More...
 
virtual void regProbePoints ()
 Register probe points for this object. More...
 
virtual void regProbeListeners ()
 Register probe listeners for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from EventManager
 EventManager (EventManager &em)
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick)-1)
 
void setCurTick (Tick newVal)
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from Clocked
void updateClockPeriod () const
 Update the tick to the current tick. More...
 
Tick clockEdge (Cycles cycles=Cycles(0)) const
 Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More...
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge. More...
 
Tick nextCycle () const
 Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More...
 
uint64_t frequency () const
 
Tick clockPeriod () const
 
double voltage () const
 
Cycles ticksToCycles (Tick t) const
 
Tick cyclesToTicks (Cycles c) const
 

Public Attributes

FetchStage fetchStage
 
ScoreboardCheckStage scoreboardCheckStage
 
ScheduleStage scheduleStage
 
ExecStage execStage
 
GlobalMemPipeline globalMemoryPipe
 
LocalMemPipeline localMemoryPipe
 
std::vector< std::vector
< Wavefront * > > 
readyList
 
std::vector< std::vector
< std::pair< Wavefront
*, WAVE_STATUS > > > 
waveStatusList
 
std::vector< std::pair
< Wavefront *, DISPATCH_STATUS > > 
dispatchList
 
int rrNextMemID
 
int rrNextALUWp
 
std::vector< std::vector
< Wavefront * > > 
wfList
 
int cu_id
 
std::vector< VectorRegisterFile * > vrf
 
int numSIMDs
 
int spBypassPipeLength
 
int dpBypassPipeLength
 
int issuePeriod
 
int numGlbMemUnits
 
int numLocMemUnits
 
std::vector< uint64_t > lastExecCycle
 
bool perLaneTLB
 
int prefetchDepth
 
int prefetchStride
 
std::vector< AddrlastVaddrCU
 
std::vector< std::vector< Addr > > lastVaddrSimd
 
std::vector< std::vector
< std::vector< Addr > > > 
lastVaddrWF
 
Enums::PrefetchType prefetchType
 
EXEC_POLICY exec_policy
 
bool xact_cas_mode
 
bool debugSegFault
 
bool functionalTLB
 
bool localMemBarrier
 
bool countPages
 
Shadershader
 
uint32_t barrier_id
 
std::vector< WaitClassaluPipe
 
std::vector< WaitClasswfWait
 
std::vector< WaitClassvrfToGlobalMemPipeBus
 
std::vector< WaitClassvrfToLocalMemPipeBus
 
int nextGlbMemBus
 
int nextLocMemBus
 
WaitClass glbMemToVrfBus
 
WaitClass locMemToVrfBus
 
uint32_t vrfToCoalescerBusWidth
 
uint32_t coalescerToVrfBusWidth
 
uint32_t numCyclesPerStoreTransfer
 
uint32_t numCyclesPerLoadTransfer
 
Tick req_tick_latency
 
Tick resp_tick_latency
 
std::vector< int > vectorRegsReserved
 
uint32_t numVecRegsPerSimd
 
std::vector< std::pair
< uint32_t, uint32_t > > 
regIdxVec
 
std::vector< uint64_t > timestampVec
 
std::vector< uint8_t > statusVec
 
std::map< Addr, int > pagesTouched
 
Stats::Scalar vALUInsts
 
Stats::Formula vALUInstsPerWF
 
Stats::Scalar sALUInsts
 
Stats::Formula sALUInstsPerWF
 
Stats::Scalar instCyclesVALU
 
Stats::Scalar instCyclesSALU
 
Stats::Scalar threadCyclesVALU
 
Stats::Formula vALUUtilization
 
Stats::Scalar ldsNoFlatInsts
 
Stats::Formula ldsNoFlatInstsPerWF
 
Stats::Scalar flatVMemInsts
 
Stats::Formula flatVMemInstsPerWF
 
Stats::Scalar flatLDSInsts
 
Stats::Formula flatLDSInstsPerWF
 
Stats::Scalar vectorMemWrites
 
Stats::Formula vectorMemWritesPerWF
 
Stats::Scalar vectorMemReads
 
Stats::Formula vectorMemReadsPerWF
 
Stats::Scalar scalarMemWrites
 
Stats::Formula scalarMemWritesPerWF
 
Stats::Scalar scalarMemReads
 
Stats::Formula scalarMemReadsPerWF
 
Stats::Scalar tlbRequests
 
Stats::Scalar tlbCycles
 
Stats::Formula tlbLatency
 
Stats::Vector hitsPerTLBLevel
 
Stats::Scalar ldsBankAccesses
 
Stats::Distribution ldsBankConflictDist
 
Stats::Distribution pageDivergenceDist
 
Stats::Scalar dynamicGMemInstrCnt
 
Stats::Scalar dynamicLMemInstrCnt
 
Stats::Scalar wgBlockedDueLdsAllocation
 
Stats::Scalar numInstrExecuted
 
Stats::Distribution execRateDist
 
Stats::Scalar numVecOpsExecuted
 
Stats::Scalar totalCycles
 
Stats::Formula vpc
 
Stats::Formula ipc
 
Stats::Distribution controlFlowDivergenceDist
 
Stats::Distribution activeLanesPerGMemInstrDist
 
Stats::Distribution activeLanesPerLMemInstrDist
 
Stats::Formula numALUInstsExecuted
 
Stats::Scalar numTimesWgBlockedDueVgprAlloc
 
Stats::Scalar numCASOps
 
Stats::Scalar numFailedCASOps
 
Stats::Scalar completedWfs
 
std::vector< bool > vectorAluInstAvail
 
int shrMemInstAvail
 
int glbMemInstAvail
 
pageDataStruct pageAccesses
 
CUExitCallbackcuExitCallback
 
LDSPortldsPort = nullptr
 The port to access the Local Data Store Can be connected to a LDS object. More...
 
std::vector< DataPort * > memPort
 The memory port for SIMD data accesses. More...
 
std::vector< DTLBPort * > tlbPort
 
SQCPortsqcPort
 
ITLBPortsqcTLBPort
 
std::map< unsigned, waveQueuexactCasLoadMap
 

Protected Attributes

MasterID _masterId
 
LdsStatelds
 
- Protected Attributes inherited from ClockedObject
Enums::PwrState _currPwrState
 To keep track of the current power state. More...
 
Tick prvEvalTick
 
Stats::Scalar numPwrStateTransitions
 
Stats::Distribution pwrStateClkGateDist
 
Stats::Vector pwrStateResidencyTicks
 
- Protected Attributes inherited from SimObject
const SimObjectParams * _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Private Attributes

const int _cacheLineSize
 
uint64_t globalSeqNum
 
int wavefrontSize
 
GPUStaticInstkernelLaunchInst
 

Additional Inherited Members

- Static Public Member Functions inherited from SimObject
static void serializeAll (CheckpointOut &cp)
 Serialize all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Member Functions inherited from Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters. More...
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance. More...
 
void resetClock () const
 Reset the object's clock using the current global tick value. More...
 

Detailed Description

Definition at line 93 of file compute_unit.hh.

Member Typedef Documentation

typedef std::unordered_map<Addr, std::pair<int, int> > ComputeUnit::pageDataStruct

Definition at line 398 of file compute_unit.hh.

typedef ComputeUnitParams ComputeUnit::Params

Definition at line 134 of file compute_unit.hh.

Constructor & Destructor Documentation

ComputeUnit::ComputeUnit ( const Params p)

This check is necessary because std::bitset only provides conversion to unsigned long or unsigned long long via to_ulong() or to_ullong(). there are * a few places in the code where to_ullong() is used, however if VSZ is larger than a value the host can support then bitset will throw a runtime exception. we should remove all use of to_long() or to_ullong() so we can have VSZ greater than 64b, however until that is done this assert is required.

Definition at line 59 of file compute_unit.cc.

References coalescerToVrfBusWidth, cuExitCallback, exec_policy, fatal, fatal_if(), ArmISA::i, isPowerOf2(), ArmISA::j, MipsISA::k, lastExecCycle, lastVaddrCU, lastVaddrSimd, lastVaddrWF, lds, memPort, numCyclesPerLoadTransfer, numCyclesPerStoreTransfer, numSIMDs, numVecRegsPerSimd, OLDEST, perLaneTLB, registerExitCallback(), RR, LdsState::setParent(), tlbPort, vrf, vrfToCoalescerBusWidth, wavefrontSize, wfList, wfSize(), and xactCasLoadMap.

ComputeUnit::~ComputeUnit ( )

Member Function Documentation

int ComputeUnit::AllAtBarrier ( uint32_t  _barrier_id,
uint32_t  bcnt,
uint32_t  bslots 
)
int ComputeUnit::cacheLineSize ( ) const
inline

Definition at line 393 of file compute_unit.hh.

References _cacheLineSize.

Referenced by FetchUnit::initiateFetch().

bool ComputeUnit::cedeSIMD ( int  simdId,
int  wfSlotId 
)
template<typename c0 , typename c1 >
void ComputeUnit::doSmReturn ( GPUDynInstPtr  gpuDynInst)
int ComputeUnit::dpBypassLength ( )
inline

Definition at line 248 of file compute_unit.hh.

References dpBypassPipeLength.

Referenced by VectorRegisterFile::exec().

void ComputeUnit::exec ( )
void ComputeUnit::fetch ( PacketPtr  pkt,
Wavefront wavefront 
)
void ComputeUnit::fillKernelState ( Wavefront w,
NDRange ndr 
)
uint64_t ComputeUnit::getAndIncSeqNum ( )
inline

Definition at line 769 of file compute_unit.hh.

References globalSeqNum.

Referenced by StartWorkgroup().

LdsState& ComputeUnit::getLds ( ) const
inline

Definition at line 385 of file compute_unit.hh.

References lds.

Referenced by HsailISA::Ret::execute().

LDSPort* ComputeUnit::getLdsPort ( ) const
inline

Definition at line 705 of file compute_unit.hh.

References ldsPort.

virtual BaseMasterPort& ComputeUnit::getMasterPort ( const std::string &  if_name,
PortID  idx 
)
inlinevirtual

Get a master port with a given name and index.

This is used at binding time and returns a reference to a protocol-agnostic base master port.

Parameters
if_namePort name
idxIndex in the case of a VectorPort
Returns
A reference to the given port

Reimplemented from MemObject.

Definition at line 722 of file compute_unit.hh.

References csprintf(), fatal, ldsPort, memPort, SimObject::name(), panic, sqcPort, sqcTLBPort, and tlbPort.

int32_t ComputeUnit::getRefCounter ( const uint32_t  dispatchId,
const uint32_t  wgId 
) const

Definition at line 1760 of file compute_unit.cc.

References LdsState::getRefCounter(), and lds.

Referenced by Wavefront::ready().

int ComputeUnit::GlbMemUnitId ( )
inline

Definition at line 268 of file compute_unit.hh.

References GLBMEM_PIPE.

Referenced by ScoreboardCheckStage::exec(), Wavefront::exec(), and Wavefront::updateResources().

void ComputeUnit::handleMemPacket ( PacketPtr  pkt,
int  memport_index 
)
void ComputeUnit::init ( )
virtual
void ComputeUnit::initiateFetch ( Wavefront wavefront)
void ComputeUnit::injectGlobalMemFence ( GPUDynInstPtr  gpuDynInst,
bool  kernelLaunch = true,
RequestPtr  req = nullptr 
)
bool ComputeUnit::isDone ( ) const
bool ComputeUnit::isGlbMem ( int  unitId)
inline

Definition at line 266 of file compute_unit.hh.

References GLBMEM_PIPE.

Referenced by ExecStage::collectStatistics().

bool ComputeUnit::isShrMem ( int  unitId)
inline

Definition at line 267 of file compute_unit.hh.

References LDSMEM_PIPE.

Referenced by ExecStage::collectStatistics().

bool ComputeUnit::isSimdDone ( uint32_t  simdId) const
bool ComputeUnit::isVecAlu ( int  unitId)
inline

Definition at line 265 of file compute_unit.hh.

References SIMD0, and SIMD3.

Referenced by ExecStage::collectStatistics().

int ComputeUnit::loadBusLength ( )
inline

Definition at line 250 of file compute_unit.hh.

References numCyclesPerLoadTransfer.

Referenced by LdsState::processPacket().

MasterID ComputeUnit::masterId ( )
inline

Definition at line 293 of file compute_unit.hh.

References _masterId.

Referenced by FetchUnit::initiateFetch(), and injectGlobalMemFence().

int ComputeUnit::nextGlbRdBus ( )
inline

Definition at line 270 of file compute_unit.hh.

References nextGlbMemBus, and numGlbMemUnits.

Referenced by Wavefront::exec(), and Wavefront::updateResources().

int ComputeUnit::nextLocRdBus ( )
inline

Definition at line 271 of file compute_unit.hh.

References nextLocMemBus, and numLocMemUnits.

Referenced by Wavefront::exec(), and Wavefront::updateResources().

void ComputeUnit::processFetchReturn ( PacketPtr  pkt)
bool ComputeUnit::processTimingPacket ( PacketPtr  pkt)
int ComputeUnit::ReadyWorkgroup ( NDRange ndr)
void ComputeUnit::registerEvent ( uint32_t  simdId,
uint32_t  regIdx,
uint32_t  operandSize,
uint64_t  when,
uint8_t  newStatus 
)
inline

Definition at line 221 of file compute_unit.hh.

References numVecRegsPerSimd, regIdxVec, statusVec, and timestampVec.

Referenced by VectorRegisterFile::exec().

void ComputeUnit::regStats ( )
virtual

Register statistics for this object.

Reimplemented from SimObject.

Definition at line 1398 of file compute_unit.cc.

References activeLanesPerGMemInstrDist, activeLanesPerLMemInstrDist, completedWfs, controlFlowDivergenceDist, csprintf(), Stats::DataWrap< Derived, InfoProxyType >::desc(), dynamicGMemInstrCnt, dynamicLMemInstrCnt, execRateDist, execStage, fetchStage, flatLDSInsts, flatLDSInstsPerWF, flatVMemInsts, flatVMemInstsPerWF, globalMemoryPipe, hitsPerTLBLevel, ArmISA::i, Stats::VectorBase< Derived, Stor >::init(), Stats::Distribution::init(), instCyclesSALU, instCyclesVALU, ipc, ldsBankAccesses, ldsBankConflictDist, ldsNoFlatInsts, ldsNoFlatInstsPerWF, localMemoryPipe, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), numALUInstsExecuted, numCASOps, numFailedCASOps, numInstrExecuted, numTimesWgBlockedDueVgprAlloc, numVecOpsExecuted, pageDivergenceDist, FetchStage::regStats(), ScheduleStage::regStats(), ScoreboardCheckStage::regStats(), ExecStage::regStats(), LocalMemPipeline::regStats(), GlobalMemPipeline::regStats(), ClockedObject::regStats(), sALUInsts, sALUInstsPerWF, scalarMemReads, scalarMemReadsPerWF, scalarMemWrites, scalarMemWritesPerWF, scheduleStage, scoreboardCheckStage, Stats::DataWrapVec< Derived, InfoProxyType >::subname(), threadCyclesVALU, tlbCycles, tlbLatency, tlbRequests, totalCycles, vALUInsts, vALUInstsPerWF, vALUUtilization, vectorMemReads, vectorMemReadsPerWF, vectorMemWrites, vectorMemWritesPerWF, vpc, wfSize(), and wgBlockedDueLdsAllocation.

void ComputeUnit::resizeRegFiles ( int  num_cregs,
int  num_sregs,
int  num_dregs 
)
void ComputeUnit::sendRequest ( GPUDynInstPtr  gpuDynInst,
int  index,
PacketPtr  pkt 
)
void ComputeUnit::sendSyncRequest ( GPUDynInstPtr  gpuDynInst,
int  index,
PacketPtr  pkt 
)
bool ComputeUnit::sendToLds ( GPUDynInstPtr  gpuDynInst)

send a general request to the LDS make sure to look at the return value here as your request might be NACK'd and returning false means that you have to have some backup plan

Definition at line 1797 of file compute_unit.cc.

References ldsPort, MemCmd::ReadReq, Packet::senderState, ComputeUnit::LDSPort::sendTimingReq(), and Request::setPaddr().

Referenced by LocalMemPipeline::exec().

int ComputeUnit::ShrMemUnitId ( )
inline

Definition at line 269 of file compute_unit.hh.

References LDSMEM_PIPE.

Referenced by ScoreboardCheckStage::exec(), Wavefront::exec(), and Wavefront::updateResources().

int ComputeUnit::spBypassLength ( )
inline
void ComputeUnit::startWavefront ( Wavefront w,
int  waveId,
LdsChunk ldsChunk,
NDRange ndr 
)
void ComputeUnit::StartWorkgroup ( NDRange ndr)
int ComputeUnit::storeBusLength ( )
inline

Definition at line 249 of file compute_unit.hh.

References numCyclesPerStoreTransfer.

Referenced by LdsState::processPacket().

void ComputeUnit::updateEvents ( )

Definition at line 199 of file compute_unit.cc.

References ArmISA::i, numSIMDs, regIdxVec, Sinic::regInfo(), shader, statusVec, Shader::tick_cnt, timestampVec, and vrf.

Referenced by exec().

void ComputeUnit::updateInstStats ( GPUDynInstPtr  gpuDynInst)
void ComputeUnit::updatePageDivergenceDist ( Addr  addr)

Definition at line 1702 of file compute_unit.cc.

References AlphaISA::PageBytes, pagesTouched, and roundDown().

Referenced by sendRequest().

int ComputeUnit::wfSize ( ) const
inline

Definition at line 251 of file compute_unit.hh.

References wavefrontSize.

Referenced by HsailISA::Call::calcAddr(), HsailISA::calcPrivAddr(), RegAddrOperand< RegOperandType >::calcVector(), NoRegAddrOperand::calcVector(), HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::completeAcc(), HsailISA::AtomicInst< MemDataType, AddrOperandType, NumSrcOperands, HasDst >::completeAcc(), ComputeUnit(), LdsState::countBankConflicts(), HsailISA::Call::execPseudoInst(), HsailISA::LdaInst< DestDataType, AddrOperandType >::execute(), HsailISA::CbrInstBase< TargetType >::execute(), HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::execute(), HsailISA::Ret::execute(), HsailISA::StInst< MemDataType, SrcDataType, AddrOperandType >::execute(), HsailISA::AtomicInst< MemDataType, AddrOperandType, NumSrcOperands, HasDst >::execute(), Wavefront::getContext(), Wavefront::getStaticContextSize(), GPUDynInst::GPUDynInst(), HsailISA::Call::MagicAtomicNRAddGlobalU32Reg(), HsailISA::Call::MagicAtomicNRAddGroupU32Reg(), HsailISA::Call::MagicJoinWFBar(), HsailISA::Call::MagicMaskLower(), HsailISA::Call::MagicMaskUpper(), HsailISA::Call::MagicMostSigBroadcast(), HsailISA::Call::MagicMostSigThread(), HsailISA::Call::MagicPanic(), HsailISA::Call::MagicPrefixSum(), HsailISA::Call::MagicPrintLane(), HsailISA::Call::MagicPrintLane64(), HsailISA::Call::MagicPrintWF32(), HsailISA::Call::MagicPrintWF32ID(), HsailISA::Call::MagicPrintWF64(), HsailISA::Call::MagicPrintWFFloat(), HsailISA::Call::MagicPrintWFID64(), HsailISA::Call::MagicReduction(), HsailISA::Call::MagicSimBreak(), HsailISA::Call::MagicWaitWFBar(), HsailISA::Call::MagicXactCasLd(), ReadyWorkgroup(), regStats(), Wavefront::setContext(), startWavefront(), and StartWorkgroup().

Member Data Documentation

const int ComputeUnit::_cacheLineSize
private

Definition at line 772 of file compute_unit.hh.

Referenced by cacheLineSize().

MasterID ComputeUnit::_masterId
protected

Definition at line 299 of file compute_unit.hh.

Referenced by masterId().

Stats::Distribution ComputeUnit::activeLanesPerGMemInstrDist

Definition at line 360 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

Stats::Distribution ComputeUnit::activeLanesPerLMemInstrDist

Definition at line 361 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

std::vector<WaitClass> ComputeUnit::aluPipe

Definition at line 188 of file compute_unit.hh.

Referenced by Wavefront::exec(), init(), isSimdDone(), and Wavefront::updateResources().

uint32_t ComputeUnit::barrier_id

Definition at line 186 of file compute_unit.hh.

Referenced by startWavefront(), and StartWorkgroup().

uint32_t ComputeUnit::coalescerToVrfBusWidth

Definition at line 204 of file compute_unit.hh.

Referenced by ComputeUnit().

Stats::Scalar ComputeUnit::completedWfs

Definition at line 368 of file compute_unit.hh.

Referenced by HsailISA::Ret::execute(), and regStats().

Stats::Distribution ComputeUnit::controlFlowDivergenceDist

Definition at line 359 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

bool ComputeUnit::countPages

Definition at line 183 of file compute_unit.hh.

int ComputeUnit::cu_id
CUExitCallback* ComputeUnit::cuExitCallback

Definition at line 418 of file compute_unit.hh.

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

bool ComputeUnit::debugSegFault

Definition at line 171 of file compute_unit.hh.

Referenced by sendRequest().

std::vector<std::pair<Wavefront*, DISPATCH_STATUS> > ComputeUnit::dispatchList

Definition at line 130 of file compute_unit.hh.

Referenced by ScheduleStage::init(), ExecStage::init(), init(), and ~ComputeUnit().

int ComputeUnit::dpBypassPipeLength

Definition at line 147 of file compute_unit.hh.

Referenced by dpBypassLength().

Stats::Scalar ComputeUnit::dynamicGMemInstrCnt

Definition at line 343 of file compute_unit.hh.

Referenced by regStats(), and GPUDynInst::updateStats().

Stats::Scalar ComputeUnit::dynamicLMemInstrCnt

Definition at line 344 of file compute_unit.hh.

Referenced by regStats(), and GPUDynInst::updateStats().

EXEC_POLICY ComputeUnit::exec_policy

Definition at line 168 of file compute_unit.hh.

Referenced by ComputeUnit().

Stats::Distribution ComputeUnit::execRateDist

Definition at line 352 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

ExecStage ComputeUnit::execStage

Definition at line 99 of file compute_unit.hh.

Referenced by exec(), init(), and regStats().

FetchStage ComputeUnit::fetchStage

Definition at line 96 of file compute_unit.hh.

Referenced by exec(), init(), and regStats().

Stats::Scalar ComputeUnit::flatLDSInsts

Definition at line 316 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::flatLDSInstsPerWF

Definition at line 317 of file compute_unit.hh.

Referenced by regStats().

Stats::Scalar ComputeUnit::flatVMemInsts

Definition at line 314 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::flatVMemInstsPerWF

Definition at line 315 of file compute_unit.hh.

Referenced by regStats().

bool ComputeUnit::functionalTLB

Definition at line 172 of file compute_unit.hh.

Referenced by sendRequest().

int ComputeUnit::glbMemInstAvail

Definition at line 379 of file compute_unit.hh.

Referenced by ScoreboardCheckStage::init(), ExecStage::init(), and init().

WaitClass ComputeUnit::glbMemToVrfBus

Definition at line 199 of file compute_unit.hh.

Referenced by GlobalMemPipeline::exec(), init(), and isDone().

GlobalMemPipeline ComputeUnit::globalMemoryPipe
uint64_t ComputeUnit::globalSeqNum
private

Definition at line 773 of file compute_unit.hh.

Referenced by getAndIncSeqNum().

Stats::Vector ComputeUnit::hitsPerTLBLevel

Definition at line 335 of file compute_unit.hh.

Referenced by regStats(), and sendRequest().

Stats::Scalar ComputeUnit::instCyclesSALU

Definition at line 309 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Scalar ComputeUnit::instCyclesVALU

Definition at line 308 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::ipc

Definition at line 358 of file compute_unit.hh.

Referenced by regStats().

int ComputeUnit::issuePeriod

Definition at line 149 of file compute_unit.hh.

Referenced by Wavefront::exec(), and Wavefront::updateResources().

GPUStaticInst* ComputeUnit::kernelLaunchInst
private

Definition at line 775 of file compute_unit.hh.

Referenced by StartWorkgroup().

std::vector<uint64_t> ComputeUnit::lastExecCycle

Definition at line 155 of file compute_unit.hh.

Referenced by ComputeUnit(), and Wavefront::exec().

std::vector<Addr> ComputeUnit::lastVaddrCU

Definition at line 164 of file compute_unit.hh.

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

std::vector<std::vector<Addr> > ComputeUnit::lastVaddrSimd

Definition at line 165 of file compute_unit.hh.

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

std::vector<std::vector<std::vector<Addr> > > ComputeUnit::lastVaddrWF

Definition at line 166 of file compute_unit.hh.

Referenced by ComputeUnit().

LdsState& ComputeUnit::lds
protected
Stats::Scalar ComputeUnit::ldsBankAccesses

Definition at line 337 of file compute_unit.hh.

Referenced by LdsState::processPacket(), and regStats().

Stats::Distribution ComputeUnit::ldsBankConflictDist

Definition at line 338 of file compute_unit.hh.

Referenced by LdsState::processPacket(), and regStats().

Stats::Scalar ComputeUnit::ldsNoFlatInsts

Definition at line 312 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::ldsNoFlatInstsPerWF

Definition at line 313 of file compute_unit.hh.

Referenced by regStats().

LDSPort* ComputeUnit::ldsPort = nullptr

The port to access the Local Data Store Can be connected to a LDS object.

Definition at line 702 of file compute_unit.hh.

Referenced by getLdsPort(), getMasterPort(), sendToLds(), and ~ComputeUnit().

bool ComputeUnit::localMemBarrier

Definition at line 173 of file compute_unit.hh.

LocalMemPipeline ComputeUnit::localMemoryPipe
WaitClass ComputeUnit::locMemToVrfBus

Definition at line 201 of file compute_unit.hh.

Referenced by LocalMemPipeline::exec(), init(), and isDone().

std::vector<DataPort*> ComputeUnit::memPort

The memory port for SIMD data accesses.

Can be connected to PhysMem for Ruby for timing simulations

Definition at line 713 of file compute_unit.hh.

Referenced by ComputeUnit(), getMasterPort(), ComputeUnit::DataPort::recvTimingResp(), sendRequest(), and sendSyncRequest().

int ComputeUnit::nextGlbMemBus

Definition at line 196 of file compute_unit.hh.

Referenced by init(), and nextGlbRdBus().

int ComputeUnit::nextLocMemBus

Definition at line 197 of file compute_unit.hh.

Referenced by init(), and nextLocRdBus().

Stats::Formula ComputeUnit::numALUInstsExecuted

Definition at line 363 of file compute_unit.hh.

Referenced by regStats().

Stats::Scalar ComputeUnit::numCASOps

Definition at line 366 of file compute_unit.hh.

Referenced by AtomicOpCAS< T >::execute(), and regStats().

uint32_t ComputeUnit::numCyclesPerLoadTransfer

Definition at line 206 of file compute_unit.hh.

Referenced by ComputeUnit(), and loadBusLength().

uint32_t ComputeUnit::numCyclesPerStoreTransfer

Definition at line 205 of file compute_unit.hh.

Referenced by ComputeUnit(), and storeBusLength().

Stats::Scalar ComputeUnit::numFailedCASOps

Definition at line 367 of file compute_unit.hh.

Referenced by AtomicOpCAS< T >::execute(), and regStats().

int ComputeUnit::numGlbMemUnits

Definition at line 152 of file compute_unit.hh.

Referenced by init(), isDone(), isSimdDone(), nextGlbRdBus(), and Wavefront::ready().

Stats::Scalar ComputeUnit::numInstrExecuted

Definition at line 349 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

int ComputeUnit::numLocMemUnits

Definition at line 153 of file compute_unit.hh.

Referenced by init(), isDone(), isSimdDone(), nextLocRdBus(), and Wavefront::ready().

int ComputeUnit::numSIMDs
Stats::Scalar ComputeUnit::numTimesWgBlockedDueVgprAlloc

Definition at line 365 of file compute_unit.hh.

Referenced by ReadyWorkgroup(), and regStats().

Stats::Scalar ComputeUnit::numVecOpsExecuted

Definition at line 354 of file compute_unit.hh.

Referenced by Wavefront::exec(), and regStats().

uint32_t ComputeUnit::numVecRegsPerSimd

Definition at line 214 of file compute_unit.hh.

Referenced by ComputeUnit(), ReadyWorkgroup(), registerEvent(), and StartWorkgroup().

pageDataStruct ComputeUnit::pageAccesses

Definition at line 399 of file compute_unit.hh.

Referenced by GPUDynInst::updateStats().

Stats::Distribution ComputeUnit::pageDivergenceDist

Definition at line 342 of file compute_unit.hh.

Referenced by regStats(), and GPUDynInst::updateStats().

std::map<Addr, int> ComputeUnit::pagesTouched

Definition at line 243 of file compute_unit.hh.

Referenced by updatePageDivergenceDist(), and GPUDynInst::updateStats().

bool ComputeUnit::perLaneTLB

Definition at line 158 of file compute_unit.hh.

Referenced by ComputeUnit(), and sendRequest().

int ComputeUnit::prefetchDepth

Definition at line 160 of file compute_unit.hh.

int ComputeUnit::prefetchStride

Definition at line 162 of file compute_unit.hh.

Enums::PrefetchType ComputeUnit::prefetchType

Definition at line 167 of file compute_unit.hh.

std::vector<std::vector<Wavefront*> > ComputeUnit::readyList
std::vector<std::pair<uint32_t, uint32_t> > ComputeUnit::regIdxVec

Definition at line 216 of file compute_unit.hh.

Referenced by registerEvent(), and updateEvents().

Tick ComputeUnit::req_tick_latency

Definition at line 208 of file compute_unit.hh.

Referenced by sendRequest(), and sendSyncRequest().

Tick ComputeUnit::resp_tick_latency

Definition at line 209 of file compute_unit.hh.

Referenced by ComputeUnit::DataPort::recvTimingResp().

int ComputeUnit::rrNextALUWp

Definition at line 133 of file compute_unit.hh.

int ComputeUnit::rrNextMemID

Definition at line 132 of file compute_unit.hh.

Stats::Scalar ComputeUnit::sALUInsts

Definition at line 306 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::sALUInstsPerWF

Definition at line 307 of file compute_unit.hh.

Referenced by regStats().

Stats::Scalar ComputeUnit::scalarMemReads

Definition at line 324 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::scalarMemReadsPerWF

Definition at line 325 of file compute_unit.hh.

Referenced by regStats().

Stats::Scalar ComputeUnit::scalarMemWrites

Definition at line 322 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::scalarMemWritesPerWF

Definition at line 323 of file compute_unit.hh.

Referenced by regStats().

ScheduleStage ComputeUnit::scheduleStage

Definition at line 98 of file compute_unit.hh.

Referenced by exec(), init(), and regStats().

ScoreboardCheckStage ComputeUnit::scoreboardCheckStage

Definition at line 97 of file compute_unit.hh.

Referenced by exec(), init(), and regStats().

Shader* ComputeUnit::shader
int ComputeUnit::shrMemInstAvail

Definition at line 376 of file compute_unit.hh.

Referenced by ScoreboardCheckStage::init(), ExecStage::init(), and init().

int ComputeUnit::spBypassPipeLength

Definition at line 144 of file compute_unit.hh.

Referenced by spBypassLength().

SQCPort* ComputeUnit::sqcPort

Definition at line 717 of file compute_unit.hh.

Referenced by FetchUnit::fetch(), and getMasterPort().

ITLBPort* ComputeUnit::sqcTLBPort

Definition at line 719 of file compute_unit.hh.

Referenced by getMasterPort(), and FetchUnit::initiateFetch().

std::vector<uint8_t> ComputeUnit::statusVec

Definition at line 218 of file compute_unit.hh.

Referenced by registerEvent(), and updateEvents().

Stats::Scalar ComputeUnit::threadCyclesVALU

Definition at line 310 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

std::vector<uint64_t> ComputeUnit::timestampVec

Definition at line 217 of file compute_unit.hh.

Referenced by registerEvent(), and updateEvents().

Stats::Scalar ComputeUnit::tlbCycles

Definition at line 332 of file compute_unit.hh.

Referenced by regStats(), and sendRequest().

Stats::Formula ComputeUnit::tlbLatency

Definition at line 333 of file compute_unit.hh.

Referenced by regStats().

std::vector<DTLBPort*> ComputeUnit::tlbPort

Definition at line 715 of file compute_unit.hh.

Referenced by ComputeUnit(), getMasterPort(), and sendRequest().

Stats::Scalar ComputeUnit::tlbRequests

Definition at line 331 of file compute_unit.hh.

Referenced by regStats(), and sendRequest().

Stats::Scalar ComputeUnit::totalCycles

Definition at line 356 of file compute_unit.hh.

Referenced by exec(), Wavefront::exec(), and regStats().

Stats::Scalar ComputeUnit::vALUInsts

Definition at line 304 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::vALUInstsPerWF

Definition at line 305 of file compute_unit.hh.

Referenced by regStats().

Stats::Formula ComputeUnit::vALUUtilization

Definition at line 311 of file compute_unit.hh.

Referenced by regStats().

std::vector<bool> ComputeUnit::vectorAluInstAvail

Definition at line 373 of file compute_unit.hh.

Referenced by ScoreboardCheckStage::init(), ExecStage::init(), init(), and ~ComputeUnit().

Stats::Scalar ComputeUnit::vectorMemReads

Definition at line 320 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::vectorMemReadsPerWF

Definition at line 321 of file compute_unit.hh.

Referenced by regStats().

Stats::Scalar ComputeUnit::vectorMemWrites

Definition at line 318 of file compute_unit.hh.

Referenced by regStats(), and updateInstStats().

Stats::Formula ComputeUnit::vectorMemWritesPerWF

Definition at line 319 of file compute_unit.hh.

Referenced by regStats().

std::vector<int> ComputeUnit::vectorRegsReserved

Definition at line 212 of file compute_unit.hh.

Referenced by HsailISA::Ret::execute(), init(), and StartWorkgroup().

Stats::Formula ComputeUnit::vpc

Definition at line 357 of file compute_unit.hh.

Referenced by regStats().

std::vector<VectorRegisterFile*> ComputeUnit::vrf
uint32_t ComputeUnit::vrfToCoalescerBusWidth

Definition at line 203 of file compute_unit.hh.

Referenced by ComputeUnit().

std::vector<WaitClass> ComputeUnit::vrfToGlobalMemPipeBus
std::vector<WaitClass> ComputeUnit::vrfToLocalMemPipeBus
int ComputeUnit::wavefrontSize
private

Definition at line 774 of file compute_unit.hh.

Referenced by ComputeUnit(), init(), and wfSize().

std::vector<std::vector<std::pair<Wavefront*, WAVE_STATUS> > > ComputeUnit::waveStatusList
std::vector<std::vector<Wavefront*> > ComputeUnit::wfList
std::vector<WaitClass> ComputeUnit::wfWait
Stats::Scalar ComputeUnit::wgBlockedDueLdsAllocation

Definition at line 346 of file compute_unit.hh.

Referenced by ReadyWorkgroup(), and regStats().

bool ComputeUnit::xact_cas_mode

Definition at line 170 of file compute_unit.hh.

Referenced by cedeSIMD(), and AtomicOpCAS< T >::execute().

std::map<unsigned, waveQueue> ComputeUnit::xactCasLoadMap

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

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