gem5
v21.1.0.1
|
Implements a simple scoreboard to track which registers are ready. More...
#include <scoreboard.hh>
Public Member Functions | |
Scoreboard (const std::string &_my_name, unsigned _numPhysicalRegs, RegIndex _zero_reg) | |
Constructs a scoreboard. More... | |
~Scoreboard () | |
Destructor. More... | |
std::string | name () const |
Returns the name of the scoreboard. More... | |
bool | getReg (PhysRegIdPtr phys_reg) const |
Checks if the register is ready. More... | |
void | setReg (PhysRegIdPtr phys_reg) |
Sets the register as ready. More... | |
void | unsetReg (PhysRegIdPtr phys_reg) |
Sets the register as not ready. More... | |
Private Attributes | |
const std::string | _name |
The object name, for DPRINTF. More... | |
const RegIndex | zeroReg |
Index of the zero integer register. More... | |
std::vector< bool > | regScoreBoard |
Scoreboard of physical integer registers, saying whether or not they are ready. More... | |
GEM5_CLASS_VAR_USED unsigned | numPhysRegs |
The number of actual physical registers. More... | |
Implements a simple scoreboard to track which registers are ready.
This class operates on the unified physical register space, because the different classes of registers do not need to be distinguished. Registers being part of a fixed mapping are always considered ready.
Definition at line 53 of file scoreboard.hh.
gem5::o3::Scoreboard::Scoreboard | ( | const std::string & | _my_name, |
unsigned | _numPhysicalRegs, | ||
RegIndex | _zero_reg | ||
) |
Constructs a scoreboard.
_numPhysicalRegs | Number of physical registers. |
_numMiscRegs | Number of miscellaneous registers. |
Definition at line 38 of file scoreboard.cc.
|
inline |
Destructor.
Definition at line 79 of file scoreboard.hh.
|
inline |
Checks if the register is ready.
Definition at line 86 of file scoreboard.hh.
References gem5::PhysRegId::flatIndex(), gem5::PhysRegId::index(), gem5::IntRegClass, gem5::PhysRegId::is(), gem5::PhysRegId::isFixedMapping(), numPhysRegs, regScoreBoard, and zeroReg.
Referenced by gem5::o3::Rename::renameSrcRegs().
|
inline |
|
inline |
Sets the register as ready.
Definition at line 105 of file scoreboard.hh.
References gem5::PhysRegId::className(), DPRINTF, gem5::PhysRegId::flatIndex(), gem5::PhysRegId::index(), gem5::PhysRegId::isFixedMapping(), numPhysRegs, and regScoreBoard.
Referenced by gem5::o3::CPU::insertThread(), gem5::o3::CPU::setVectorsAsReady(), and gem5::o3::IEW::writebackInsts().
|
inline |
Sets the register as not ready.
Definition at line 123 of file scoreboard.hh.
References gem5::PhysRegId::flatIndex(), gem5::PhysRegId::index(), gem5::IntRegClass, gem5::PhysRegId::is(), gem5::PhysRegId::isFixedMapping(), numPhysRegs, regScoreBoard, and zeroReg.
Referenced by gem5::o3::Rename::renameDestRegs().
|
private |
The object name, for DPRINTF.
We have to declare this explicitly because Scoreboard is not a SimObject.
Definition at line 58 of file scoreboard.hh.
Referenced by name().
|
private |
The number of actual physical registers.
Definition at line 68 of file scoreboard.hh.
Referenced by getReg(), setReg(), and unsetReg().
|
private |
Scoreboard of physical integer registers, saying whether or not they are ready.
Definition at line 65 of file scoreboard.hh.
Referenced by getReg(), setReg(), and unsetReg().
|
private |
Index of the zero integer register.
Definition at line 61 of file scoreboard.hh.
Referenced by getReg(), and unsetReg().