46 #include "params/VectorRegisterFile.hh"
51 simdId(p->simd_id), numRegsPerSimd(p->num_regs_per_simd),
58 "multiple of VRF size\n");
80 if (operandSize > 4) {
92 if (operandSize > 4) {
104 if (operandSize > 4) {
112 busy.at(regIdx) = value;
114 if (operandSize > 4) {
122 for (
int i = 0;
i < ii->getNumOperands(); ++
i) {
123 if (ii->isVectorRegister(
i)) {
124 uint32_t vgprIdx = ii->getRegisterIndex(
i, ii);
125 uint32_t pVgpr = w->
remap(vgprIdx, ii->getOperandSize(
i), 1);
127 if (
regBusy(pVgpr, ii->getOperandSize(
i)) == 1) {
128 if (ii->isDstOperand(
i)) {
130 }
else if (ii->isSrcOperand(
i)) {
137 if (
regNxtBusy(pVgpr, ii->getOperandSize(
i)) == 1) {
138 if (ii->isDstOperand(
i)) {
140 }
else if (ii->isSrcOperand(
i)) {
155 bool loadInstr = ii->isLoad();
156 bool atomicInstr = ii->isAtomic() || ii->isMemFence();
158 bool loadNoArgInstr = loadInstr && !ii->isArgLoad();
161 for (
int i = 0;
i < ii->getNumOperands(); ++
i) {
162 if (ii->isVectorRegister(
i) && ii->isDstOperand(
i)) {
163 uint32_t physReg = w->
remap(ii->getRegisterIndex(
i, ii),
164 ii->getOperandSize(
i), 1);
167 markReg(physReg, ii->getOperandSize(
i), 1);
177 if (!atomicInstr && !loadNoArgInstr) {
178 uint32_t pipeLen = ii->getOperandSize(
i) <= 4 ?
184 ii->getOperandSize(
i),
200 panic_if(regVec.size() <= 0,
"Illegal VGPR vector size=%d\n",
203 for (
int i = 0;
i < regVec.size(); ++
i) {
217 for (
int i = 0;
i < ii->getNumOperands(); ++
i) {
218 if (ii->isVectorRegister(
i) && ii->isDstOperand(
i)) {
219 uint32_t physReg = w->
remap(ii->getRegisterIndex(
i, ii),
220 ii->getOperandSize(
i), 1);
247 VectorRegisterFileParams::create()
Tick ticks(int numCycles) const
void init(uint32_t _size, uint32_t wf_size)
Stats::Scalar numTimesBlockedDueRAWDependencies
std::vector< uint8_t > nxtBusy
virtual void updateResources(Wavefront *w, GPUDynInstPtr ii)
ComputeUnit * computeUnit
panic_if(!root,"Invalid expression\n")
uint8_t regBusy(int idx, uint32_t operandSize) const
virtual void exec(GPUDynInstPtr ii, Wavefront *w)
void setParent(ComputeUnit *_computeUnit)
Stats::Scalar numTimesBlockedDueWAXDependencies
std::shared_ptr< GPUDynInst > GPUDynInstPtr
VecRegisterState * vgprState
uint8_t regNxtBusy(int idx, uint32_t operandSize) const
virtual bool vrfOperandAccessReady(uint64_t dynamic_id, Wavefront *w, GPUDynInstPtr ii, VrfAccessType accessType)
bool operandsReady(Wavefront *w, GPUDynInstPtr ii) const
void setParent(ComputeUnit *_computeUnit)
void markReg(int regIdx, uint32_t operandSize, uint8_t value)
void preMarkReg(int regIdx, uint32_t operandSize, uint8_t value)
void registerEvent(uint32_t simdId, uint32_t regIdx, uint32_t operandSize, uint64_t when, uint8_t newStatus)
uint32_t remap(uint32_t vgprIndex, uint32_t size, uint8_t mode=0)
fatal_if(p->js_features.size() > 16,"Too many job slot feature registers specified (%i)\n", p->js_features.size())
std::vector< uint8_t > busy
VectorRegisterFile(const VectorRegisterFileParams *p)
Abstract superclass for simulation objects.