gem5  v22.1.0.0
Classes | Public Types | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
gem5::ComputeUnit Class Reference

#include <compute_unit.hh>

Inheritance diagram for gem5::ComputeUnit:
gem5::ClockedObject gem5::SimObject gem5::Clocked gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

Classes

struct  ComputeUnitStats
 
class  DataPort
 Data access Port. More...
 
class  DTLBPort
 Data TLB port. More...
 
class  GMTokenPort
 
class  ITLBPort
 
class  LDSPort
 the port intended to communicate between the CU and its LDS More...
 
class  ScalarDataPort
 
class  ScalarDTLBPort
 
class  SQCPort
 

Public Types

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

Public Member Functions

int numExeUnits () const
 
int firstMemUnit () const
 
int lastMemUnit () const
 
int mapWaveToScalarAlu (Wavefront *w) const
 
int mapWaveToScalarAluGlobalIdx (Wavefront *w) const
 
int mapWaveToGlobalMem (Wavefront *w) const
 
int mapWaveToLocalMem (Wavefront *w) const
 
int mapWaveToScalarMem (Wavefront *w) const
 
void insertInPipeMap (Wavefront *w)
 
void deleteFromPipeMap (Wavefront *w)
 
 ComputeUnit (const Params &p)
 
 ~ComputeUnit ()
 
int oprNetPipeLength () const
 
int simdUnitWidth () const
 
int spBypassLength () const
 
int dpBypassLength () const
 
int scalarPipeLength () const
 
int storeBusLength () const
 
int loadBusLength () const
 
int wfSize () const
 
void exec ()
 
void initiateFetch (Wavefront *wavefront)
 
void fetch (PacketPtr pkt, Wavefront *wavefront)
 
void fillKernelState (Wavefront *w, HSAQueueEntry *task)
 
void startWavefront (Wavefront *w, int waveId, LdsChunk *ldsChunk, HSAQueueEntry *task, int bar_id, bool fetchContext=false)
 
void doInvalidate (RequestPtr req, int kernId)
 trigger invalidate operation in the cu More...
 
void doFlush (GPUDynInstPtr gpuDynInst)
 trigger flush operation in the cu More...
 
void dispWorkgroup (HSAQueueEntry *task, int num_wfs_in_wg)
 
bool hasDispResources (HSAQueueEntry *task, int &num_wfs_in_wg)
 
int cacheLineSize () const
 
int getCacheLineBits () const
 
void resetRegisterPool ()
 
int numYetToReachBarrier (int bar_id)
 
bool allAtBarrier (int bar_id)
 
void incNumAtBarrier (int bar_id)
 
int numAtBarrier (int bar_id)
 
int maxBarrierCnt (int bar_id)
 
void resetBarrier (int bar_id)
 
void decMaxBarrierCnt (int bar_id)
 
void releaseBarrier (int bar_id)
 
void releaseWFsFromBarrier (int bar_id)
 
int numBarrierSlots () const
 
template<typename c0 , typename c1 >
void doSmReturn (GPUDynInstPtr gpuDynInst)
 
virtual void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
void sendRequest (GPUDynInstPtr gpuDynInst, PortID index, PacketPtr pkt)
 
void sendScalarRequest (GPUDynInstPtr gpuDynInst, PacketPtr pkt)
 
void injectGlobalMemFence (GPUDynInstPtr gpuDynInst, bool kernelMemSync, RequestPtr req=nullptr)
 
void handleMemPacket (PacketPtr pkt, int memport_index)
 
bool processTimingPacket (PacketPtr pkt)
 
void processFetchReturn (PacketPtr pkt)
 
void updatePageDivergenceDist (Addr addr)
 
RequestorID requestorId ()
 
RequestorID vramRequestorId ()
 Forward the VRAM requestor ID needed for device memory from shader. More...
 
bool isDone () const
 
bool isVectorAluIdle (uint32_t simdId) const
 
void handleSQCReturn (PacketPtr pkt)
 
LdsStategetLds () const
 
int32_t getRefCounter (const uint32_t dispatchId, const uint32_t wgId) const
 
bool 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 More...
 
void exitCallback ()
 
TokenManagergetTokenManager ()
 
PortgetPort (const std::string &if_name, PortID idx) override
 Get a port with a given name and index. More...
 
InstSeqNum getAndIncSeqNum ()
 
void updateInstStats (GPUDynInstPtr gpuDynInst)
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
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 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 gem5::EventManager
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)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More...
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::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 gem5::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 gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters. More...
 
virtual void resetStats ()
 Callback to reset stats. More...
 
virtual void preDumpStats ()
 Callback before stats are dumped. More...
 
