gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Attributes | Private Attributes | List of all members
GlobalMemPipeline Class Reference

#include <global_memory_pipeline.hh>

Classes

struct  GlobalMemPipelineStats
 

Public Member Functions

 GlobalMemPipeline (const ComputeUnitParams &p, ComputeUnit &cu)
 
void init ()
 
void exec ()
 
GPUDynInstPtr getNextReadyResp ()
 Find the next ready response to service. More...
 
void completeRequest (GPUDynInstPtr gpuDynInst)
 once a memory request is finished we remove it from the buffer. More...
 
void issueRequest (GPUDynInstPtr gpuDynInst)
 Issues a request to the pipeline (i.e., enqueue it in the request buffer). More...
 
void handleResponse (GPUDynInstPtr gpuDynInst)
 This method handles responses sent to this GM pipeline by the CU. More...
 
bool isGMReqFIFOWrRdy (uint32_t pendReqs=0) const
 
const std::string & name () const
 
void incLoadVRFBankConflictCycles (int num_cycles)
 
bool coalescerReady (GPUDynInstPtr mp) const
 
bool outstandingReqsCheck (GPUDynInstPtr mp) const
 
void acqCoalescerToken (GPUDynInstPtr mp)
 

Protected Attributes

GlobalMemPipeline::GlobalMemPipelineStats stats
 

Private Attributes

ComputeUnitcomputeUnit
 
const std::string _name
 
int gmQueueSize
 
int maxWaveRequests
 
int inflightStores
 
int inflightLoads
 
int globalMemSize
 
std::map< uint64_t, std::pair< GPUDynInstPtr, bool > > gmOrderedRespBuffer
 
std::queue< GPUDynInstPtrgmIssuedRequests
 

Detailed Description

Definition at line 58 of file global_memory_pipeline.hh.

Constructor & Destructor Documentation

◆ GlobalMemPipeline()

GlobalMemPipeline::GlobalMemPipeline ( const ComputeUnitParams &  p,
ComputeUnit cu 
)

Definition at line 46 of file global_memory_pipeline.cc.

Member Function Documentation

◆ acqCoalescerToken()

void GlobalMemPipeline::acqCoalescerToken ( GPUDynInstPtr  mp)

Definition at line 81 of file global_memory_pipeline.cc.

References DPRINTF, and ArmISA::mp.

Referenced by ScheduleStage::fillDispatchList().

◆ coalescerReady()

bool GlobalMemPipeline::coalescerReady ( GPUDynInstPtr  mp) const

Definition at line 62 of file global_memory_pipeline.cc.

References DPRINTF, and ArmISA::mp.

Referenced by ScheduleStage::dispatchReady().

◆ completeRequest()

void GlobalMemPipeline::completeRequest ( GPUDynInstPtr  gpuDynInst)

once a memory request is finished we remove it from the buffer.

Definition at line 253 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, inflightLoads, and inflightStores.

Referenced by exec().

◆ exec()

void GlobalMemPipeline::exec ( )

if we are not in out-of-order data delivery mode then we keep the responses sorted in program order. in order to do so we must reserve an entry in the resp buffer before we issue the request to the mem system. mem fence requests will not be stored here because once they are issued from the GM pipeline, they do not send any response back to it.

Memory accesses instructions that do not generate any memory requests (such as out-of-bounds buffer acceses where all lanes are out of bounds) will not trigger a callback to complete the request, so we need to mark it as completed as soon as it is issued. Note this this will still insert an entry in the ordered return FIFO such that waitcnt is still resolved correctly.

Definition at line 106 of file global_memory_pipeline.cc.

References Shader::coissue_return, Complete, completeRequest(), computeUnit, ComputeUnit::cu_id, curTick(), DPRINTF, getNextReadyResp(), ComputeUnit::getTokenManager(), ComputeUnit::glbMemToVrfBus, gmIssuedRequests, gmOrderedRespBuffer, gmQueueSize, handleResponse(), inflightLoads, inflightStores, ArmISA::m, ArmISA::mp, WaitClass::rdy(), TokenManager::recvTokens(), Shader::sampleInstRoundTrip(), Shader::sampleLineRoundTrip(), Shader::sampleLoad(), Shader::sampleStore(), Shader::ScheduleAdd(), WaitClass::set(), ComputeUnit::shader, ComputeUnit::vectorGlobalMemUnit, and MipsISA::w.

