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

#include <global_memory_pipeline.hh>

Public Member Functions

 GlobalMemPipeline (const ComputeUnitParams *params)
 
void init (ComputeUnit *cu)
 
void exec ()
 
std::queue< GPUDynInstPtr > & getGMStRespFIFO ()
 
std::queue< GPUDynInstPtr > & getGMLdRespFIFO ()
 
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 isGMLdRespFIFOWrRdy () const
 
bool isGMStRespFIFOWrRdy () const
 
bool isGMReqFIFOWrRdy (uint32_t pendReqs=0) const
 
const std::string & name () const
 
void regStats ()
 
void incLoadVRFBankConflictCycles (int num_cycles)
 
bool coalescerReady (GPUDynInstPtr mp) const
 

Private Attributes

ComputeUnitcomputeUnit
 
std::string _name
 
int gmQueueSize
 
bool outOfOrderDataDelivery
 
Stats::Scalar loadVrfBankConflictCycles
 
int inflightStores
 
int inflightLoads
 
int globalMemSize
 
std::map< uint64_t, std::pair< GPUDynInstPtr, bool > > gmOrderedRespBuffer
 
std::queue< GPUDynInstPtrgmIssuedRequests
 
std::queue< GPUDynInstPtrgmReturnedStores
 
std::queue< GPUDynInstPtrgmReturnedLoads
 

Detailed Description

Definition at line 56 of file global_memory_pipeline.hh.

Constructor & Destructor Documentation

◆ GlobalMemPipeline()

GlobalMemPipeline::GlobalMemPipeline ( const ComputeUnitParams *  params)

Definition at line 45 of file global_memory_pipeline.cc.

Member Function Documentation

◆ coalescerReady()

bool GlobalMemPipeline::coalescerReady ( GPUDynInstPtr  mp) const

Definition at line 61 of file global_memory_pipeline.cc.

References DPRINTF.

Referenced by incLoadVRFBankConflictCycles(), and Wavefront::ready().

◆ completeRequest()

void GlobalMemPipeline::completeRequest ( GPUDynInstPtr  gpuDynInst)

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

this method determines which response buffer we're using based on the mode (in-order vs. OoO).

Definition at line 201 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, gmReturnedLoads, gmReturnedStores, inflightLoads, inflightStores, and outOfOrderDataDelivery.

Referenced by exec(), and getGMLdRespFIFO().

◆ 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.

Definition at line 80 of file global_memory_pipeline.cc.

References Shader::coissue_return, completeRequest(), computeUnit, Wavefront::computeUnit, ComputeUnit::cu_id, DPRINTF, getNextReadyResp(), ComputeUnit::glbMemToVrfBus, gmIssuedRequests, gmOrderedRespBuffer, gmQueueSize, inflightLoads, inflightStores, ArmISA::m, X86ISA::mp, outOfOrderDataDelivery, Wavefront::outstandingReqs, Wavefront::outstandingReqsRdGm, Wavefront::outstandingReqsWrGm, WaitClass::rdy(), Shader::ScheduleAdd(), WaitClass::set(), ComputeUnit::shader, Wavefront::simdId, ComputeUnit::vrf, MipsISA::w, ComputeUnit::wfWait, and WRITE.

Referenced by ComputeUnit::exec().

◆ getGMLdRespFIFO()

std::queue<GPUDynInstPtr>& GlobalMemPipeline::getGMLdRespFIFO ( )
inline

◆ getGMStRespFIFO()

std::queue<GPUDynInstPtr>& GlobalMemPipeline::getGMStRespFIFO ( )
inline

Definition at line 63 of file global_memory_pipeline.hh.

References gmReturnedStores.

◆ getNextReadyResp()

GPUDynInstPtr GlobalMemPipeline::getNextReadyResp ( )

find the next ready response to service.

for OoO mode we simply pop the oldest (based on when the response was received) response in the response FIFOs. for in-order mode we pop the oldest (in program order) response, and only if it is marked as done.

Definition at line 179 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, gmReturnedLoads, gmReturnedStores, and outOfOrderDataDelivery.

Referenced by exec(), and getGMLdRespFIFO().

◆ handleResponse()

void GlobalMemPipeline::handleResponse ( GPUDynInstPtr  gpuDynInst)

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

in the case of in-order delivery it simply marks the reqeust as done in the ordered buffer to indicate that the requst is finished. for out-of-order data delivery, the requests are enqueued (in the order in which they are received) in the response FIFOs.

Definition at line 238 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, gmReturnedLoads, gmReturnedStores, isGMLdRespFIFOWrRdy(), isGMStRespFIFOWrRdy(), and outOfOrderDataDelivery.

Referenced by getGMLdRespFIFO(), and ComputeUnit::DataPort::processMemRespEvent().

◆ incLoadVRFBankConflictCycles()

void GlobalMemPipeline::incLoadVRFBankConflictCycles ( int  num_cycles)
inline

◆ init()

void GlobalMemPipeline::init ( ComputeUnit cu)

◆ isGMLdRespFIFOWrRdy()

bool GlobalMemPipeline::isGMLdRespFIFOWrRdy ( ) const
inline

Definition at line 98 of file global_memory_pipeline.hh.

References gmQueueSize, and gmReturnedLoads.

Referenced by handleResponse(), and ComputeUnit::isDone().

◆ isGMReqFIFOWrRdy()

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

Definition at line 110 of file global_memory_pipeline.hh.

References gmIssuedRequests, and gmQueueSize.

Referenced by ComputeUnit::isDone().

◆ isGMStRespFIFOWrRdy()

bool GlobalMemPipeline::isGMStRespFIFOWrRdy ( ) const
inline

Definition at line 104 of file global_memory_pipeline.hh.

References gmQueueSize, and gmReturnedStores.

Referenced by handleResponse(), and ComputeUnit::isDone().

◆ issueRequest()

void GlobalMemPipeline::issueRequest ( GPUDynInstPtr  gpuDynInst)

◆ name()

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

Definition at line 115 of file global_memory_pipeline.hh.

References _name, and regStats().

Referenced by regStats().

◆ regStats()

void GlobalMemPipeline::regStats ( )

Member Data Documentation

◆ _name

std::string GlobalMemPipeline::_name
private

Definition at line 128 of file global_memory_pipeline.hh.

Referenced by init(), and name().

◆ computeUnit

ComputeUnit* GlobalMemPipeline::computeUnit
private

Definition at line 127 of file global_memory_pipeline.hh.

Referenced by exec(), and init().

◆ globalMemSize

int GlobalMemPipeline::globalMemSize
private

Definition at line 143 of file global_memory_pipeline.hh.

Referenced by init().

◆ gmIssuedRequests

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

Definition at line 163 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 159 of file global_memory_pipeline.hh.

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

◆ gmQueueSize

int GlobalMemPipeline::gmQueueSize
private

◆ gmReturnedLoads

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

◆ gmReturnedStores

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

◆ inflightLoads

int GlobalMemPipeline::inflightLoads
private

Definition at line 140 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ inflightStores

int GlobalMemPipeline::inflightStores
private

Definition at line 139 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

◆ loadVrfBankConflictCycles

Stats::Scalar GlobalMemPipeline::loadVrfBankConflictCycles
private

Definition at line 135 of file global_memory_pipeline.hh.

Referenced by incLoadVRFBankConflictCycles(), and regStats().

◆ outOfOrderDataDelivery

bool GlobalMemPipeline::outOfOrderDataDelivery
private

Definition at line 130 of file global_memory_pipeline.hh.

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


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

Generated on Mon Jun 8 2020 15:45:23 for gem5 by doxygen 1.8.13