gem5 v24.0.0.0
|
Simple physical register file class. More...
#include <regfile.hh>
Public Types | |
using | IdRange |
Public Member Functions | |
PhysRegFile (unsigned _numPhysicalIntRegs, unsigned _numPhysicalFloatRegs, unsigned _numPhysicalVecRegs, unsigned _numPhysicalVecPredRegs, unsigned _numPhysicalMatRegs, unsigned _numPhysicalCCRegs, const BaseISA::RegClasses &classes) | |
Constructs a physical register file with the specified amount of integer and floating point registers. | |
~PhysRegFile () | |
Destructor to free resources. | |
void | initFreeList (UnifiedFreeList *freeList) |
Initialize the free list. | |
unsigned | totalNumPhysRegs () const |
PhysRegIdPtr | getMiscRegId (RegIndex reg_idx) |
Gets a misc register PhysRegIdPtr. | |
RegVal | getReg (PhysRegIdPtr phys_reg) const |
void | getReg (PhysRegIdPtr phys_reg, void *val) const |
void * | getWritableReg (PhysRegIdPtr phys_reg) |
void | setReg (PhysRegIdPtr phys_reg, RegVal val) |
void | setReg (PhysRegIdPtr phys_reg, const void *val) |
Private Types | |
using | PhysIds = std::vector<PhysRegId> |
Private Attributes | |
RegFile | intRegFile |
Integer register file. | |
std::vector< PhysRegId > | intRegIds |
RegFile | floatRegFile |
Floating point register file. | |
std::vector< PhysRegId > | floatRegIds |
RegFile | vectorRegFile |
Vector register file. | |
std::vector< PhysRegId > | vecRegIds |
RegFile | vectorElemRegFile |
Vector element register file. | |
std::vector< PhysRegId > | vecElemIds |
RegFile | vecPredRegFile |
Predicate register file. | |
std::vector< PhysRegId > | vecPredRegIds |
RegFile | matRegFile |
Matrix register file. | |
std::vector< PhysRegId > | matRegIds |
RegFile | ccRegFile |
Condition-code register file. | |
std::vector< PhysRegId > | ccRegIds |
std::vector< PhysRegId > | miscRegIds |
Misc Reg Ids. | |
unsigned | numPhysicalIntRegs |
Number of physical general purpose registers. | |
unsigned | numPhysicalFloatRegs |
Number of physical floating point registers. | |
unsigned | numPhysicalVecRegs |
Number of physical vector registers. | |
unsigned | numPhysicalVecElemRegs |
Number of physical vector element registers. | |
unsigned | numPhysicalVecPredRegs |
Number of physical predicate registers. | |
unsigned | numPhysicalMatRegs |
Number of physical matrix registers. | |
unsigned | numPhysicalCCRegs |
Number of physical CC registers. | |
unsigned | totalNumRegs |
Total number of physical registers. | |
Simple physical register file class.
Definition at line 65 of file regfile.hh.
Definition at line 71 of file regfile.hh.
|
private |
Definition at line 69 of file regfile.hh.
gem5::o3::PhysRegFile::PhysRegFile | ( | unsigned | _numPhysicalIntRegs, |
unsigned | _numPhysicalFloatRegs, | ||
unsigned | _numPhysicalVecRegs, | ||
unsigned | _numPhysicalVecPredRegs, | ||
unsigned | _numPhysicalMatRegs, | ||
unsigned | _numPhysicalCCRegs, | ||
const BaseISA::RegClasses & | classes ) |
Constructs a physical register file with the specified amount of integer and floating point registers.
Definition at line 52 of file regfile.cc.
References gem5::CCRegClass, ccRegIds, gem5::FloatRegClass, floatRegIds, gem5::IntRegClass, intRegIds, gem5::MatRegClass, matRegIds, gem5::MiscRegClass, miscRegIds, numPhysicalCCRegs, numPhysicalFloatRegs, numPhysicalIntRegs, numPhysicalMatRegs, numPhysicalVecElemRegs, numPhysicalVecPredRegs, numPhysicalVecRegs, gem5::VecElemClass, vecElemIds, gem5::VecPredRegClass, vecPredRegIds, gem5::VecRegClass, and vecRegIds.
|
inline |
Destructor to free resources.
Definition at line 159 of file regfile.hh.
|
inline |
Gets a misc register PhysRegIdPtr.
Definition at line 168 of file regfile.hh.
References miscRegIds.
Referenced by gem5::o3::UnifiedRenameMap::lookup().
|
inline |
Definition at line 173 of file regfile.hh.
References gem5::CCRegClass, ccRegFile, gem5::PhysRegId::classValue(), DPRINTF, gem5::FloatRegClass, floatRegFile, gem5::PhysRegId::index(), gem5::IntRegClass, intRegFile, panic, gem5::RegFile::reg(), gem5::X86ISA::type, gem5::X86ISA::val, gem5::VecElemClass, and vectorElemRegFile.
Referenced by gem5::o3::CPU::getArchReg(), gem5::o3::CPU::getArchReg(), gem5::o3::CPU::getReg(), gem5::o3::CPU::getReg(), and getReg().
|
inline |
Definition at line 206 of file regfile.hh.
References gem5::CCRegClass, gem5::PhysRegId::classValue(), DPRINTF, gem5::FloatRegClass, gem5::RegFile::get(), getReg(), gem5::PhysRegId::index(), gem5::IntRegClass, gem5::MatRegClass, matRegFile, panic, gem5::RegFile::regClass, gem5::X86ISA::type, gem5::X86ISA::val, gem5::RegClass::valString(), gem5::VecElemClass, gem5::VecPredRegClass, vecPredRegFile, gem5::VecRegClass, and vectorRegFile.
|
inline |
Definition at line 245 of file regfile.hh.
References gem5::PhysRegId::classValue(), gem5::PhysRegId::index(), gem5::MatRegClass, matRegFile, panic, gem5::RegFile::ptr(), gem5::X86ISA::type, gem5::VecPredRegClass, vecPredRegFile, gem5::VecRegClass, and vectorRegFile.
Referenced by gem5::o3::CPU::getWritableArchReg(), and gem5::o3::CPU::getWritableReg().
void gem5::o3::PhysRegFile::initFreeList | ( | UnifiedFreeList * | freeList | ) |
Initialize the free list.
Definition at line 145 of file regfile.cc.
References gem5::o3::UnifiedFreeList::addRegs(), ccRegIds, floatRegIds, gem5::MipsISA::index, intRegIds, matRegIds, numPhysicalCCRegs, numPhysicalFloatRegs, numPhysicalIntRegs, numPhysicalMatRegs, numPhysicalVecElemRegs, numPhysicalVecPredRegs, numPhysicalVecRegs, vecElemIds, vecPredRegIds, and vecRegIds.
Referenced by gem5::o3::UnifiedFreeList::UnifiedFreeList().
|
inline |
Definition at line 297 of file regfile.hh.
References gem5::CCRegClass, gem5::PhysRegId::classValue(), DPRINTF, gem5::FloatRegClass, gem5::PhysRegId::index(), gem5::IntRegClass, gem5::MatRegClass, matRegFile, panic, gem5::RegFile::regClass, gem5::RegFile::set(), setReg(), gem5::X86ISA::type, gem5::X86ISA::val, gem5::RegClass::valString(), gem5::VecElemClass, gem5::VecPredRegClass, vecPredRegFile, gem5::VecRegClass, and vectorRegFile.
|
inline |
Definition at line 263 of file regfile.hh.
References gem5::CCRegClass, ccRegFile, gem5::PhysRegId::classValue(), DPRINTF, gem5::FloatRegClass, floatRegFile, gem5::PhysRegId::index(), gem5::IntRegClass, intRegFile, gem5::InvalidRegClass, panic, gem5::RegFile::reg(), gem5::X86ISA::type, gem5::X86ISA::val, gem5::VecElemClass, and vectorElemRegFile.
Referenced by gem5::o3::CPU::setArchReg(), gem5::o3::CPU::setArchReg(), gem5::o3::CPU::setReg(), gem5::o3::CPU::setReg(), and setReg().
|
inline |
Definition at line 165 of file regfile.hh.
References totalNumRegs.
|
private |
Condition-code register file.
Definition at line 99 of file regfile.hh.
|
private |
Definition at line 100 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Floating point register file.
Definition at line 79 of file regfile.hh.
|
private |
Definition at line 80 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Integer register file.
Definition at line 75 of file regfile.hh.
|
private |
Definition at line 76 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Matrix register file.
Definition at line 95 of file regfile.hh.
Referenced by getReg(), getWritableReg(), and setReg().
|
private |
Definition at line 96 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Misc Reg Ids.
Definition at line 103 of file regfile.hh.
Referenced by getMiscRegId(), and PhysRegFile().
|
private |
Number of physical CC registers.
Definition at line 138 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical floating point registers.
Definition at line 113 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical general purpose registers.
Definition at line 108 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical matrix registers.
Definition at line 133 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical vector element registers.
Definition at line 123 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical predicate registers.
Definition at line 128 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Number of physical vector registers.
Definition at line 118 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Total number of physical registers.
Definition at line 141 of file regfile.hh.
Referenced by totalNumPhysRegs().
|
private |
Definition at line 88 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Predicate register file.
Definition at line 91 of file regfile.hh.
Referenced by getReg(), getWritableReg(), and setReg().
|
private |
Definition at line 92 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Definition at line 84 of file regfile.hh.
Referenced by initFreeList(), and PhysRegFile().
|
private |
Vector element register file.
Definition at line 87 of file regfile.hh.
|
private |
Vector register file.
Definition at line 83 of file regfile.hh.
Referenced by getReg(), getWritableReg(), and setReg().