gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gem5::o3::Scoreboard Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Scoreboard()

gem5::o3::Scoreboard::Scoreboard ( const std::string &  _my_name,
unsigned  _numPhysicalRegs,
RegIndex  _zero_reg 
)

Constructs a scoreboard.

Parameters
_numPhysicalRegsNumber of physical registers.
_numMiscRegsNumber of miscellaneous registers.

Definition at line 38 of file scoreboard.cc.

◆ ~Scoreboard()

gem5::o3::Scoreboard::~Scoreboard ( )
inline

Destructor.

Definition at line 79 of file scoreboard.hh.

Member Function Documentation

◆ getReg()

bool gem5::o3::Scoreboard::getReg ( PhysRegIdPtr  phys_reg) const
inline

◆ name()

std::string gem5::o3::Scoreboard::name ( ) const
inline

Returns the name of the scoreboard.

Definition at line 82 of file scoreboard.hh.

References _name.

◆ setReg()

void gem5::o3::Scoreboard::setReg ( PhysRegIdPtr  phys_reg)
inline

◆ unsetReg()

void gem5::o3::Scoreboard::unsetReg ( PhysRegIdPtr  phys_reg)
inline

Member Data Documentation

◆ _name

const std::string gem5::o3::Scoreboard::_name
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().

◆ numPhysRegs

GEM5_CLASS_VAR_USED unsigned gem5::o3::Scoreboard::numPhysRegs
private

The number of actual physical registers.

Definition at line 68 of file scoreboard.hh.

Referenced by getReg(), setReg(), and unsetReg().

◆ regScoreBoard

std::vector<bool> gem5::o3::Scoreboard::regScoreBoard
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().

◆ zeroReg

const RegIndex gem5::o3::Scoreboard::zeroReg
private

Index of the zero integer register.

Definition at line 61 of file scoreboard.hh.

Referenced by getReg(), and unsetReg().


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:31:46 for gem5 by doxygen 1.8.17