42 #ifndef __CPU_O3_REGFILE_HH__
43 #define __CPU_O3_REGFILE_HH__
52 #include "debug/IEW.hh"
60 class UnifiedFreeList;
140 unsigned _numPhysicalFloatRegs,
141 unsigned _numPhysicalVecRegs,
142 unsigned _numPhysicalVecPredRegs,
143 unsigned _numPhysicalCCRegs,
172 DPRINTF(
IEW,
"RegFile: Access to int register %i, has data %#x\n",
177 DPRINTF(
IEW,
"RegFile: Access to float register %i has data %#x\n",
182 DPRINTF(
IEW,
"RegFile: Access to vector element register %i "
183 "has data %#x\n", idx,
val);
187 DPRINTF(
IEW,
"RegFile: Access to cc register %i has data %#x\n",
191 panic(
"Unsupported register class type %d.",
type);
210 DPRINTF(
IEW,
"RegFile: Access to vector register %i, has "
218 DPRINTF(
IEW,
"RegFile: Access to predicate register %i, has "
225 panic(
"Unrecognized register class type %d.",
type);
241 panic(
"Unrecognized register class type %d.",
type);
256 DPRINTF(
IEW,
"RegFile: Setting int register %i to %#x\n",
261 DPRINTF(
IEW,
"RegFile: Setting float register %i to %#x\n",
266 DPRINTF(
IEW,
"RegFile: Setting vector element register %i to "
271 DPRINTF(
IEW,
"RegFile: Setting cc register %i to %#x\n",
275 panic(
"Unsupported register class type %d.",
type);
293 DPRINTF(
IEW,
"RegFile: Setting vector register %i to %s\n",
301 DPRINTF(
IEW,
"RegFile: Setting predicate register %i to %s\n",
309 panic(
"Unrecognized register class type %d.",
type);
constexpr RegClassType classValue() const
constexpr RegIndex index() const
Visible RegId methods.
std::string valString(const void *val) const
void set(size_t idx, const void *val)
void get(size_t idx, void *val) const
const RegClass & regClass
IEW handles both single threaded and SMT IEW (issue/execute/writeback).
Simple physical register file class.
void setReg(PhysRegIdPtr phys_reg, const void *val)
RegFile ccRegFile
Condition-code register file.
std::vector< PhysRegId > vecElemIds
RegVal getReg(PhysRegIdPtr phys_reg) const
std::vector< PhysRegId > ccRegIds
std::vector< PhysRegId > miscRegIds
Misc Reg Ids.
std::pair< PhysIds::iterator, PhysIds::iterator > IdRange
PhysRegIdPtr getMiscRegId(RegIndex reg_idx)
Gets a misc register PhysRegIdPtr.
unsigned totalNumRegs
Total number of physical registers.
unsigned numPhysicalVecRegs
Number of physical vector registers.
unsigned numPhysicalCCRegs
Number of physical CC registers.
void * getWritableReg(PhysRegIdPtr phys_reg)
unsigned numPhysicalVecPredRegs
Number of physical predicate registers.
RegFile vectorRegFile
Vector register file.
~PhysRegFile()
Destructor to free resources.
RegFile vectorElemRegFile
Vector element register file.
std::vector< PhysRegId > floatRegIds
std::vector< PhysRegId > vecRegIds
RegFile vecPredRegFile
Predicate register file.
IdRange getRegIds(RegClassType cls)
Get the PhysRegIds of the elems of all vector registers.
RegFile intRegFile
Integer register file.
RegFile floatRegFile
Floating point register file.
unsigned totalNumPhysRegs() const
PhysRegFile(unsigned _numPhysicalIntRegs, unsigned _numPhysicalFloatRegs, unsigned _numPhysicalVecRegs, unsigned _numPhysicalVecPredRegs, unsigned _numPhysicalCCRegs, const BaseISA::RegClasses &classes)
Constructs a physical register file with the specified amount of integer and floating point registers...
unsigned numPhysicalVecElemRegs
Number of physical vector element registers.
unsigned numPhysicalFloatRegs
Number of physical floating point registers.
std::vector< PhysRegId > intRegIds
std::vector< PhysRegId > vecPredRegIds
void getReg(PhysRegIdPtr phys_reg, void *val) const
unsigned numPhysicalIntRegs
Number of physical general purpose registers.
void setReg(PhysRegIdPtr phys_reg, RegVal val)
PhysRegIdPtr getTrueId(PhysRegIdPtr reg)
Get the true physical register id.
void initFreeList(UnifiedFreeList *freeList)
Initialize the free list.
FreeList class that simply holds the list of free integer and floating point registers.
#define panic(...)
This implements a cprintf based panic() function.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
RegClassType
Enumerate the classes of registers.
@ FloatRegClass
Floating-point register.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ IntRegClass
Integer register.
@ VecElemClass
Vector Register Native Elem lane.