void addStat (statistics::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object. More...
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 
- Public Member Functions inherited from gem5::Clocked
void updateClockPeriod ()
 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

int numVectorGlobalMemUnits
 
WaitClass glbMemToVrfBus
 
WaitClass vrfToGlobalMemPipeBus
 
WaitClass vectorGlobalMemUnit
 
int numVectorSharedMemUnits
 
WaitClass locMemToVrfBus
 
WaitClass vrfToLocalMemPipeBus
 
WaitClass vectorSharedMemUnit
 
int numScalarMemUnits
 
WaitClass scalarMemToSrfBus
 
WaitClass srfToScalarMemPipeBus
 
WaitClass scalarMemUnit
 
int numVectorALUs
 
std::vector< WaitClassvectorALUs
 
int numScalarALUs
 
std::vector< WaitClassscalarALUs
 
int vrfToCoalescerBusWidth
 
int coalescerToVrfBusWidth
 
int numCyclesPerStoreTransfer
 
int numCyclesPerLoadTransfer
 
std::unordered_set< uint64_t > pipeMap
 
RegisterManagerregisterManager
 
FetchStage fetchStage
 
ScoreboardCheckStage scoreboardCheckStage
 
ScheduleStage scheduleStage
 
ExecStage execStage
 
GlobalMemPipeline globalMemoryPipe
 
LocalMemPipeline localMemoryPipe
 
ScalarMemPipeline scalarMemoryPipe
 
EventFunctionWrapper tickEvent
 
std::vector< std::vector< Wavefront * > > wfList
 
int cu_id
 
std::vector< VectorRegisterFile * > vrf
 
std::vector< ScalarRegisterFile * > srf
 
int simdWidth
 
int spBypassPipeLength
 
int dpBypassPipeLength
 
int scalarPipeStages
 
int operandNetworkLength
 
Cycles issuePeriod
 
Cycles vrf_gm_bus_latency
 
Cycles srf_scm_bus_latency
 
Cycles vrf_lm_bus_latency
 
std::vector< uint64_t > lastExecCycle
 
std::vector< uint64_t > instExecPerSimd
 
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 debugSegFault
 
Tick idleCUTimeout
 
int idleWfs
 
bool functionalTLB
 
bool localMemBarrier
 
bool countPages
 
Shadershader
 
Tick req_tick_latency
 
Tick resp_tick_latency
 
std::vector< int > numWfsToSched
 Number of WFs to schedule to each SIMD. More...
 
std::vector< int > vectorRegsReserved
 
std::vector< int > scalarRegsReserved
 
int numVecRegsPerSimd
 
int numScalarRegsPerSimd
 
std::map< Addr, int > pagesTouched
 
pageDataStruct pageAccesses
 
TokenManagermemPortTokens
 
GMTokenPort gmTokenPort
 
LDSPort ldsPort
 The port to access the Local Data Store Can be connected to a LDS object. More...
 
std::vector< DataPortmemPort
 The memory port for SIMD data accesses. More...
 
std::vector< DTLBPorttlbPort
 
ScalarDataPort scalarDataPort
 
ScalarDTLBPort scalarDTLBPort
 
SQCPort sqcPort
 
ITLBPort sqcTLBPort
 
int activeWaves
 
gem5::ComputeUnit::ComputeUnitStats stats
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 

Protected Attributes

RequestorID _requestorId
 
LdsStatelds
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Private Member Functions

WFBarrierbarrierSlot (int bar_id)
 
int getFreeBarrierId ()
 

Private Attributes

const int _cacheLineSize
 
const int _numBarrierSlots
 
int cacheLineBits
 
InstSeqNum globalSeqNum
 
int wavefrontSize
 
ScoreboardCheckToSchedule scoreboardCheckToSchedule
 TODO: Update these comments once the pipe stage interface has been fully refactored. More...
 
ScheduleToExecute scheduleToExecute
 
std::vector< WFBarrierwfBarrierSlots
 The barrier slots for this CU. More...
 
std::unordered_set< int > freeBarrierIds
 A set used to easily retrieve a free barrier ID. More...
 
std::unordered_map< GPUDynInstPtr, TickheadTailMap
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing 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 void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Protected Member Functions inherited from gem5::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 gem5::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...
 
virtual void clockPeriodUpdated ()
 A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More...
 

Detailed Description

Definition at line 201 of file compute_unit.hh.

Member Typedef Documentation

◆ pageDataStruct

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

Definition at line 485 of file compute_unit.hh.

◆ Params

typedef ComputeUnitParams gem5::ComputeUnit::Params

Definition at line 290 of file compute_unit.hh.

Constructor & Destructor Documentation

◆ ComputeUnit()

gem5::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 wavefrontSize 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 wavefrontSize greater than 64b, however until that is done this assert is required.

Definition at line 65 of file compute_unit.cc.

References exec().

◆ ~ComputeUnit()

gem5::ComputeUnit::~ComputeUnit ( )

Member Function Documentation

◆ allAtBarrier()

bool gem5::ComputeUnit::allAtBarrier ( int  bar_id)

Definition at line 661 of file compute_unit.cc.

References barrierSlot().

Referenced by gem5::ScoreboardCheckStage::ready().

◆ barrierSlot()

WFBarrier& gem5::ComputeUnit::barrierSlot ( int  bar_id)
inlineprivate

◆ cacheLineSize()

int gem5::ComputeUnit::cacheLineSize ( ) const
inline

Definition at line 411 of file compute_unit.hh.

References _cacheLineSize.

Referenced by gem5::FetchUnit::init(), and gem5::FetchUnit::initiateFetch().

◆ decMaxBarrierCnt()

void gem5::ComputeUnit::decMaxBarrierCnt ( int  bar_id)

◆ deleteFromPipeMap()

void gem5::ComputeUnit::deleteFromPipeMap ( Wavefront w)

Definition at line 514 of file compute_unit.cc.

References panic_if, pipeMap, and gem5::VegaISA::w.

Referenced by gem5::Wavefront::exec().

◆ dispWorkgroup()

void gem5::ComputeUnit::dispWorkgroup ( HSAQueueEntry task,
int  num_wfs_in_wg 
)

◆ doFlush()

void gem5::ComputeUnit::doFlush ( GPUDynInstPtr  gpuDynInst)

trigger flush operation in the cu

gpuDynInst: inst passed to the request

Definition at line 409 of file compute_unit.cc.

References injectGlobalMemFence().

◆ doInvalidate()

void gem5::ComputeUnit::doInvalidate ( RequestPtr  req,
int  kernId 
)

trigger invalidate operation in the cu

req: request initialized in shader, carrying the invlidate flags

Definition at line 390 of file compute_unit.cc.

References getAndIncSeqNum(), and injectGlobalMemFence().

◆ doSmReturn()

template<typename c0 , typename c1 >
void gem5::ComputeUnit::doSmReturn ( GPUDynInstPtr  gpuDynInst)

◆ dpBypassLength()

int gem5::ComputeUnit::dpBypassLength ( ) const
inline

Definition at line 390 of file compute_unit.hh.

References dpBypassPipeLength.

Referenced by gem5::VectorRegisterFile::waveExecuteInst().

◆ exec()

void gem5::ComputeUnit::exec ( )

◆ exitCallback()

void gem5::ComputeUnit::exitCallback ( )

◆ fetch()

void gem5::ComputeUnit::fetch ( PacketPtr  pkt,
Wavefront wavefront 
)

◆ fillKernelState()

void gem5::ComputeUnit::fillKernelState ( Wavefront w,
HSAQueueEntry task 
)

◆ firstMemUnit()

int gem5::ComputeUnit::firstMemUnit ( ) const

◆ getAndIncSeqNum()

InstSeqNum gem5::ComputeUnit::getAndIncSeqNum ( )
inline

Definition at line 932 of file compute_unit.hh.

References globalSeqNum.

Referenced by doInvalidate().

◆ getCacheLineBits()

int gem5::ComputeUnit::getCacheLineBits ( ) const
inline

Definition at line 412 of file compute_unit.hh.

References cacheLineBits.

Referenced by gem5::FetchUnit::initiateFetch().

◆ getFreeBarrierId()

int gem5::ComputeUnit::getFreeBarrierId ( )
inlineprivate

Definition at line 425 of file compute_unit.hh.

References freeBarrierIds.

Referenced by dispWorkgroup().

◆ getLds()

LdsState& gem5::ComputeUnit::getLds ( ) const
inline

◆ getPort()

Port& gem5::ComputeUnit::getPort ( const std::string &  if_name,
PortID  idx 
)
inlineoverridevirtual

Get a port with a given name and index.

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

gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.

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

Reimplemented from gem5::SimObject.

Definition at line 909 of file compute_unit.hh.

References gem5::SimObject::getPort(), gmTokenPort, ldsPort, memPort, scalarDataPort, scalarDTLBPort, sqcPort, sqcTLBPort, and tlbPort.

◆ getRefCounter()

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

Definition at line 2044 of file compute_unit.cc.

References gem5::LdsState::getRefCounter(), and lds.

◆ getTokenManager()

TokenManager* gem5::ComputeUnit::getTokenManager ( )
inline

◆ handleMemPacket()

void gem5::ComputeUnit::handleMemPacket ( PacketPtr  pkt,
int  memport_index 
)

◆ handleSQCReturn()

void gem5::ComputeUnit::handleSQCReturn ( PacketPtr  pkt)

Definition at line 1006 of file compute_unit.cc.

References fetchStage, and gem5::FetchStage::processFetchReturn().

◆ hasDispResources()

bool gem5::ComputeUnit::hasDispResources ( HSAQueueEntry task,
int &  num_wfs_in_wg 
)

◆ incNumAtBarrier()

void gem5::ComputeUnit::incNumAtBarrier ( int  bar_id)

◆ init()

void gem5::ComputeUnit::init ( )
overridevirtual

◆ initiateFetch()

void gem5::ComputeUnit::initiateFetch ( Wavefront wavefront)

◆ injectGlobalMemFence()

void gem5::ComputeUnit::injectGlobalMemFence ( GPUDynInstPtr  gpuDynInst,
bool  kernelMemSync,
RequestPtr  req = nullptr 
)

◆ insertInPipeMap()

void gem5::ComputeUnit::insertInPipeMap ( Wavefront w)

Definition at line 505 of file compute_unit.cc.

References panic_if, pipeMap, and gem5::VegaISA::w.

Referenced by gem5::ScheduleStage::addToSchList().

◆ isDone()

bool gem5::ComputeUnit::isDone ( ) const

◆ isVectorAluIdle()

bool gem5::ComputeUnit::isVectorAluIdle ( uint32_t  simdId) const

Definition at line 2051 of file compute_unit.cc.

References gem5::Shader::n_wf, numVectorALUs, gem5::Wavefront::S_STOPPED, shader, and wfList.

Referenced by isDone().

◆ lastMemUnit()

int gem5::ComputeUnit::lastMemUnit ( ) const

Definition at line 253 of file compute_unit.cc.

References numExeUnits().

Referenced by gem5::ScheduleStage::exec().

◆ loadBusLength()

int gem5::ComputeUnit::loadBusLength ( ) const
inline

Definition at line 393 of file compute_unit.hh.

References numCyclesPerLoadTransfer.

Referenced by gem5::LdsState::processPacket().

◆ mapWaveToGlobalMem()

int gem5::ComputeUnit::mapWaveToGlobalMem ( Wavefront w) const

Definition at line 278 of file compute_unit.cc.

References numScalarALUs, and numVectorALUs.

Referenced by gem5::Wavefront::init().

◆ mapWaveToLocalMem()

int gem5::ComputeUnit::mapWaveToLocalMem ( Wavefront w) const

Definition at line 286 of file compute_unit.cc.

References numScalarALUs, numVectorALUs, and numVectorGlobalMemUnits.

Referenced by gem5::Wavefront::init().

◆ mapWaveToScalarAlu()

int gem5::ComputeUnit::mapWaveToScalarAlu ( Wavefront w) const

Definition at line 260 of file compute_unit.cc.

References numScalarALUs, and gem5::VegaISA::w.

Referenced by gem5::Wavefront::init(), and mapWaveToScalarAluGlobalIdx().

◆ mapWaveToScalarAluGlobalIdx()

int gem5::ComputeUnit::mapWaveToScalarAluGlobalIdx ( Wavefront w) const

Definition at line 271 of file compute_unit.cc.

References mapWaveToScalarAlu(), numVectorALUs, and gem5::VegaISA::w.

Referenced by gem5::Wavefront::init().

◆ mapWaveToScalarMem()

int gem5::ComputeUnit::mapWaveToScalarMem ( Wavefront w) const

◆ maxBarrierCnt()

int gem5::ComputeUnit::maxBarrierCnt ( int  bar_id)

◆ numAtBarrier()

int gem5::ComputeUnit::numAtBarrier ( int  bar_id)

◆ numBarrierSlots()

int gem5::ComputeUnit::numBarrierSlots ( ) const
inline

Definition at line 444 of file compute_unit.hh.

References _numBarrierSlots.

◆ numExeUnits()

int gem5::ComputeUnit::numExeUnits ( ) const

◆ numYetToReachBarrier()

int gem5::ComputeUnit::numYetToReachBarrier ( int  bar_id)

◆ oprNetPipeLength()

int gem5::ComputeUnit::oprNetPipeLength ( ) const
inline

Definition at line 387 of file compute_unit.hh.

References operandNetworkLength.

◆ processFetchReturn()

void gem5::ComputeUnit::processFetchReturn ( PacketPtr  pkt)

◆ processTimingPacket()

bool gem5::ComputeUnit::processTimingPacket ( PacketPtr  pkt)

◆ releaseBarrier()

void gem5::ComputeUnit::releaseBarrier ( int  bar_id)

◆ releaseWFsFromBarrier()

void gem5::ComputeUnit::releaseWFsFromBarrier ( int  bar_id)

◆ requestorId()

RequestorID gem5::ComputeUnit::requestorId ( )
inline

Definition at line 460 of file compute_unit.hh.

References _requestorId.

Referenced by gem5::FetchUnit::initiateFetch(), and vramRequestorId().

◆ resetBarrier()

void gem5::ComputeUnit::resetBarrier ( int  bar_id)

Definition at line 689 of file compute_unit.cc.

References barrierSlot().

Referenced by gem5::ScoreboardCheckStage::ready().

◆ resetRegisterPool()

void gem5::ComputeUnit::resetRegisterPool ( )

◆ scalarPipeLength()

int gem5::ComputeUnit::scalarPipeLength ( ) const
inline

Definition at line 391 of file compute_unit.hh.

References scalarPipeStages.

Referenced by gem5::ScalarRegisterFile::waveExecuteInst().

◆ sendRequest()

void gem5::ComputeUnit::sendRequest ( GPUDynInstPtr  gpuDynInst,
PortID  index,
PacketPtr  pkt 
)

◆ sendScalarRequest()

void gem5::ComputeUnit::sendScalarRequest ( GPUDynInstPtr  gpuDynInst,
PacketPtr  pkt 
)

◆ sendToLds()

bool gem5::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 2070 of file compute_unit.cc.

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

Referenced by gem5::LocalMemPipeline::exec().

◆ simdUnitWidth()

int gem5::ComputeUnit::simdUnitWidth ( ) const
inline

Definition at line 388 of file compute_unit.hh.

References simdWidth.

◆ spBypassLength()

int gem5::ComputeUnit::spBypassLength ( ) const
inline

Definition at line 389 of file compute_unit.hh.

References spBypassPipeLength.

◆ startWavefront()

void gem5::ComputeUnit::startWavefront ( Wavefront w,
int  waveId,
LdsChunk ldsChunk,
HSAQueueEntry task,
int  bar_id,
bool  fetchContext = false 
)

◆ storeBusLength()

int gem5::ComputeUnit::storeBusLength ( ) const
inline

Definition at line 392 of file compute_unit.hh.

References numCyclesPerStoreTransfer.

Referenced by gem5::LdsState::processPacket().

◆ updateInstStats()

void gem5::ComputeUnit::updateInstStats ( GPUDynInstPtr  gpuDynInst)

this case can occur for flat mem insts who execute with EXEC = 0

this case can occur for flat mem insts who execute with EXEC = 0

Definition at line 1878 of file compute_unit.cc.

References gem5::ComputeUnit::ComputeUnitStats::argReads, gem5::ComputeUnit::ComputeUnitStats::argWrites, gem5::exitSimLoop(), fatal, gem5::ComputeUnit::ComputeUnitStats::flatLDSInsts, gem5::ComputeUnit::ComputeUnitStats::flatVMemInsts, gem5::ComputeUnit::ComputeUnitStats::globalReads, gem5::ComputeUnit::ComputeUnitStats::globalWrites, gem5::ComputeUnit::ComputeUnitStats::groupReads, gem5::ComputeUnit::ComputeUnitStats::groupWrites, gem5::ComputeUnit::ComputeUnitStats::instCyclesSALU, gem5::ComputeUnit::ComputeUnitStats::instCyclesVALU, gem5::ComputeUnit::ComputeUnitStats::kernargReads, gem5::ComputeUnit::ComputeUnitStats::kernargWrites, gem5::ComputeUnit::ComputeUnitStats::ldsNoFlatInsts, gem5::Shader::max_valu_insts, gem5::ComputeUnit::ComputeUnitStats::privReads, gem5::ComputeUnit::ComputeUnitStats::privWrites, gem5::ComputeUnit::ComputeUnitStats::readonlyReads, gem5::ComputeUnit::ComputeUnitStats::readonlyWrites, gem5::ComputeUnit::ComputeUnitStats::sALUInsts, sc_core::SC_NONE, gem5::ComputeUnit::ComputeUnitStats::scalarMemReads, gem5::ComputeUnit::ComputeUnitStats::scalarMemWrites, shader, gem5::ComputeUnit::ComputeUnitStats::spillReads, gem5::ComputeUnit::ComputeUnitStats::spillWrites, stats, gem5::ComputeUnit::ComputeUnitStats::threadCyclesVALU, gem5::Shader::total_valu_insts, gem5::ComputeUnit::ComputeUnitStats::vALUInsts, gem5::ComputeUnit::ComputeUnitStats::vectorMemReads, and gem5::ComputeUnit::ComputeUnitStats::vectorMemWrites.

Referenced by gem5::Wavefront::exec().

◆ updatePageDivergenceDist()

void gem5::ComputeUnit::updatePageDivergenceDist ( Addr  addr)

Definition at line 1986 of file compute_unit.cc.

References gem5::X86ISA::addr, gem5::X86ISA::PageBytes, pagesTouched, and gem5::roundDown().

Referenced by sendRequest().

◆ vramRequestorId()

RequestorID gem5::ComputeUnit::vramRequestorId ( )

Forward the VRAM requestor ID needed for device memory from shader.

Definition at line 2090 of file compute_unit.cc.

References gem5::FullSystem, requestorId(), shader, and gem5::Shader::vramRequestorId().

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

◆ wfSize()

int gem5::ComputeUnit::wfSize ( ) const
inline

Member Data Documentation

◆ _cacheLineSize

const int gem5::ComputeUnit::_cacheLineSize
private

Definition at line 935 of file compute_unit.hh.

Referenced by cacheLineSize().

◆ _numBarrierSlots

const int gem5::ComputeUnit::_numBarrierSlots
private

Definition at line 936 of file compute_unit.hh.

Referenced by numBarrierSlots().

◆ _requestorId

RequestorID gem5::ComputeUnit::_requestorId
protected

Definition at line 469 of file compute_unit.hh.

Referenced by requestorId().

◆ activeWaves

int gem5::ComputeUnit::activeWaves

◆ cacheLineBits

int gem5::ComputeUnit::cacheLineBits
private

Definition at line 937 of file compute_unit.hh.

Referenced by getCacheLineBits().

◆ coalescerToVrfBusWidth

int gem5::ComputeUnit::coalescerToVrfBusWidth

Definition at line 269 of file compute_unit.hh.

◆ countPages

bool gem5::ComputeUnit::countPages

Definition at line 351 of file compute_unit.hh.

Referenced by exitCallback().

◆ cu_id

int gem5::ComputeUnit::cu_id

◆ debugSegFault

bool gem5::ComputeUnit::debugSegFault

Definition at line 341 of file compute_unit.hh.

Referenced by sendRequest().

◆ dpBypassPipeLength

int gem5::ComputeUnit::dpBypassPipeLength

Definition at line 307 of file compute_unit.hh.

Referenced by dpBypassLength().

◆ exec_policy

EXEC_POLICY gem5::ComputeUnit::exec_policy

Definition at line 339 of file compute_unit.hh.

◆ execStage

ExecStage gem5::ComputeUnit::execStage

Definition at line 283 of file compute_unit.hh.

Referenced by exec(), and init().

◆ fetchStage

FetchStage gem5::ComputeUnit::fetchStage

◆ freeBarrierIds

std::unordered_set<int> gem5::ComputeUnit::freeBarrierIds
private

A set used to easily retrieve a free barrier ID.

Definition at line 983 of file compute_unit.hh.

Referenced by getFreeBarrierId(), hasDispResources(), and releaseBarrier().

◆ functionalTLB

bool gem5::ComputeUnit::functionalTLB

Definition at line 345 of file compute_unit.hh.

Referenced by sendRequest().

◆ glbMemToVrfBus

WaitClass gem5::ComputeUnit::glbMemToVrfBus

Definition at line 221 of file compute_unit.hh.

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

◆ globalMemoryPipe

GlobalMemPipeline gem5::ComputeUnit::globalMemoryPipe

◆ globalSeqNum

InstSeqNum gem5::ComputeUnit::globalSeqNum
private

Definition at line 938 of file compute_unit.hh.

Referenced by getAndIncSeqNum().

◆ gmTokenPort

GMTokenPort gem5::ComputeUnit::gmTokenPort

Definition at line 508 of file compute_unit.hh.

Referenced by getPort(), and init().

◆ headTailMap

std::unordered_map<GPUDynInstPtr, Tick> gem5::ComputeUnit::headTailMap
private

Definition at line 988 of file compute_unit.hh.

Referenced by gem5::ComputeUnit::DataPort::processMemRespEvent().

◆ idleCUTimeout

Tick gem5::ComputeUnit::idleCUTimeout

Definition at line 343 of file compute_unit.hh.

Referenced by gem5::Wavefront::setStatus().

◆ idleWfs

int gem5::ComputeUnit::idleWfs

Definition at line 344 of file compute_unit.hh.

Referenced by gem5::Wavefront::setStatus().

◆ instExecPerSimd

std::vector<uint64_t> gem5::ComputeUnit::instExecPerSimd

Definition at line 326 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ issuePeriod

Cycles gem5::ComputeUnit::issuePeriod

Definition at line 313 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ lastExecCycle

std::vector<uint64_t> gem5::ComputeUnit::lastExecCycle

Definition at line 323 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ lastVaddrCU

std::vector<Addr> gem5::ComputeUnit::lastVaddrCU

Definition at line 335 of file compute_unit.hh.

Referenced by ~ComputeUnit().

◆ lastVaddrSimd

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

Definition at line 336 of file compute_unit.hh.

Referenced by ~ComputeUnit().

◆ lastVaddrWF

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

Definition at line 337 of file compute_unit.hh.

◆ lds

LdsState& gem5::ComputeUnit::lds
protected

◆ ldsPort

LDSPort gem5::ComputeUnit::ldsPort

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

Definition at line 885 of file compute_unit.hh.

Referenced by getPort(), and sendToLds().

◆ localMemBarrier

bool gem5::ComputeUnit::localMemBarrier

Definition at line 346 of file compute_unit.hh.

◆ localMemoryPipe

LocalMemPipeline gem5::ComputeUnit::localMemoryPipe

Definition at line 285 of file compute_unit.hh.

Referenced by gem5::ScheduleStage::dispatchReady(), exec(), and isDone().

◆ locMemToVrfBus

WaitClass gem5::ComputeUnit::locMemToVrfBus

Definition at line 229 of file compute_unit.hh.

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

◆ memPort

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

The memory port for SIMD data accesses.

Can be connected to PhysMem for Ruby for timing simulations

Definition at line 896 of file compute_unit.hh.

Referenced by getPort(), injectGlobalMemFence(), and sendRequest().

◆ memPortTokens

TokenManager* gem5::ComputeUnit::memPortTokens

Definition at line 507 of file compute_unit.hh.

Referenced by getTokenManager(), and init().

◆ numCyclesPerLoadTransfer

int gem5::ComputeUnit::numCyclesPerLoadTransfer

Definition at line 271 of file compute_unit.hh.

Referenced by loadBusLength().

◆ numCyclesPerStoreTransfer

int gem5::ComputeUnit::numCyclesPerStoreTransfer

Definition at line 270 of file compute_unit.hh.

Referenced by storeBusLength().

◆ numScalarALUs

int gem5::ComputeUnit::numScalarALUs

◆ numScalarMemUnits

int gem5::ComputeUnit::numScalarMemUnits

Definition at line 235 of file compute_unit.hh.

Referenced by init(), and numExeUnits().

◆ numScalarRegsPerSimd

int gem5::ComputeUnit::numScalarRegsPerSimd

◆ numVecRegsPerSimd

int gem5::ComputeUnit::numVecRegsPerSimd

◆ numVectorALUs

int gem5::ComputeUnit::numVectorALUs

◆ numVectorGlobalMemUnits

int gem5::ComputeUnit::numVectorGlobalMemUnits

◆ numVectorSharedMemUnits

int gem5::ComputeUnit::numVectorSharedMemUnits

Definition at line 227 of file compute_unit.hh.

Referenced by gem5::ScheduleStage::init(), init(), mapWaveToScalarMem(), and numExeUnits().

◆ numWfsToSched

std::vector<int> gem5::ComputeUnit::numWfsToSched

Number of WFs to schedule to each SIMD.

This vector is populated by hasDispResources(), and consumed by the subsequent call to dispWorkgroup(), to schedule the specified number of WFs to the SIMD units. Entry I provides the number of WFs to schedule to SIMD I.

Definition at line 364 of file compute_unit.hh.

Referenced by dispWorkgroup(), and hasDispResources().

◆ operandNetworkLength

int gem5::ComputeUnit::operandNetworkLength

Definition at line 311 of file compute_unit.hh.

Referenced by oprNetPipeLength().

◆ pageAccesses

pageDataStruct gem5::ComputeUnit::pageAccesses

Definition at line 486 of file compute_unit.hh.

Referenced by exitCallback(), and gem5::GPUDynInst::updateStats().

◆ pagesTouched

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

Definition at line 378 of file compute_unit.hh.

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

◆ perLaneTLB

bool gem5::ComputeUnit::perLaneTLB

Definition at line 329 of file compute_unit.hh.

Referenced by sendRequest().

◆ pipeMap

std::unordered_set<uint64_t> gem5::ComputeUnit::pipeMap

Definition at line 276 of file compute_unit.hh.

Referenced by deleteFromPipeMap(), insertInPipeMap(), and gem5::Wavefront::nextInstr().

◆ prefetchDepth

int gem5::ComputeUnit::prefetchDepth

Definition at line 331 of file compute_unit.hh.

◆ prefetchStride

int gem5::ComputeUnit::prefetchStride

Definition at line 333 of file compute_unit.hh.

◆ prefetchType

enums::PrefetchType gem5::ComputeUnit::prefetchType

Definition at line 338 of file compute_unit.hh.

◆ registerManager

RegisterManager* gem5::ComputeUnit::registerManager

◆ req_tick_latency

Tick gem5::ComputeUnit::req_tick_latency

Definition at line 355 of file compute_unit.hh.

Referenced by injectGlobalMemFence(), and sendRequest().

◆ resp_tick_latency

Tick gem5::ComputeUnit::resp_tick_latency

Definition at line 356 of file compute_unit.hh.

◆ scalarALUs

std::vector<WaitClass> gem5::ComputeUnit::scalarALUs

◆ scalarDataPort

ScalarDataPort gem5::ComputeUnit::scalarDataPort

◆ scalarDTLBPort

ScalarDTLBPort gem5::ComputeUnit::scalarDTLBPort

Definition at line 902 of file compute_unit.hh.

Referenced by getPort(), and sendScalarRequest().

◆ scalarMemoryPipe

ScalarMemPipeline gem5::ComputeUnit::scalarMemoryPipe

Definition at line 286 of file compute_unit.hh.

Referenced by gem5::ScheduleStage::dispatchReady(), and exec().

◆ scalarMemToSrfBus

WaitClass gem5::ComputeUnit::scalarMemToSrfBus

Definition at line 237 of file compute_unit.hh.

Referenced by gem5::ScalarMemPipeline::exec(), init(), and isDone().

◆ scalarMemUnit

WaitClass gem5::ComputeUnit::scalarMemUnit

◆ scalarPipeStages

int gem5::ComputeUnit::scalarPipeStages

Definition at line 309 of file compute_unit.hh.

Referenced by scalarPipeLength().

◆ scalarRegsReserved

std::vector<int> gem5::ComputeUnit::scalarRegsReserved

Definition at line 369 of file compute_unit.hh.

Referenced by gem5::StaticRegisterManagerPolicy::allocateRegisters(), and init().

◆ scheduleStage

ScheduleStage gem5::ComputeUnit::scheduleStage

Definition at line 282 of file compute_unit.hh.

Referenced by exec(), gem5::ExecStage::exec(), and init().

◆ scheduleToExecute

ScheduleToExecute gem5::ComputeUnit::scheduleToExecute
private

Definition at line 974 of file compute_unit.hh.

◆ scoreboardCheckStage

ScoreboardCheckStage gem5::ComputeUnit::scoreboardCheckStage

Definition at line 281 of file compute_unit.hh.

Referenced by exec().

◆ scoreboardCheckToSchedule

ScoreboardCheckToSchedule gem5::ComputeUnit::scoreboardCheckToSchedule
private

TODO: Update these comments once the pipe stage interface has been fully refactored.

Pipeline stage interfaces.

Buffers used to communicate between various pipeline stages List of waves which will be dispatched to each execution resource. An EXREADY implies dispatch list is non-empty and execution unit has something to execute this cycle. Currently, the dispatch list of an execution resource can hold only one wave because an execution resource can execute only one wave in a cycle. dispatchList is used to communicate between schedule and exec stage

At a high level, the following intra-/inter-stage communication occurs: SCB to SCH: readyList provides per exec resource list of waves that passed dependency and readiness checks. If selected by scheduler, attempt to add wave to schList conditional on RF support. SCH: schList holds waves that are gathering operands or waiting for execution resource availability. Once ready, waves are placed on the dispatchList as candidates for execution. A wave may spend multiple cycles in SCH stage, on the schList due to RF access conflicts or execution resource contention. SCH to EX: dispatchList holds waves that are ready to be executed. LM/FLAT arbitration may remove an LM wave and place it back on the schList. RF model may also force a wave back to the schList if using the detailed model.

Definition at line 973 of file compute_unit.hh.

◆ shader

Shader* gem5::ComputeUnit::shader

◆ simdWidth

int gem5::ComputeUnit::simdWidth

Definition at line 301 of file compute_unit.hh.

Referenced by simdUnitWidth().

◆ spBypassPipeLength

int gem5::ComputeUnit::spBypassPipeLength

Definition at line 304 of file compute_unit.hh.

Referenced by spBypassLength().

◆ sqcPort

SQCPort gem5::ComputeUnit::sqcPort

Definition at line 904 of file compute_unit.hh.

Referenced by gem5::FetchUnit::fetch(), and getPort().

◆ sqcTLBPort

ITLBPort gem5::ComputeUnit::sqcTLBPort

Definition at line 906 of file compute_unit.hh.

Referenced by getPort(), and gem5::FetchUnit::initiateFetch().

◆ srf

std::vector<ScalarRegisterFile*> gem5::ComputeUnit::srf

◆ srf_scm_bus_latency

Cycles gem5::ComputeUnit::srf_scm_bus_latency

Definition at line 318 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ srfToScalarMemPipeBus

WaitClass gem5::ComputeUnit::srfToScalarMemPipeBus

◆ stats

gem5::ComputeUnit::ComputeUnitStats gem5::ComputeUnit::stats

◆ tickEvent

EventFunctionWrapper gem5::ComputeUnit::tickEvent

Definition at line 288 of file compute_unit.hh.

Referenced by dispWorkgroup(), and exec().

◆ tlbPort

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

Definition at line 898 of file compute_unit.hh.

Referenced by getPort(), and sendRequest().

◆ vectorALUs

std::vector<WaitClass> gem5::ComputeUnit::vectorALUs

◆ vectorGlobalMemUnit

WaitClass gem5::ComputeUnit::vectorGlobalMemUnit

◆ vectorRegsReserved

std::vector<int> gem5::ComputeUnit::vectorRegsReserved

Definition at line 367 of file compute_unit.hh.

Referenced by gem5::StaticRegisterManagerPolicy::allocateRegisters(), and init().

◆ vectorSharedMemUnit

WaitClass gem5::ComputeUnit::vectorSharedMemUnit

◆ vrf

std::vector<VectorRegisterFile*> gem5::ComputeUnit::vrf

◆ vrf_gm_bus_latency

Cycles gem5::ComputeUnit::vrf_gm_bus_latency

Definition at line 316 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ vrf_lm_bus_latency

Cycles gem5::ComputeUnit::vrf_lm_bus_latency

Definition at line 320 of file compute_unit.hh.

Referenced by gem5::Wavefront::exec().

◆ vrfToCoalescerBusWidth

int gem5::ComputeUnit::vrfToCoalescerBusWidth

Definition at line 268 of file compute_unit.hh.

◆ vrfToGlobalMemPipeBus

WaitClass gem5::ComputeUnit::vrfToGlobalMemPipeBus

◆ vrfToLocalMemPipeBus

WaitClass gem5::ComputeUnit::vrfToLocalMemPipeBus

◆ wavefrontSize

int gem5::ComputeUnit::wavefrontSize
private

Definition at line 939 of file compute_unit.hh.

Referenced by wfSize().

◆ wfBarrierSlots

std::vector<WFBarrier> gem5::ComputeUnit::wfBarrierSlots
private

The barrier slots for this CU.

Definition at line 979 of file compute_unit.hh.

Referenced by barrierSlot().

◆ wfList

std::vector<std::vector<Wavefront*> > gem5::ComputeUnit::wfList

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

Generated on Wed Dec 21 2022 10:23:22 for gem5 by doxygen 1.9.1