vdst.write();
+ wf->decLGKMInstsIssued();
wf->rdLmReqsInPipe--;
wf->validateRequestCounters();
} // execute
vdst.write();
+ wf->decLGKMInstsIssued();
wf->rdLmReqsInPipe--;
wf->validateRequestCounters();
} // execute
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->rdGmReqsInPipe--;
wf->rdLmReqsInPipe--;
}
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->wrLmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->rdGmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->rdGmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->rdGmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->rdGmReqsInPipe--;
return;
Wavefront *wf = gpuDynInst->wavefront();
if (wf->execMask().none()) {
+ wf->decVMemInstsIssued();
+ wf->decLGKMInstsIssued();
wf->wrGmReqsInPipe--;
wf->rdGmReqsInPipe--;
return;
DPRINTF(GPUMem, "CU%d: WF[%d][%d]: Completing global mem instr %s\n",
m->cu_id, m->simdId, m->wfSlotId, m->disassemble());
m->completeAcc(m);
+ w->decVMemInstsIssued();
if (m->isLoad() || m->isAtomicRet()) {
w->computeUnit->vrf[w->simdId]->
if (executedAs() == Enums::SC_GLOBAL) {
// no transormation for global segment
wavefront()->execUnitId = wavefront()->flatGmUnitId;
+ wavefront()->decLGKMInstsIssued();
if (isLoad()) {
wavefront()->rdLmReqsInPipe--;
} else if (isStore()) {
}
}
wavefront()->execUnitId = wavefront()->flatLmUnitId;
+ wavefront()->decVMemInstsIssued();
if (isLoad()) {
wavefront()->rdGmReqsInPipe--;
} else if (isStore()) {
}
}
wavefront()->execUnitId = wavefront()->flatLmUnitId;
+ wavefront()->decLGKMInstsIssued();
if (isLoad()) {
wavefront()->rdGmReqsInPipe--;
} else if (isStore()) {
DPRINTF(GPUMem, "CU%d: WF[%d][%d]: Completing local mem instr %s\n",
m->cu_id, m->simdId, m->wfSlotId, m->disassemble());
m->completeAcc(m);
+ w->decLGKMInstsIssued();
if (m->isLoad() || m->isAtomicRet()) {
w->computeUnit->vrf[w->simdId]->
}
m->completeAcc(m);
+ w->decLGKMInstsIssued();
if (m->isLoad() || m->isAtomic()) {
returnedLoads.pop();
// this wave spends in SCH stage.
wf->schCycles++;
addToSchListStalls[j]++;
+ } else {
+ if (gpu_dyn_inst->isScalar() || gpu_dyn_inst->isGroupSeg()) {
+ wf->incLGKMInstsIssued();
+ } else {
+ wf->incVMemInstsIssued();
+ if (gpu_dyn_inst->isFlat()) {
+ wf->incLGKMInstsIssued();
+ }
+ }
}
}
: SimObject(p), wfSlotId(p->wf_slot_id), simdId(p->simdId),
maxIbSize(p->max_ib_size), _gpuISA(*this),
vmWaitCnt(-1), expWaitCnt(-1), lgkmWaitCnt(-1),
+ vmemInstsIssued(0), expInstsIssued(0), lgkmInstsIssued(0),
barId(WFBarrier::InvalidID)
{
lastTrace = 0;
return false;
}
- // If we reach here, that means waitCnt instruction is executed and
- // the waitcnts are set by the execute method. Check if waitcnts are
- // satisfied.
-
- // current number of vector memory ops in flight
- int vm_cnt = outstandingReqsWrGm + outstandingReqsRdGm;
-
- // current number of export insts or vector memory writes in flight
- int exp_cnt = outstandingReqsWrGm;
-
- // current number of scalar/LDS memory ops in flight
- // we do not consider GDS/message ops
- int lgkm_cnt = outstandingReqsWrLm + outstandingReqsRdLm +
- scalarOutstandingReqsRdGm + scalarOutstandingReqsWrGm;
-
+ /**
+ * If we reach here, that means an s_waitcnt instruction was executed
+ * and the waitcnts are set by the execute method. Check if waitcnts
+ * are satisfied.
+ */
if (vmWaitCnt != -1) {
- if (vm_cnt > vmWaitCnt) {
+ if (vmemInstsIssued > vmWaitCnt) {
// vmWaitCnt not satisfied
return false;
}
}
if (expWaitCnt != -1) {
- if (exp_cnt > expWaitCnt) {
+ if (expInstsIssued > expWaitCnt) {
// expWaitCnt not satisfied
return false;
}
}
if (lgkmWaitCnt != -1) {
- if (lgkm_cnt > lgkmWaitCnt) {
+ if (lgkmInstsIssued > lgkmWaitCnt) {
// lgkmWaitCnt not satisfied
return false;
}
status = S_RUNNING;
}
+void
+Wavefront::incVMemInstsIssued()
+{
+ ++vmemInstsIssued;
+}
+
+void
+Wavefront::incExpInstsIssued()
+{
+ ++expInstsIssued;
+}
+
+void
+Wavefront::incLGKMInstsIssued()
+{
+ ++lgkmInstsIssued;
+}
+
+void
+Wavefront::decVMemInstsIssued()
+{
+ --vmemInstsIssued;
+}
+
+void
+Wavefront::decExpInstsIssued()
+{
+ --expInstsIssued;
+}
+
+void
+Wavefront::decLGKMInstsIssued()
+{
+ --lgkmInstsIssued;
+}
+
Addr
Wavefront::pc() const
{
void setWaitCnts(int vm_wait_cnt, int exp_wait_cnt, int lgkm_wait_cnt);
void clearWaitCnts();
+ void incVMemInstsIssued();
+ void incExpInstsIssued();
+ void incLGKMInstsIssued();
+ void decVMemInstsIssued();
+ void decExpInstsIssued();
+ void decLGKMInstsIssued();
+
/** Freeing VRF space */
void freeRegisterFile();
int vmWaitCnt;
int expWaitCnt;
int lgkmWaitCnt;
+ int vmemInstsIssued;
+ int expInstsIssued;
+ int lgkmInstsIssued;
status_e status;
Addr _pc;
VectorMask _execMask;