Referenced by ComputeUnit::exec().

◆ getNextReadyResp()

GPUDynInstPtr GlobalMemPipeline::getNextReadyResp ( )

Find the next ready response to service.

In order to ensure that no waitcnts are violated, we pop the oldest (in program order) response, and only if it is marked as done. This is because waitcnt values expect memory operations to complete and decrement their counter values in program order.

Definition at line 239 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer.

Referenced by exec().

◆ handleResponse()

void GlobalMemPipeline::handleResponse ( GPUDynInstPtr  gpuDynInst)

This method handles responses sent to this GM pipeline by the CU.

Simply marks the reqeust as done in the ordered buffer to indicate that the requst is finished.

Definition at line 282 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer.

Referenced by exec(), ComputeUnit::DataPort::processMemRespEvent(), and ComputeUnit::DataPort::recvTimingResp().

◆ incLoadVRFBankConflictCycles()

void GlobalMemPipeline::incLoadVRFBankConflictCycles ( int  num_cycles)
inline

◆ init()

void GlobalMemPipeline::init ( )

◆ isGMReqFIFOWrRdy()

bool GlobalMemPipeline::isGMReqFIFOWrRdy ( uint32_t  pendReqs = 0) const
inline

Definition at line 94 of file global_memory_pipeline.hh.

References gmIssuedRequests, and gmQueueSize.

Referenced by ComputeUnit::isDone().

◆ issueRequest()

void GlobalMemPipeline::issueRequest ( GPUDynInstPtr  gpuDynInst)

Issues a request to the pipeline (i.e., enqueue it in the request buffer).

Definition at line 274 of file global_memory_pipeline.cc.

References curTick(), gmIssuedRequests, and Initiate.

◆ name()

const std::string& GlobalMemPipeline::name ( ) const
inline

Definition at line 99 of file global_memory_pipeline.hh.

References _name.

◆ outstandingReqsCheck()

bool GlobalMemPipeline::outstandingReqsCheck ( GPUDynInstPtr  mp) const

Definition at line 93 of file global_memory_pipeline.cc.

References maxWaveRequests, and ArmISA::mp.

Referenced by ScheduleStage::dispatchReady().

Member Data Documentation

◆ _name

const std::string GlobalMemPipeline::_name
private

Definition at line 113 of file global_memory_pipeline.hh.

Referenced by name().

◆ computeUnit

ComputeUnit& GlobalMemPipeline::computeUnit
private

Definition at line 112 of file global_memory_pipeline.hh.

Referenced by exec(), and init().

◆ globalMemSize

int GlobalMemPipeline::globalMemSize
private

Definition at line 124 of file global_memory_pipeline.hh.

Referenced by init().

◆ gmIssuedRequests

std::queue<GPUDynInstPtr> GlobalMemPipeline::gmIssuedRequests
private

Definition at line 143 of file global_memory_pipeline.hh.

Referenced by exec(), isGMReqFIFOWrRdy(), and issueRequest().

◆ gmOrderedRespBuffer

std::map<uint64_t, std::pair<GPUDynInstPtr, bool> > GlobalMemPipeline::gmOrderedRespBuffer
private

Definition at line 139 of file global_memory_pipeline.hh.

Referenced by completeRequest(), exec(), getNextReadyResp(), and handleResponse().

◆ gmQueueSize

int GlobalMemPipeline::gmQueueSize
private

Definition at line 114 of file global_memory_pipeline.hh.

Referenced by exec(), and isGMReqFIFOWrRdy().

◆ inflightLoads

int GlobalMemPipeline::inflightLoads
private

Definition at line 121 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ inflightStores

int GlobalMemPipeline::inflightStores
private

Definition at line 120 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ maxWaveRequests

int GlobalMemPipeline::maxWaveRequests
private

Definition at line 115 of file global_memory_pipeline.hh.

Referenced by outstandingReqsCheck().

◆ stats

GlobalMemPipeline::GlobalMemPipelineStats GlobalMemPipeline::stats
protected

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

Generated on Tue Jun 22 2021 15:28:39 for gem5 by doxygen 1.8.17