gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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)
 

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 58 of file global_memory_pipeline.hh.

Constructor & Destructor Documentation

GlobalMemPipeline::GlobalMemPipeline ( const ComputeUnitParams *  params)

Definition at line 46 of file global_memory_pipeline.cc.

Member Function Documentation

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 175 of file global_memory_pipeline.cc.

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

Referenced by 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 62 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().

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

Definition at line 66 of file global_memory_pipeline.hh.

References gmReturnedLoads.

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

Definition at line 65 of file global_memory_pipeline.hh.

References gmReturnedStores.

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 153 of file global_memory_pipeline.cc.

References gmOrderedRespBuffer, gmReturnedLoads, gmReturnedStores, and outOfOrderDataDelivery.

Referenced by exec().

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 212 of file global_memory_pipeline.cc.

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

Referenced by ComputeUnit::DataPort::MemRespEvent::process().

void GlobalMemPipeline::incLoadVRFBankConflictCycles ( int  num_cycles)
inline

Definition at line 121 of file global_memory_pipeline.hh.

References loadVrfBankConflictCycles.

void GlobalMemPipeline::init ( ComputeUnit cu)
bool GlobalMemPipeline::isGMLdRespFIFOWrRdy ( ) const
inline

Definition at line 100 of file global_memory_pipeline.hh.

References gmQueueSize, and gmReturnedLoads.

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

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

Definition at line 112 of file global_memory_pipeline.hh.

References gmIssuedRequests, and gmQueueSize.

Referenced by ComputeUnit::isDone().

bool GlobalMemPipeline::isGMStRespFIFOWrRdy ( ) const
inline

Definition at line 106 of file global_memory_pipeline.hh.

References gmQueueSize, and gmReturnedStores.

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

void GlobalMemPipeline::issueRequest ( GPUDynInstPtr  gpuDynInst)
const std::string& GlobalMemPipeline::name ( ) const
inline

Definition at line 117 of file global_memory_pipeline.hh.

References _name.

Referenced by regStats().

void GlobalMemPipeline::regStats ( )

Member Data Documentation

std::string GlobalMemPipeline::_name
private

Definition at line 128 of file global_memory_pipeline.hh.

Referenced by init(), and name().

ComputeUnit* GlobalMemPipeline::computeUnit
private

Definition at line 127 of file global_memory_pipeline.hh.

Referenced by exec(), and init().

int GlobalMemPipeline::globalMemSize
private

Definition at line 143 of file global_memory_pipeline.hh.

Referenced by init().

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

Definition at line 163 of file global_memory_pipeline.hh.

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

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().

int GlobalMemPipeline::gmQueueSize
private
std::queue<GPUDynInstPtr> GlobalMemPipeline::gmReturnedLoads
private
std::queue<GPUDynInstPtr> GlobalMemPipeline::gmReturnedStores
private
int GlobalMemPipeline::inflightLoads
private

Definition at line 140 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

int GlobalMemPipeline::inflightStores
private

Definition at line 139 of file global_memory_pipeline.hh.

Referenced by completeRequest(), and exec().

Stats::Scalar GlobalMemPipeline::loadVrfBankConflictCycles
private

Definition at line 135 of file global_memory_pipeline.hh.

Referenced by incLoadVRFBankConflictCycles(), and regStats().

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 Fri Jun 9 2017 13:04:11 for gem5 by doxygen 1.8.6