summaryrefslogtreecommitdiff
path: root/src/gpu-compute
diff options
context:
space:
mode:
authorAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:26:52 -0400
committerAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:26:52 -0400
commit589e13a23b3969c1137d2170a8638356d0c0fc65 (patch)
tree3ccfcde3173d9d3c234e0fa9ce130931786981eb /src/gpu-compute
parente9fe1b838b94eb46f165b9adb6281a862b172dfe (diff)
downloadgem5-589e13a23b3969c1137d2170a8638356d0c0fc65.tar.xz
gpu-compute: Wavefront refactoring
Renaming members of the Wavefront class in accordance with the style guide.
Diffstat (limited to 'src/gpu-compute')
-rw-r--r--src/gpu-compute/compute_unit.cc72
-rw-r--r--src/gpu-compute/dispatcher.cc2
-rw-r--r--src/gpu-compute/fetch_unit.cc2
-rw-r--r--src/gpu-compute/global_memory_pipeline.cc6
-rw-r--r--src/gpu-compute/local_memory_pipeline.cc6
-rw-r--r--src/gpu-compute/wavefront.cc132
-rw-r--r--src/gpu-compute/wavefront.hh80
7 files changed, 150 insertions, 150 deletions
diff --git a/src/gpu-compute/compute_unit.cc b/src/gpu-compute/compute_unit.cc
index 83e2414db..32fa3bd6a 100644
--- a/src/gpu-compute/compute_unit.cc
+++ b/src/gpu-compute/compute_unit.cc
@@ -178,13 +178,13 @@ ComputeUnit::FillKernelState(Wavefront *w, NDRange *ndr)
{
w->resizeRegFiles(ndr->q.cRegCount, ndr->q.sRegCount, ndr->q.dRegCount);
- w->workgroupsz[0] = ndr->q.wgSize[0];
- w->workgroupsz[1] = ndr->q.wgSize[1];
- w->workgroupsz[2] = ndr->q.wgSize[2];
- w->wg_sz = w->workgroupsz[0] * w->workgroupsz[1] * w->workgroupsz[2];
- w->gridsz[0] = ndr->q.gdSize[0];
- w->gridsz[1] = ndr->q.gdSize[1];
- w->gridsz[2] = ndr->q.gdSize[2];
+ w->workGroupSz[0] = ndr->q.wgSize[0];
+ w->workGroupSz[1] = ndr->q.wgSize[1];
+ w->workGroupSz[2] = ndr->q.wgSize[2];
+ w->wgSz = w->workGroupSz[0] * w->workGroupSz[1] * w->workGroupSz[2];
+ w->gridSz[0] = ndr->q.gdSize[0];
+ w->gridSz[1] = ndr->q.gdSize[1];
+ w->gridSz[2] = ndr->q.gdSize[2];
w->kernelArgs = ndr->q.args;
w->privSizePerItem = ndr->q.privMemPerItem;
w->spillSizePerItem = ndr->q.spillMemPerItem;
@@ -236,29 +236,29 @@ ComputeUnit::StartWF(Wavefront *w, int trueWgSize[], int trueWgSizeTotal,
init_mask[k] = 1;
}
- w->kern_id = ndr->dispatchId;
- w->dynwaveid = cnt;
- w->init_mask = init_mask.to_ullong();
+ w->kernId = ndr->dispatchId;
+ w->dynWaveId = cnt;
+ w->initMask = init_mask.to_ullong();
for (int k = 0; k < wfSize(); ++k) {
- w->workitemid[0][k] = (k+cnt*wfSize()) % trueWgSize[0];
- w->workitemid[1][k] =
+ w->workItemId[0][k] = (k+cnt*wfSize()) % trueWgSize[0];
+ w->workItemId[1][k] =
((k + cnt * wfSize()) / trueWgSize[0]) % trueWgSize[1];
- w->workitemid[2][k] =
+ w->workItemId[2][k] =
(k + cnt * wfSize()) / (trueWgSize[0] * trueWgSize[1]);
- w->workitemFlatId[k] = w->workitemid[2][k] * trueWgSize[0] *
- trueWgSize[1] + w->workitemid[1][k] * trueWgSize[0] +
- w->workitemid[0][k];
+ w->workItemFlatId[k] = w->workItemId[2][k] * trueWgSize[0] *
+ trueWgSize[1] + w->workItemId[1][k] * trueWgSize[0] +
+ w->workItemId[0][k];
}
- w->barrier_slots = divCeil(trueWgSizeTotal, wfSize());
+ w->barrierSlots = divCeil(trueWgSizeTotal, wfSize());
- w->bar_cnt.resize(wfSize(), 0);
+ w->barCnt.resize(wfSize(), 0);
- w->max_bar_cnt = 0;
- w->old_barrier_cnt = 0;
- w->barrier_cnt = 0;
+ w->maxBarCnt = 0;
+ w->oldBarrierCnt = 0;
+ w->barrierCnt = 0;
w->privBase = ndr->q.privMemStart;
ndr->q.privMemStart += ndr->q.privMemPerItem * wfSize();
@@ -269,22 +269,22 @@ ComputeUnit::StartWF(Wavefront *w, int trueWgSize[], int trueWgSizeTotal,
w->pushToReconvergenceStack(0, UINT32_MAX, init_mask.to_ulong());
// WG state
- w->wg_id = ndr->globalWgId;
- w->dispatchid = ndr->dispatchId;
- w->workgroupid[0] = w->wg_id % ndr->numWg[0];
- w->workgroupid[1] = (w->wg_id / ndr->numWg[0]) % ndr->numWg[1];
- w->workgroupid[2] = w->wg_id / (ndr->numWg[0] * ndr->numWg[1]);
+ w->wgId = ndr->globalWgId;
+ w->dispatchId = ndr->dispatchId;
+ w->workGroupId[0] = w->wgId % ndr->numWg[0];
+ w->workGroupId[1] = (w->wgId / ndr->numWg[0]) % ndr->numWg[1];
+ w->workGroupId[2] = w->wgId / (ndr->numWg[0] * ndr->numWg[1]);
- w->barrier_id = barrier_id;
+ w->barrierId = barrier_id;
w->stalledAtBarrier = false;
// set the wavefront context to have a pointer to this section of the LDS
w->ldsChunk = ldsChunk;
int32_t refCount M5_VAR_USED =
- lds.increaseRefCounter(w->dispatchid, w->wg_id);
+ lds.increaseRefCounter(w->dispatchId, w->wgId);
DPRINTF(GPUDisp, "CU%d: increase ref ctr wg[%d] to [%d]\n",
- cu_id, w->wg_id, refCount);
+ cu_id, w->wgId, refCount);
w->instructionBuffer.clear();
@@ -468,15 +468,15 @@ ComputeUnit::AllAtBarrier(uint32_t _barrier_id, uint32_t bcnt, uint32_t bslots)
DPRINTF(GPUSync, "Checking WF[%d][%d]\n", i_simd, i_wf);
DPRINTF(GPUSync, "wf->barrier_id = %d, _barrier_id = %d\n",
- w->barrier_id, _barrier_id);
+ w->barrierId, _barrier_id);
DPRINTF(GPUSync, "wf->barrier_cnt %d, bcnt = %d\n",
- w->barrier_cnt, bcnt);
+ w->barrierCnt, bcnt);
}
if (w->status == Wavefront::S_RUNNING &&
- w->barrier_id == _barrier_id && w->barrier_cnt == bcnt &&
- !w->outstanding_reqs) {
+ w->barrierId == _barrier_id && w->barrierCnt == bcnt &&
+ !w->outstandingReqs) {
++ccnt;
DPRINTF(GPUSync, "WF[%d][%d] at barrier, increment ccnt to "
@@ -646,17 +646,17 @@ ComputeUnit::DataPort::recvTimingResp(PacketPtr pkt)
if (w->status == Wavefront::S_RETURNING) {
DPRINTF(GPUDisp, "CU%d: WF[%d][%d][wv=%d]: WG id completed %d\n",
computeUnit->cu_id, w->simdId, w->wfSlotId,
- w->wfDynId, w->kern_id);
+ w->wfDynId, w->kernId);
computeUnit->shader->dispatcher->notifyWgCompl(w);
w->status = Wavefront::S_STOPPED;
} else {
- w->outstanding_reqs--;
+ w->outstandingReqs--;
}
DPRINTF(GPUSync, "CU%d: WF[%d][%d]: barrier_cnt = %d\n",
computeUnit->cu_id, gpuDynInst->simdId,
- gpuDynInst->wfSlotId, w->barrier_cnt);
+ gpuDynInst->wfSlotId, w->barrierCnt);
if (gpuDynInst->useContinuation) {
assert(gpuDynInst->scope != Enums::MEMORY_SCOPE_NONE);
diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc
index d1d011c0d..adc1f51bd 100644
--- a/src/gpu-compute/dispatcher.cc
+++ b/src/gpu-compute/dispatcher.cc
@@ -305,7 +305,7 @@ GpuDispatcher::exec()
void
GpuDispatcher::notifyWgCompl(Wavefront *w)
{
- int kern_id = w->kern_id;
+ int kern_id = w->kernId;
DPRINTF(GPUDisp, "notify WgCompl %d\n",kern_id);
assert(ndRangeMap[kern_id].dispatchId == kern_id);
ndRangeMap[kern_id].numWgCompleted++;
diff --git a/src/gpu-compute/fetch_unit.cc b/src/gpu-compute/fetch_unit.cc
index 1f0a7d78e..9104c400e 100644
--- a/src/gpu-compute/fetch_unit.cc
+++ b/src/gpu-compute/fetch_unit.cc
@@ -115,7 +115,7 @@ FetchUnit::initiateFetch(Wavefront *wavefront)
{
// calculate the virtual address to fetch from the SQC
Addr vaddr = wavefront->pc() + wavefront->instructionBuffer.size();
- vaddr = wavefront->base_ptr + vaddr * sizeof(GPUStaticInst*);
+ vaddr = wavefront->basePtr + vaddr * sizeof(GPUStaticInst*);
DPRINTF(GPUTLB, "CU%d: WF[%d][%d]: Initiating fetch translation: %#x\n",
computeUnit->cu_id, wavefront->simdId, wavefront->wfSlotId, vaddr);
diff --git a/src/gpu-compute/global_memory_pipeline.cc b/src/gpu-compute/global_memory_pipeline.cc
index a6a4d86db..102905ec8 100644
--- a/src/gpu-compute/global_memory_pipeline.cc
+++ b/src/gpu-compute/global_memory_pipeline.cc
@@ -212,16 +212,16 @@ GlobalMemPipeline::doGmReturn(GPUDynInstPtr m)
}
// Decrement outstanding register count
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs, m->time, -1);
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqs, m->time, -1);
if (m->m_op == Enums::MO_ST || MO_A(m->m_op) || MO_ANR(m->m_op) ||
MO_H(m->m_op)) {
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs_wr_gm, m->time,
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqsWrGm, m->time,
-1);
}
if (m->m_op == Enums::MO_LD || MO_A(m->m_op) || MO_ANR(m->m_op)) {
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs_rd_gm, m->time,
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqsRdGm, m->time,
-1);
}
diff --git a/src/gpu-compute/local_memory_pipeline.cc b/src/gpu-compute/local_memory_pipeline.cc
index a970d8f9b..e2238bf45 100644
--- a/src/gpu-compute/local_memory_pipeline.cc
+++ b/src/gpu-compute/local_memory_pipeline.cc
@@ -170,16 +170,16 @@ LocalMemPipeline::doSmReturn(GPUDynInstPtr m)
}
// Decrement outstanding request count
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs, m->time, -1);
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqs, m->time, -1);
if (m->m_op == Enums::MO_ST || MO_A(m->m_op) || MO_ANR(m->m_op)
|| MO_H(m->m_op)) {
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs_wr_lm,
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqsWrLm,
m->time, -1);
}
if (m->m_op == Enums::MO_LD || MO_A(m->m_op) || MO_ANR(m->m_op)) {
- computeUnit->shader->ScheduleAdd(&w->outstanding_reqs_rd_lm,
+ computeUnit->shader->ScheduleAdd(&w->outstandingReqsRdLm,
m->time, -1);
}
diff --git a/src/gpu-compute/wavefront.cc b/src/gpu-compute/wavefront.cc
index a20330082..c73307ac4 100644
--- a/src/gpu-compute/wavefront.cc
+++ b/src/gpu-compute/wavefront.cc
@@ -52,43 +52,43 @@ WavefrontParams::create()
Wavefront::Wavefront(const Params *p)
: SimObject(p), callArgMem(nullptr)
{
- last_trace = 0;
+ lastTrace = 0;
simdId = p->simdId;
wfSlotId = p->wf_slot_id;
status = S_STOPPED;
reservedVectorRegs = 0;
startVgprIndex = 0;
- outstanding_reqs = 0;
- mem_reqs_in_pipe = 0;
- outstanding_reqs_wr_gm = 0;
- outstanding_reqs_wr_lm = 0;
- outstanding_reqs_rd_gm = 0;
- outstanding_reqs_rd_lm = 0;
- rd_lm_reqs_in_pipe = 0;
- rd_gm_reqs_in_pipe = 0;
- wr_lm_reqs_in_pipe = 0;
- wr_gm_reqs_in_pipe = 0;
-
- barrier_cnt = 0;
- old_barrier_cnt = 0;
+ outstandingReqs = 0;
+ memReqsInPipe = 0;
+ outstandingReqsWrGm = 0;
+ outstandingReqsWrLm = 0;
+ outstandingReqsRdGm = 0;
+ outstandingReqsRdLm = 0;
+ rdLmReqsInPipe = 0;
+ rdGmReqsInPipe = 0;
+ wrLmReqsInPipe = 0;
+ wrGmReqsInPipe = 0;
+
+ barrierCnt = 0;
+ oldBarrierCnt = 0;
stalledAtBarrier = false;
- mem_trace_busy = 0;
- old_vgpr_tcnt = 0xffffffffffffffffll;
- old_dgpr_tcnt = 0xffffffffffffffffll;
- old_vgpr.resize(p->wfSize);
+ memTraceBusy = 0;
+ oldVgprTcnt = 0xffffffffffffffffll;
+ oldDgprTcnt = 0xffffffffffffffffll;
+ oldVgpr.resize(p->wfSize);
pendingFetch = false;
dropFetch = false;
condRegState = new ConditionRegisterState();
maxSpVgprs = 0;
maxDpVgprs = 0;
- last_addr.resize(p->wfSize);
- workitemFlatId.resize(p->wfSize);
- old_dgpr.resize(p->wfSize);
- bar_cnt.resize(p->wfSize);
+ lastAddr.resize(p->wfSize);
+ workItemFlatId.resize(p->wfSize);
+ oldDgpr.resize(p->wfSize);
+ barCnt.resize(p->wfSize);
for (int i = 0; i < 3; ++i) {
- workitemid[i].resize(p->wfSize);
+ workItemId[i].resize(p->wfSize);
}
}
@@ -158,7 +158,7 @@ void
Wavefront::start(uint64_t _wfDynId,uint64_t _base_ptr)
{
wfDynId = _wfDynId;
- base_ptr = _base_ptr;
+ basePtr = _base_ptr;
status = S_RUNNING;
}
@@ -333,12 +333,12 @@ Wavefront::ready(itype_e type)
// Is the wave waiting at a barrier
if (stalledAtBarrier) {
- if (!computeUnit->AllAtBarrier(barrier_id,barrier_cnt,
- computeUnit->getRefCounter(dispatchid, wg_id))) {
+ if (!computeUnit->AllAtBarrier(barrierId,barrierCnt,
+ computeUnit->getRefCounter(dispatchId, wgId))) {
// Are all threads at barrier?
return 0;
}
- old_barrier_cnt = barrier_cnt;
+ oldBarrierCnt = barrierCnt;
stalledAtBarrier = false;
}
@@ -395,7 +395,7 @@ Wavefront::ready(itype_e type)
}
// Are there in pipe or outstanding memory requests?
- if ((outstanding_reqs + mem_reqs_in_pipe) > 0) {
+ if ((outstandingReqs + memReqsInPipe) > 0) {
return 0;
}
@@ -416,7 +416,7 @@ Wavefront::ready(itype_e type)
}
// Are there in pipe or outstanding memory requests?
- if ((outstanding_reqs + mem_reqs_in_pipe) > 0) {
+ if ((outstandingReqs + memReqsInPipe) > 0) {
return 0;
}
@@ -444,7 +444,7 @@ Wavefront::ready(itype_e type)
// Here Global memory instruction
if (IS_OT_READ_GM(ii->opType()) || IS_OT_ATOMIC_GM(ii->opType())) {
// Are there in pipe or outstanding global memory write requests?
- if ((outstanding_reqs_wr_gm + wr_gm_reqs_in_pipe) > 0) {
+ if ((outstandingReqsWrGm + wrGmReqsInPipe) > 0) {
return 0;
}
}
@@ -452,7 +452,7 @@ Wavefront::ready(itype_e type)
if (IS_OT_WRITE_GM(ii->opType()) || IS_OT_ATOMIC_GM(ii->opType()) ||
IS_OT_HIST_GM(ii->opType())) {
// Are there in pipe or outstanding global memory read requests?
- if ((outstanding_reqs_rd_gm + rd_gm_reqs_in_pipe) > 0)
+ if ((outstandingReqsRdGm + rdGmReqsInPipe) > 0)
return 0;
}
@@ -467,7 +467,7 @@ Wavefront::ready(itype_e type)
}
if (!computeUnit->globalMemoryPipe.
- isGMReqFIFOWrRdy(rd_gm_reqs_in_pipe + wr_gm_reqs_in_pipe)) {
+ isGMReqFIFOWrRdy(rdGmReqsInPipe + wrGmReqsInPipe)) {
// Can we insert a new request to the Global Mem Request FIFO?
return 0;
}
@@ -484,14 +484,14 @@ Wavefront::ready(itype_e type)
IS_OT_WRITE_LM(ii->opType()) || IS_OT_ATOMIC_LM(ii->opType()))) {
// Here for Shared memory instruction
if (IS_OT_READ_LM(ii->opType()) || IS_OT_ATOMIC_LM(ii->opType())) {
- if ((outstanding_reqs_wr_lm + wr_lm_reqs_in_pipe) > 0) {
+ if ((outstandingReqsWrLm + wrLmReqsInPipe) > 0) {
return 0;
}
}
if (IS_OT_WRITE_LM(ii->opType()) || IS_OT_ATOMIC_LM(ii->opType()) ||
IS_OT_HIST_LM(ii->opType())) {
- if ((outstanding_reqs_rd_lm + rd_lm_reqs_in_pipe) > 0) {
+ if ((outstandingReqsRdLm + rdLmReqsInPipe) > 0) {
return 0;
}
}
@@ -506,7 +506,7 @@ Wavefront::ready(itype_e type)
}
if (!computeUnit->localMemoryPipe.
- isLMReqFIFOWrRdy(rd_lm_reqs_in_pipe + wr_lm_reqs_in_pipe)) {
+ isLMReqFIFOWrRdy(rdLmReqsInPipe + wrLmReqsInPipe)) {
// Can we insert a new request to the LDS Request FIFO?
return 0;
}
@@ -523,14 +523,14 @@ Wavefront::ready(itype_e type)
IS_OT_WRITE_PM(ii->opType()) || IS_OT_ATOMIC_PM(ii->opType()))) {
// Here for Private memory instruction ------------------------ //
if (IS_OT_READ_PM(ii->opType()) || IS_OT_ATOMIC_PM(ii->opType())) {
- if ((outstanding_reqs_wr_gm + wr_gm_reqs_in_pipe) > 0) {
+ if ((outstandingReqsWrGm + wrGmReqsInPipe) > 0) {
return 0;
}
}
if (IS_OT_WRITE_PM(ii->opType()) || IS_OT_ATOMIC_PM(ii->opType()) ||
IS_OT_HIST_PM(ii->opType())) {
- if ((outstanding_reqs_rd_gm + rd_gm_reqs_in_pipe) > 0) {
+ if ((outstandingReqsRdGm + rdGmReqsInPipe) > 0) {
return 0;
}
}
@@ -546,7 +546,7 @@ Wavefront::ready(itype_e type)
}
if (!computeUnit->globalMemoryPipe.
- isGMReqFIFOWrRdy(rd_gm_reqs_in_pipe + wr_gm_reqs_in_pipe)) {
+ isGMReqFIFOWrRdy(rdGmReqsInPipe + wrGmReqsInPipe)) {
// Can we insert a new request to the Global Mem Request FIFO?
return 0;
}
@@ -579,13 +579,13 @@ Wavefront::ready(itype_e type)
return 0;
}
if (!computeUnit->globalMemoryPipe.
- isGMReqFIFOWrRdy(rd_gm_reqs_in_pipe + wr_gm_reqs_in_pipe)) {
+ isGMReqFIFOWrRdy(rdGmReqsInPipe + wrGmReqsInPipe)) {
// Can we insert a new request to the Global Mem Request FIFO?
return 0;
}
if (!computeUnit->localMemoryPipe.
- isLMReqFIFOWrRdy(rd_lm_reqs_in_pipe + wr_lm_reqs_in_pipe)) {
+ isLMReqFIFOWrRdy(rdLmReqsInPipe + wrLmReqsInPipe)) {
// Can we insert a new request to the LDS Request FIFO?
return 0;
}
@@ -636,8 +636,8 @@ Wavefront::updateResources()
ticks(computeUnit->issuePeriod));
} else if (ii->opType() == Enums::OT_FLAT_READ) {
assert(Enums::SC_NONE != ii->executedAs());
- mem_reqs_in_pipe++;
- rd_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ rdGmReqsInPipe++;
if ( Enums::SC_SHARED == ii->executedAs() ) {
computeUnit->vrfToLocalMemPipeBus[computeUnit->nextLocRdBus()].
preset(computeUnit->shader->ticks(4));
@@ -651,8 +651,8 @@ Wavefront::updateResources()
}
} else if (ii->opType() == Enums::OT_FLAT_WRITE) {
assert(Enums::SC_NONE != ii->executedAs());
- mem_reqs_in_pipe++;
- wr_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrGmReqsInPipe++;
if (Enums::SC_SHARED == ii->executedAs()) {
computeUnit->vrfToLocalMemPipeBus[computeUnit->nextLocRdBus()].
preset(computeUnit->shader->ticks(8));
@@ -665,67 +665,67 @@ Wavefront::updateResources()
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
}
} else if (IS_OT_READ_GM(ii->opType())) {
- mem_reqs_in_pipe++;
- rd_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ rdGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(4));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_WRITE_GM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_ATOMIC_GM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_gm_reqs_in_pipe++;
- rd_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrGmReqsInPipe++;
+ rdGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_READ_LM(ii->opType())) {
- mem_reqs_in_pipe++;
- rd_lm_reqs_in_pipe++;
+ memReqsInPipe++;
+ rdLmReqsInPipe++;
computeUnit->vrfToLocalMemPipeBus[computeUnit->nextLocRdBus()].
preset(computeUnit->shader->ticks(4));
computeUnit->wfWait[computeUnit->ShrMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_WRITE_LM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_lm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrLmReqsInPipe++;
computeUnit->vrfToLocalMemPipeBus[computeUnit->nextLocRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->ShrMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_ATOMIC_LM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_lm_reqs_in_pipe++;
- rd_lm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrLmReqsInPipe++;
+ rdLmReqsInPipe++;
computeUnit->vrfToLocalMemPipeBus[computeUnit->nextLocRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->ShrMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_READ_PM(ii->opType())) {
- mem_reqs_in_pipe++;
- rd_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ rdGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(4));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_WRITE_PM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
preset(computeUnit->shader->ticks(computeUnit->issuePeriod));
} else if (IS_OT_ATOMIC_PM(ii->opType())) {
- mem_reqs_in_pipe++;
- wr_gm_reqs_in_pipe++;
- rd_gm_reqs_in_pipe++;
+ memReqsInPipe++;
+ wrGmReqsInPipe++;
+ rdGmReqsInPipe++;
computeUnit->vrfToGlobalMemPipeBus[computeUnit->nextGlbRdBus()].
preset(computeUnit->shader->ticks(8));
computeUnit->wfWait[computeUnit->GlbMemUnitId()].
@@ -865,7 +865,7 @@ Wavefront::exec()
bool
Wavefront::waitingAtBarrier(int lane)
{
- return bar_cnt[lane] < max_bar_cnt;
+ return barCnt[lane] < maxBarCnt;
}
void
diff --git a/src/gpu-compute/wavefront.hh b/src/gpu-compute/wavefront.hh
index 5a5386a3d..db2e434a9 100644
--- a/src/gpu-compute/wavefront.hh
+++ b/src/gpu-compute/wavefront.hh
@@ -155,16 +155,16 @@ class Wavefront : public SimObject
enum status_e {S_STOPPED,S_RETURNING,S_RUNNING};
// Base pointer for array of instruction pointers
- uint64_t base_ptr;
+ uint64_t basePtr;
- uint32_t old_barrier_cnt;
- uint32_t barrier_cnt;
- uint32_t barrier_id;
- uint32_t barrier_slots;
+ uint32_t oldBarrierCnt;
+ uint32_t barrierCnt;
+ uint32_t barrierId;
+ uint32_t barrierSlots;
status_e status;
// HW slot id where the WF is mapped to inside a SIMD unit
int wfSlotId;
- int kern_id;
+ int kernId;
// SIMD unit where the WV has been scheduled
int simdId;
// pointer to parent CU
@@ -193,37 +193,37 @@ class Wavefront : public SimObject
bool isOldestInstALU();
bool isOldestInstBarrier();
// used for passing spill address to DDInstGPU
- std::vector<Addr> last_addr;
- std::vector<uint32_t> workitemid[3];
- std::vector<uint32_t> workitemFlatId;
- uint32_t workgroupid[3];
- uint32_t workgroupsz[3];
- uint32_t gridsz[3];
- uint32_t wg_id;
- uint32_t wg_sz;
- uint32_t dynwaveid;
- uint32_t maxdynwaveid;
- uint32_t dispatchid;
+ std::vector<Addr> lastAddr;
+ std::vector<uint32_t> workItemId[3];
+ std::vector<uint32_t> workItemFlatId;
+ uint32_t workGroupId[3];
+ uint32_t workGroupSz[3];
+ uint32_t gridSz[3];
+ uint32_t wgId;
+ uint32_t wgSz;
+ uint32_t dynWaveId;
+ uint32_t maxDynWaveId;
+ uint32_t dispatchId;
// outstanding global+local memory requests
- uint32_t outstanding_reqs;
+ uint32_t outstandingReqs;
// memory requests between scoreboard
// and execute stage not yet executed
- uint32_t mem_reqs_in_pipe;
+ uint32_t memReqsInPipe;
// outstanding global memory write requests
- uint32_t outstanding_reqs_wr_gm;
+ uint32_t outstandingReqsWrGm;
// outstanding local memory write requests
- uint32_t outstanding_reqs_wr_lm;
+ uint32_t outstandingReqsWrLm;
// outstanding global memory read requests
- uint32_t outstanding_reqs_rd_gm;
+ uint32_t outstandingReqsRdGm;
// outstanding local memory read requests
- uint32_t outstanding_reqs_rd_lm;
- uint32_t rd_lm_reqs_in_pipe;
- uint32_t rd_gm_reqs_in_pipe;
- uint32_t wr_lm_reqs_in_pipe;
- uint32_t wr_gm_reqs_in_pipe;
-
- int mem_trace_busy;
- uint64_t last_trace;
+ uint32_t outstandingReqsRdLm;
+ uint32_t rdLmReqsInPipe;
+ uint32_t rdGmReqsInPipe;
+ uint32_t wrLmReqsInPipe;
+ uint32_t wrGmReqsInPipe;
+
+ int memTraceBusy;
+ uint64_t lastTrace;
// number of vector registers reserved by WF
int reservedVectorRegs;
// Index into the Vector Register File's namespace where the WF's registers
@@ -231,25 +231,25 @@ class Wavefront : public SimObject
uint32_t startVgprIndex;
// Old value of destination gpr (for trace)
- std::vector<uint32_t> old_vgpr;
+ std::vector<uint32_t> oldVgpr;
// Id of destination gpr (for trace)
- uint32_t old_vgpr_id;
+ uint32_t oldVgprId;
// Tick count of last old_vgpr copy
- uint64_t old_vgpr_tcnt;
+ uint64_t oldVgprTcnt;
// Old value of destination gpr (for trace)
- std::vector<uint64_t> old_dgpr;
+ std::vector<uint64_t> oldDgpr;
// Id of destination gpr (for trace)
- uint32_t old_dgpr_id;
+ uint32_t oldDgprId;
// Tick count of last old_vgpr copy
- uint64_t old_dgpr_tcnt;
+ uint64_t oldDgprTcnt;
// Execution mask at wavefront start
- VectorMask init_mask;
+ VectorMask initMask;
// number of barriers this WF has joined
- std::vector<int> bar_cnt;
- int max_bar_cnt;
+ std::vector<int> barCnt;
+ int maxBarCnt;
// Flag to stall a wave on barrier
bool stalledAtBarrier;
@@ -333,7 +333,7 @@ class Wavefront : public SimObject
int ready(itype_e type);
bool instructionBufferHasBranch();
void regStats();
- VectorMask get_pred() { return execMask() & init_mask; }
+ VectorMask getPred() { return execMask() & initMask; }
bool waitingAtBarrier(int lane);