39#include "debug/GPURF.hh"
44#include "params/RegisterFile.hh"
50 :
SimObject(
p), simdId(
p.simd_id), _numRegs(
p.num_regs), stats(this)
74 for (
int i = 0;
i <
busy.size();
i++) {
98 DPRINTF(GPURF,
"SIMD[%d] markReg(): physReg[%d] = %d\n",
99 simdId, regIdx, (
int)value);
100 busy.at(regIdx) = value;
106 DPRINTF(GPURF,
"SIMD[%d] enqRegFreeEvent physReg[%d] at %llu\n",
115 DPRINTF(GPURF,
"SIMD[%d] enqRegBusyEvent physReg[%d] at %llu\n",
185 rf->markReg(regIdx,
true);
194 : statistics::
Group(parent),
196 "Total number of DWORDs read from register file"),
198 "Total number of DWORDs read from register file cache"),
200 "Total number of writes to existing registers in the rfc"),
202 "Total number of DWORDS written to register file"),
204 "Total number of register file bank SRAM activations for reads"),
206 "Total number of register file bank SRAM activations for writes")
virtual bool regBusy(int idx) const
virtual void markReg(int regIdx, bool value)
virtual bool operandsReady(Wavefront *w, GPUDynInstPtr ii) const
virtual void scheduleWriteOperandsFromLoad(Wavefront *w, GPUDynInstPtr ii)
virtual bool canScheduleWriteOperands(Wavefront *w, GPUDynInstPtr ii)
virtual void dispatchInstruction(GPUDynInstPtr ii)
virtual bool canScheduleWriteOperandsFromLoad(Wavefront *w, GPUDynInstPtr ii)
virtual void waveExecuteInst(Wavefront *w, GPUDynInstPtr ii)
virtual void enqRegBusyEvent(uint32_t regIdx, uint64_t delay)
RegisterFile(const RegisterFileParams &p)
virtual std::string dump() const
virtual void scheduleReadOperands(Wavefront *w, GPUDynInstPtr ii)
virtual void scheduleWriteOperands(Wavefront *w, GPUDynInstPtr ii)
virtual bool operandReadComplete(Wavefront *w, GPUDynInstPtr ii)
virtual void enqRegFreeEvent(uint32_t regIdx, uint64_t delay)
virtual void setParent(ComputeUnit *_computeUnit)
ComputeUnit * computeUnit
virtual bool canScheduleReadOperands(Wavefront *w, GPUDynInstPtr ii)
Abstract superclass for simulation objects.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
void schedule(Event &event, Tick when)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< GPUDynInst > GPUDynInstPtr
Tick curTick()
The universal simulation clock.
RegisterFileStats(statistics::Group *parent)