gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::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.
 
void completeRequest (GPUDynInstPtr gpuDynInst)
 once a memory request is finished we remove it from the buffer.
 
void issueRequest (GPUDynInstPtr gpuDynInst)
 Issues a request to the pipeline (i.e., enqueue it in the request buffer).
 
void handleResponse (GPUDynInstPtr gpuDynInst)
 This method handles responses sent to this GM pipeline by the CU.
 
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

gem5::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 59 of file global_memory_pipeline.hh.

Constructor & Destructor Documentation

◆ GlobalMemPipeline()

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

Definition at line 47 of file global_memory_pipeline.cc.

Member Function Documentation

◆ acqCoalescerToken()

void gem5::GlobalMemPipeline::acqCoalescerToken ( GPUDynInstPtr mp)

Definition at line 86 of file global_memory_pipeline.cc.

References DPRINTF, and gem5::ArmISA::mp.

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

◆ coalescerReady()

bool gem5::GlobalMemPipeline::coalescerReady ( GPUDynInstPtr mp) const

Definition at line 63 of file global_memory_pipeline.cc.

References DPRINTF, and gem5::ArmISA::mp.

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

◆ completeRequest()

void gem5::GlobalMemPipeline::completeRequest ( GPUDynInstPtr gpuDynInst)

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

Definition at line 258 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, inflightLoads, and inflightStores.

Referenced by exec().

◆ exec()

void gem5::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 111 of file global_memory_pipeline.cc.

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

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

◆ getNextReadyResp()

GPUDynInstPtr gem5::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 244 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer.

Referenced by exec().

◆ handleResponse()

void gem5::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 305 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer.

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

◆ incLoadVRFBankConflictCycles()

void gem5::GlobalMemPipeline::incLoadVRFBankConflictCycles ( int num_cycles)
inline

◆ init()

void gem5::GlobalMemPipeline::init ( )

◆ isGMReqFIFOWrRdy()

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

Definition at line 95 of file global_memory_pipeline.hh.

References gmIssuedRequests, and gmQueueSize.

Referenced by gem5::ComputeUnit::isDone().

◆ issueRequest()

void gem5::GlobalMemPipeline::issueRequest ( GPUDynInstPtr gpuDynInst)

◆ name()

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

Definition at line 100 of file global_memory_pipeline.hh.

References _name.

◆ outstandingReqsCheck()

bool gem5::GlobalMemPipeline::outstandingReqsCheck ( GPUDynInstPtr mp) const

Definition at line 98 of file global_memory_pipeline.cc.

References maxWaveRequests, and gem5::ArmISA::mp.

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

Member Data Documentation

◆ _name

const std::string gem5::GlobalMemPipeline::_name
private

Definition at line 114 of file global_memory_pipeline.hh.

Referenced by name().

◆ computeUnit

ComputeUnit& gem5::GlobalMemPipeline::computeUnit
private

Definition at line 113 of file global_memory_pipeline.hh.

Referenced by exec(), and init().

◆ globalMemSize

int gem5::GlobalMemPipeline::globalMemSize
private

Definition at line 125 of file global_memory_pipeline.hh.

Referenced by init().

◆ gmIssuedRequests

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

Definition at line 144 of file global_memory_pipeline.hh.

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

◆ gmOrderedRespBuffer

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

Definition at line 140 of file global_memory_pipeline.hh.

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

◆ gmQueueSize

int gem5::GlobalMemPipeline::gmQueueSize
private

Definition at line 115 of file global_memory_pipeline.hh.

Referenced by exec(), and isGMReqFIFOWrRdy().

◆ inflightLoads

int gem5::GlobalMemPipeline::inflightLoads
private

Definition at line 122 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ inflightStores

int gem5::GlobalMemPipeline::inflightStores
private

Definition at line 121 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ maxWaveRequests

int gem5::GlobalMemPipeline::maxWaveRequests
private

Definition at line 116 of file global_memory_pipeline.hh.

Referenced by outstandingReqsCheck().

◆ stats

gem5::GlobalMemPipeline::GlobalMemPipelineStats gem5::GlobalMemPipeline::stats
protected

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

Generated on Tue Jun 18 2024 16:24:11 for gem5 by doxygen 1.11.0