37#include "debug/GPURFC.hh"
42#include "params/RegisterFileCache.hh"
48 :
SimObject(
p), simdId(
p.simd_id), _capacity(
p.cache_size)
75 if (
i->prev ==
nullptr) {
76 ss <<
"reg: " <<
i->regIdx <<
" ";
78 ss <<
"reg: " <<
i->regIdx <<
" (prev: " <<
i->prev->regIdx<<
") ";
80 if (
i->next !=
nullptr) {
81 ss <<
" (next: " <<
i->next->regIdx<<
") ";
96 DPRINTF(GPURFC,
"RFC SIMD[%d] cache miss inserting physReg[%d]\n",
107 DPRINTF(GPURFC,
"RFC SIMD[%d] cache miss inserting "
108 "physReg[%d] evicting physReg[%d]\n",
simdId, regIdx,
val);
114 DPRINTF(GPURFC,
"RFC SIMD[%d] cache miss inserting physReg[%d]\n",
118 DPRINTF(GPURFC,
"RFC SIMD[%d] cache hit physReg[%d]\n",
127 if (
lruHash[regIdx]->next !=
nullptr) {
145 && !(ii->isAtomic() || ii->isMemSync())) {
149 for (
const auto& dstVecOp : ii->dstVecRegOperands()) {
150 for (
const auto& physIdx : dstVecOp.physIndices()) {
Tick cyclesToTicks(Cycles c) const
Cycles is a wrapper class for representing cycle counts, i.e.
std::unordered_map< int, OrderedRegs * > lruHash
virtual void enqCacheInsertEvent(uint32_t regIdx, uint64_t delay)
virtual ~RegisterFileCache()
RegisterFileCache(const RegisterFileCacheParams &p)
virtual std::string dumpLL() const
ComputeUnit * computeUnit
virtual void markRFC(int regIdx)
virtual void setParent(ComputeUnit *_computeUnit)
virtual bool inRFC(int regIdx)
virtual void waveExecuteInst(Wavefront *w, GPUDynInstPtr ii)
Abstract superclass for simulation objects.
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.
uint64_t Tick
Tick count type.