gpu-compute: Adding vector register file debug messages

This patch introduces DPRINTFs for reading and writing to and from the vector
register file.
This commit is contained in:
Alexandru Dutu 2016-09-16 12:30:05 -04:00
parent 7918376450
commit 498d0e63e5
2 changed files with 6 additions and 1 deletions

View file

@ -89,6 +89,7 @@ DebugFlag('GPUPrefetch')
DebugFlag('GPUReg')
DebugFlag('GPUSync')
DebugFlag('GPUTLB')
DebugFlag('GPUVRF')
DebugFlag('HSALoader')
DebugFlag('HSAIL')
DebugFlag('HSAILObject')
@ -96,4 +97,5 @@ DebugFlag('Predictor')
DebugFlag('WavefrontStack')
CompoundFlag('GPUALL', ['GPUCoalescer', 'GPUDisp', 'GPUExec', 'GPUFetch',
'GPUMem', 'GPUPort', 'GPUSync', 'GPUTLB', 'HSAIL'])
'GPUMem', 'GPUPort', 'GPUSync', 'GPUTLB', 'HSAIL',
'GPUVRF'])

View file

@ -40,6 +40,7 @@
#include "base/statistics.hh"
#include "base/types.hh"
#include "debug/GPUVRF.hh"
#include "gpu-compute/vector_register_state.hh"
#include "sim/sim_object.hh"
@ -71,6 +72,7 @@ class VectorRegisterFile : public SimObject
read(int regIdx, int threadId=0)
{
T p0 = vgprState->read<T>(regIdx, threadId);
DPRINTF(GPUVRF, "reading vreg[%d][%d] = %u\n", regIdx, threadId, (uint64_t)p0);
return p0;
}
@ -80,6 +82,7 @@ class VectorRegisterFile : public SimObject
void
write(int regIdx, T value, int threadId=0)
{
DPRINTF(GPUVRF, "writing vreg[%d][%d] = %u\n", regIdx, threadId, (uint64_t)value);
vgprState->write<T>(regIdx, value, threadId);
}