42#ifndef __CPU_O3_REGFILE_HH__
43#define __CPU_O3_REGFILE_HH__
52#include "debug/IEW.hh"
149 unsigned _numPhysicalFloatRegs,
150 unsigned _numPhysicalVecRegs,
151 unsigned _numPhysicalVecPredRegs,
152 unsigned _numPhysicalMatRegs,
153 unsigned _numPhysicalCCRegs,
182 DPRINTF(
IEW,
"RegFile: Access to int register %i, has data %#x\n",
187 DPRINTF(
IEW,
"RegFile: Access to float register %i has data %#x\n",
192 DPRINTF(
IEW,
"RegFile: Access to vector element register %i "
193 "has data %#x\n", idx,
val);
197 DPRINTF(
IEW,
"RegFile: Access to cc register %i has data %#x\n",
201 panic(
"Unsupported register class type %d.",
type);
220 DPRINTF(
IEW,
"RegFile: Access to vector register %i, has "
228 DPRINTF(
IEW,
"RegFile: Access to predicate register %i, has "
233 DPRINTF(
IEW,
"RegFile: Access to matrix register %i, has "
240 panic(
"Unrecognized register class type %d.",
type);
258 panic(
"Unrecognized register class type %d.",
type);
273 DPRINTF(
IEW,
"RegFile: Setting int register %i to %#x\n",
278 DPRINTF(
IEW,
"RegFile: Setting float register %i to %#x\n",
283 DPRINTF(
IEW,
"RegFile: Setting vector element register %i to "
288 DPRINTF(
IEW,
"RegFile: Setting cc register %i to %#x\n",
292 panic(
"Unsupported register class type %d.",
type);
310 DPRINTF(
IEW,
"RegFile: Setting vector register %i to %s\n",
318 DPRINTF(
IEW,
"RegFile: Setting predicate register %i to %s\n",
323 DPRINTF(
IEW,
"RegFile: Setting matrix register %i to %s\n",
331 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.
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.
unsigned numPhysicalMatRegs
Number of physical matrix registers.
unsigned numPhysicalVecPredRegs
Number of physical predicate registers.
RegFile vectorRegFile
Vector register file.
~PhysRegFile()
Destructor to free resources.
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...
RegFile vectorElemRegFile
Vector element register file.
std::vector< PhysRegId > floatRegIds
RegFile matRegFile
Matrix register file.
std::vector< PhysRegId > vecRegIds
RegFile vecPredRegFile
Predicate register file.
RegFile intRegFile
Integer register file.
RegFile floatRegFile
Floating point register file.
unsigned totalNumPhysRegs() const
unsigned numPhysicalVecElemRegs
Number of physical vector element registers.
unsigned numPhysicalFloatRegs
Number of physical floating point registers.
std::vector< PhysRegId > matRegIds
void * getWritableReg(PhysRegIdPtr phys_reg)
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)
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.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
RegClassType
Enumerate the classes of registers.
@ MatRegClass
Matrix Register.
@ FloatRegClass
Floating-point register.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ IntRegClass
Integer register.
@ VecElemClass
Vector Register Native Elem lane.