gem5
v20.1.0.0
|
#include <global_memory_pipeline.hh>
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 | regStats () |
void | incLoadVRFBankConflictCycles (int num_cycles) |
bool | coalescerReady (GPUDynInstPtr mp) const |
bool | outstandingReqsCheck (GPUDynInstPtr mp) const |
void | acqCoalescerToken (GPUDynInstPtr mp) |
Private Attributes | |
ComputeUnit & | computeUnit |
const std::string | _name |
int | gmQueueSize |
int | maxWaveRequests |
Stats::Scalar | loadVrfBankConflictCycles |
int | inflightStores |
int | inflightLoads |
int | globalMemSize |
std::map< uint64_t, std::pair< GPUDynInstPtr, bool > > | gmOrderedRespBuffer |
std::queue< GPUDynInstPtr > | gmIssuedRequests |
Definition at line 56 of file global_memory_pipeline.hh.
GlobalMemPipeline::GlobalMemPipeline | ( | const ComputeUnitParams * | p, |
ComputeUnit & | cu | ||
) |
Definition at line 46 of file global_memory_pipeline.cc.
void GlobalMemPipeline::acqCoalescerToken | ( | GPUDynInstPtr | mp | ) |
Definition at line 81 of file global_memory_pipeline.cc.
References DPRINTF, and ArmISA::mp.
Referenced by ScheduleStage::fillDispatchList().
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().
void GlobalMemPipeline::completeRequest | ( | GPUDynInstPtr | gpuDynInst | ) |
once a memory request is finished we remove it from the buffer.
Definition at line 246 of file global_memory_pipeline.cc.
References gmOrderedRespBuffer, inflightLoads, and inflightStores.
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.
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().
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 232 of file global_memory_pipeline.cc.
References gmOrderedRespBuffer.
Referenced by exec().
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 275 of file global_memory_pipeline.cc.
References gmOrderedRespBuffer.
Referenced by exec(), ComputeUnit::DataPort::processMemRespEvent(), and ComputeUnit::DataPort::recvTimingResp().
|
inline |
Definition at line 100 of file global_memory_pipeline.hh.
References loadVrfBankConflictCycles.
void GlobalMemPipeline::init | ( | ) |
Definition at line 56 of file global_memory_pipeline.cc.
References computeUnit, globalMemSize, Shader::globalMemSize, and ComputeUnit::shader.
Referenced by ComputeUnit::init().
|
inline |
Definition at line 92 of file global_memory_pipeline.hh.
References gmIssuedRequests, and gmQueueSize.
Referenced by ComputeUnit::isDone().
void GlobalMemPipeline::issueRequest | ( | GPUDynInstPtr | gpuDynInst | ) |
Issues a request to the pipeline (i.e., enqueue it in the request buffer).
Definition at line 267 of file global_memory_pipeline.cc.
References curTick(), gmIssuedRequests, and Initiate.
|
inline |
Definition at line 97 of file global_memory_pipeline.hh.
References _name.
Referenced by regStats().
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().
void GlobalMemPipeline::regStats | ( | ) |
Definition at line 286 of file global_memory_pipeline.cc.
References Stats::DataWrap< Derived, InfoProxyType >::desc(), loadVrfBankConflictCycles, name(), and Stats::DataWrap< Derived, InfoProxyType >::name().
Referenced by ComputeUnit::regStats().
|
private |
Definition at line 112 of file global_memory_pipeline.hh.
Referenced by name().
|
private |
Definition at line 111 of file global_memory_pipeline.hh.
|
private |
Definition at line 127 of file global_memory_pipeline.hh.
Referenced by init().
|
private |
Definition at line 146 of file global_memory_pipeline.hh.
Referenced by exec(), isGMReqFIFOWrRdy(), and issueRequest().
|
private |
Definition at line 142 of file global_memory_pipeline.hh.
Referenced by completeRequest(), exec(), getNextReadyResp(), and handleResponse().
|
private |
Definition at line 113 of file global_memory_pipeline.hh.
Referenced by exec(), and isGMReqFIFOWrRdy().
|
private |
Definition at line 124 of file global_memory_pipeline.hh.
Referenced by completeRequest(), and exec().
|
private |
Definition at line 123 of file global_memory_pipeline.hh.
Referenced by completeRequest(), and exec().
|
private |
Definition at line 119 of file global_memory_pipeline.hh.
Referenced by incLoadVRFBankConflictCycles(), and regStats().
|
private |
Definition at line 114 of file global_memory_pipeline.hh.
Referenced by outstandingReqsCheck().