34#include "debug/GPUMem.hh"
35#include "debug/GPUReg.hh"
47 : computeUnit(cu), _name(cu.
name() +
".ScalarMemPipeline"),
48 queueSize(
p.scalar_mem_queue_size),
49 inflightStores(0), inflightLoads(0)
62 bool accessSrf =
true;
65 if ((
m) && (
m->isLoad() ||
m->isAtomicRet())) {
70 canScheduleWriteOperandsFromLoad(
w,
m);
81 if (
m->isLoad() ||
m->isAtomicRet()) {
82 w->computeUnit->srf[
w->simdId]->
83 scheduleWriteOperandsFromLoad(
w,
m);
87 w->decLGKMInstsIssued();
89 if (
m->isLoad() ||
m->isAtomic()) {
102 if (
m->isStore() ||
m->isAtomic()) {
107 if (
m->isLoad() ||
m->isAtomic()) {
115 w->computeUnit->scalarMemUnit.set(
m->time);
123 if (
mp->isLoad() ||
mp->isAtomic()) {
140 DPRINTF(GPUMem,
"CU%d: WF[%d][%d] Popping scalar mem_op\n",
149 if (gpuDynInst->isLoad()) {
152 }
else if (gpuDynInst->isStore()) {
168 assert(gpuDynInst->isScalar());
171 req = std::make_shared<Request>(
190 req->setReqInstSeqNum(gpuDynInst->seqNum());
195 gpuDynInst->wavefront(),
nullptr));
197 gpuDynInst->setRequestFlags(req);
199 req->setReqInstSeqNum(gpuDynInst->seqNum());
204 gpuDynInst->wavefront(),
nullptr));
222 scalar_req->setReqInstSeqNum(gpuDynInst->seqNum());
229 gpuDynInst->setRequestFlags(scalar_req);
231 scalar_req->setReqInstSeqNum(gpuDynInst->seqNum());
WaitClass scalarMemToSrfBus
Tick scalar_req_tick_latency
std::vector< ScalarRegisterFile * > srf
ScalarDataPort scalarDataPort
RequestorID requestorId()
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.
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 ScheduleAdd(int *val, Tick when, int x)
bool rdy(Cycles cycles=Cycles(0)) const
void validateRequestCounters()
int scalarOutstandingReqsWrGm
ComputeUnit * computeUnit
int scalarOutstandingReqsRdGm
void schedule(Event &event, Tick when)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< Request > RequestPtr
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Tick curTick()
The universal simulation clock.
const std::string & name()