Go to the documentation of this file.
42 #ifndef __CPU_O3_REGFILE_HH__
43 #define __CPU_O3_REGFILE_HH__
47 #include "arch/types.hh"
49 #include "config/the_isa.hh"
51 #include "debug/IEW.hh"
52 #include "enums/VecRegRenameMode.hh"
140 unsigned _numPhysicalFloatRegs,
141 unsigned _numPhysicalVecRegs,
142 unsigned _numPhysicalVecPredRegs,
143 unsigned _numPhysicalCCRegs,
185 DPRINTF(IEW,
"RegFile: Access to int register %i, has data "
197 DPRINTF(IEW,
"RegFile: Access to float register %i as int, "
198 "has data %#x\n", phys_reg->
index(), floatRegBits);
209 DPRINTF(IEW,
"RegFile: Access to vector register %i, has "
210 "data %s\n",
int(phys_reg->
index()),
225 template <
typename VecElem,
int LaneIdx>
233 template <
typename VecElem>
241 template <
typename LD>
247 DPRINTF(IEW,
"RegFile: Setting vector register %i[%d] to %lx\n",
261 DPRINTF(IEW,
"RegFile: Access to element %d of vector register %i,"
262 " has data %#x\n", phys_reg->
elemIndex(),
273 DPRINTF(IEW,
"RegFile: Access to predicate register %i, has "
274 "data %s\n",
int(phys_reg->
index()),
292 DPRINTF(IEW,
"RegFile: Access to cc register %i, has "
293 "data %#x\n", phys_reg->
index(),
305 DPRINTF(IEW,
"RegFile: Setting int register %i to %#x\n",
317 DPRINTF(IEW,
"RegFile: Setting float register %i to %#x\n",
330 DPRINTF(IEW,
"RegFile: Setting vector register %i to %s\n",
331 int(phys_reg->
index()),
val.print());
342 DPRINTF(IEW,
"RegFile: Setting element %d of vector register %i to"
354 DPRINTF(IEW,
"RegFile: Setting predicate register %i to %s\n",
355 int(phys_reg->
index()),
val.print());
366 DPRINTF(IEW,
"RegFile: Setting cc register %i to %#x\n",
393 #endif //__CPU_O3_REGFILE_HH__
bool isFloatPhysReg() const
unsigned numPhysicalIntRegs
Number of physical general purpose registers.
std::vector< PhysRegId > vecPredRegIds
bool isVectorPhysElem() const
@Return true if it is a vector element physical register.
unsigned numVecElemPhysRegs() const
VecLaneT< VecElem, true > readVecLane(PhysRegIdPtr phys_reg) const
Reads a vector register lane.
Generic predicate register container.
VecReg::Container VecRegContainer
std::vector< PhysRegId > floatRegIds
const VecElem & readVecElem(PhysRegIdPtr phys_reg) const
Reads a vector element.
std::vector< VecRegContainer > vectorRegFile
Vector register file.
unsigned totalNumRegs
Total number of physical registers.
std::vector< PhysRegId > ccRegIds
const RegIndex & elemIndex() const
Elem accessor.
bool isZeroReg() const
Check if this is the zero register.
VecPredReg::Container VecPredRegContainer
bool isVectorPhysReg() const
@Return true if it is a vector physical register.
std::vector< RegVal > ccRegFile
Condition-code register file.
Simple physical register file class.
void initFreeList(UnifiedFreeList *freeList)
Initialize the free list.
VecRegContainer & getWritableVecReg(PhysRegIdPtr phys_reg)
Reads a vector register for modification.
Enums::VecRegRenameMode VecMode
VecLaneT< VecElem, true > readVecLane(PhysRegIdPtr phys_reg) const
Reads a vector register lane.
IdRange getRegElemIds(PhysRegIdPtr reg)
Get the PhysRegIds of the elems of a vector register.
unsigned numPhysicalVecElemRegs
Number of physical vector element registers.
std::vector< PhysRegId > intRegIds
VecLaneT< VecElem, false > laneView()
View as the Nth lane of type VecElem.
PhysRegIdPtr getMiscRegId(RegIndex reg_idx)
Gets a misc register PhysRegIdPtr.
std::vector< PhysRegId > vecRegIds
~PhysRegFile()
Destructor to free resources.
void setCCReg(PhysRegIdPtr phys_reg, RegVal val)
Sets a condition-code register to the given value.
unsigned numIntPhysRegs() const
const RegIndex & index() const
Visible RegId methods.
unsigned numCCPhysRegs() const
Vector Lane abstraction Another view of a container.
RegVal readIntReg(PhysRegIdPtr phys_reg) const
Reads an integer register.
void setFloatReg(PhysRegIdPtr phys_reg, RegVal val)
PhysRegFile(unsigned _numPhysicalIntRegs, unsigned _numPhysicalFloatRegs, unsigned _numPhysicalVecRegs, unsigned _numPhysicalVecPredRegs, unsigned _numPhysicalCCRegs, VecMode vmode)
Constructs a physical register file with the specified amount of integer and floating point registers...
void setVecPredReg(PhysRegIdPtr phys_reg, const VecPredRegContainer &val)
Sets a predicate register to the given value.
unsigned numPhysicalCCRegs
Number of physical CC registers.
RegClass
Enumerate the classes of registers.
constexpr unsigned NumVecElemPerVecReg
FreeList class that simply holds the list of free integer and floating point registers.
static constexpr auto NumVecElemPerVecReg
RegVal readCCReg(PhysRegIdPtr phys_reg)
Reads a condition-code register.
unsigned numFloatPhysRegs() const
unsigned numPredPhysRegs() const
bool isCCPhysReg() const
@Return true if it is a condition-code physical register.
void setVecReg(PhysRegIdPtr phys_reg, const VecRegContainer &val)
Sets a vector register to the given value.
VecMode vecMode
Mode in which vector registers are addressed.
const VecPredRegContainer & readVecPredReg(PhysRegIdPtr phys_reg) const
Reads a predicate register.
bool isIntPhysReg() const
unsigned numPhysicalVecPredRegs
Number of physical predicate registers.
void setVecElem(PhysRegIdPtr phys_reg, const VecElem val)
Sets a vector register to the given value.
std::vector< PhysRegId > miscRegIds
Misc Reg Ids.
std::pair< PhysIds::iterator, PhysIds::iterator > IdRange
unsigned numPhysicalVecRegs
Number of physical vector registers.
unsigned numVecPhysRegs() const
unsigned totalNumPhysRegs() const
PhysRegIdPtr getTrueId(PhysRegIdPtr reg)
Get the true physical register id.
std::vector< RegVal > intRegFile
Integer register file.
unsigned numPhysicalFloatRegs
Number of physical floating point registers.
std::vector< RegVal > floatRegFile
Floating point register file.
std::vector< VecPredRegContainer > vecPredRegFile
Predicate register file.
std::vector< PhysRegId > vecElemIds
bool isVecPredPhysReg() const
RegVal readFloatReg(PhysRegIdPtr phys_reg) const
void setIntReg(PhysRegIdPtr phys_reg, RegVal val)
Sets an integer register to the given value.
IdRange getRegIds(RegClass cls)
Get the PhysRegIds of the elems of all vector registers.
const VecRegContainer & readVecReg(PhysRegIdPtr phys_reg) const
Reads a vector register.
VecPredRegContainer & getWritableVecPredReg(PhysRegIdPtr phys_reg)
Vector Register Abstraction This generic class is the model in a particularization of MVC,...
void setVecLane(PhysRegIdPtr phys_reg, const LD &val)
Get a vector register lane for modification.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17