gem5 v24.0.0.0
|
#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 | |
ComputeUnit & | computeUnit |
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< GPUDynInstPtr > | gmIssuedRequests |
Definition at line 59 of file global_memory_pipeline.hh.
gem5::GlobalMemPipeline::GlobalMemPipeline | ( | const ComputeUnitParams & | p, |
ComputeUnit & | cu ) |
Definition at line 47 of file global_memory_pipeline.cc.
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().
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().
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().
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().
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().
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().
|
inline |
Definition at line 102 of file global_memory_pipeline.hh.
References gem5::GlobalMemPipeline::GlobalMemPipelineStats::loadVrfBankConflictCycles, and stats.
void gem5::GlobalMemPipeline::init | ( | ) |
Definition at line 57 of file global_memory_pipeline.cc.
References computeUnit, globalMemSize, gem5::Shader::globalMemSize, and gem5::ComputeUnit::shader.
Referenced by gem5::ComputeUnit::init().
|
inline |
Definition at line 95 of file global_memory_pipeline.hh.
References gmIssuedRequests, and gmQueueSize.
Referenced by gem5::ComputeUnit::isDone().
void gem5::GlobalMemPipeline::issueRequest | ( | GPUDynInstPtr | gpuDynInst | ) |
Issues a request to the pipeline (i.e., enqueue it in the request buffer).
Definition at line 279 of file global_memory_pipeline.cc.
References gem5::curTick(), gmIssuedRequests, gem5::Initiate, gem5::Wavefront::outstandingReqs, gem5::Wavefront::outstandingReqsRdGm, gem5::Wavefront::outstandingReqsWrGm, gem5::Wavefront::rdGmReqsInPipe, gem5::Wavefront::validateRequestCounters(), and gem5::Wavefront::wrGmReqsInPipe.
|
inline |
Definition at line 100 of file global_memory_pipeline.hh.
References _name.
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().
|
private |
Definition at line 114 of file global_memory_pipeline.hh.
Referenced by name().
|
private |
Definition at line 113 of file global_memory_pipeline.hh.
|
private |
Definition at line 125 of file global_memory_pipeline.hh.
Referenced by init().
|
private |
Definition at line 144 of file global_memory_pipeline.hh.
Referenced by exec(), isGMReqFIFOWrRdy(), and issueRequest().
|
private |
Definition at line 140 of file global_memory_pipeline.hh.
Referenced by completeRequest(), exec(), getNextReadyResp(), and handleResponse().
|
private |
Definition at line 115 of file global_memory_pipeline.hh.
Referenced by exec(), and isGMReqFIFOWrRdy().
|
private |
Definition at line 122 of file global_memory_pipeline.hh.
Referenced by completeRequest(), and exec().
|
private |
Definition at line 121 of file global_memory_pipeline.hh.
Referenced by completeRequest(), and exec().
|
private |
Definition at line 116 of file global_memory_pipeline.hh.
Referenced by outstandingReqsCheck().
|
protected |
Referenced by incLoadVRFBankConflictCycles().