34#include "debug/GPUMem.hh"
35#include "debug/GPUReg.hh"
62 bool accessSrf =
true;
65 if ((
m) && (
m->isLoad() ||
m->isAtomicRet())) {
69 w->computeUnit->srf[
w->simdId]->
70 canScheduleWriteOperandsFromLoad(
w,
m);
74 m->latency.rdy() &&
computeUnit.scalarMemToSrfBus.rdy() &&
81 if (
m->isLoad() ||
m->isAtomicRet()) {
82 w->computeUnit->srf[
w->simdId]->
83 scheduleWriteOperandsFromLoad(
w,
m);
87 w->decLGKMInstsIssued();
88 w->untrackLGKMInst(
m);
90 if (
m->isLoad() ||
m->isAtomic()) {
101 computeUnit.shader->ScheduleAdd(&
w->outstandingReqs,
m->time, -1);
103 if (
m->isStore() ||
m->isAtomic()) {
104 computeUnit.shader->ScheduleAdd(&
w->scalarOutstandingReqsWrGm,
108 if (
m->isLoad() ||
m->isAtomic()) {
109 computeUnit.shader->ScheduleAdd(&
w->scalarOutstandingReqsRdGm,
116 w->computeUnit->scalarMemUnit.set(
m->time);
124 if (
mp->isLoad() ||
mp->isAtomic()) {
141 DPRINTF(GPUMem,
"CU%d: WF[%d][%d] Popping scalar mem_op\n",
150 if (gpuDynInst->isLoad()) {
153 }
else if (gpuDynInst->isStore()) {
169 assert(gpuDynInst->isScalar());
172 req = std::make_shared<Request>(
173 0, 0, 0,
computeUnit.requestorId(), 0, gpuDynInst->wfDynId);
191 req->setReqInstSeqNum(gpuDynInst->seqNum());
196 gpuDynInst->wavefront(),
nullptr));
198 gpuDynInst->setRequestFlags(req);
200 req->setReqInstSeqNum(gpuDynInst->seqNum());
205 gpuDynInst->wavefront(),
nullptr));
223 scalar_req->setReqInstSeqNum(gpuDynInst->seqNum());
230 gpuDynInst->setRequestFlags(scalar_req);
232 scalar_req->setReqInstSeqNum(gpuDynInst->seqNum());
250 std::cout <<
"Scalar issued: " <<
issuedRequests.size() <<
" returned: "
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
@ KERNEL
The request should be marked with KERNEL.
const std::string & name() const
void injectScalarMemFence(GPUDynInstPtr gpuDynInst, bool kernelMemSync, RequestPtr req)
std::queue< GPUDynInstPtr > returnedLoads
ComputeUnit & computeUnit
ScalarMemPipeline(const ComputeUnitParams &p, ComputeUnit &cu)
std::queue< GPUDynInstPtr > issuedRequests
std::queue< GPUDynInstPtr > returnedStores
void issueRequest(GPUDynInstPtr gpuDynInst)
void validateRequestCounters()
int scalarOutstandingReqsWrGm
int scalarOutstandingReqsRdGm
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< Request > RequestPtr
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Tick curTick()
The universal simulation clock.