gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories Class Reference

Local history entries, each enty contains the history of directions taken by a given branch. More...

#include <multiperspective_perceptron.hh>

Public Member Functions

 LocalHistories (int nlocal_histories, int histo_len)
 
unsigned int operator[] (Addr pc) const
 Obtains the local history entry of a given branch.
 
void update (Addr pc, bool value)
 Adds a history bit to the local history entry of a given branch.
 
int getLocalHistoryLength () const
 Returns the number of bits of each local history entry.
 
int getSize () const
 Size in bits required by all history entries.
 

Private Member Functions

unsigned int index (Addr pc) const
 Index function given the pc of the branch.
 

Private Attributes

std::vector< unsigned int > localHistories
 The array of histories.
 
const int localHistoryLength
 Size in bits of each history entry.
 

Detailed Description

Local history entries, each enty contains the history of directions taken by a given branch.

Definition at line 190 of file multiperspective_perceptron.hh.

Constructor & Destructor Documentation

◆ LocalHistories()

gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::LocalHistories ( int nlocal_histories,
int histo_len )
inline

Definition at line 202 of file multiperspective_perceptron.hh.

Member Function Documentation

◆ getLocalHistoryLength()

int gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::getLocalHistoryLength ( ) const
inline

Returns the number of bits of each local history entry.

Definition at line 222 of file multiperspective_perceptron.hh.

References localHistoryLength.

◆ getSize()

int gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::getSize ( ) const
inline

Size in bits required by all history entries.

Definition at line 228 of file multiperspective_perceptron.hh.

References localHistories, and localHistoryLength.

◆ index()

unsigned int gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::index ( Addr pc) const
inlineprivate

Index function given the pc of the branch.

Definition at line 198 of file multiperspective_perceptron.hh.

References localHistories, and gem5::MipsISA::pc.

◆ operator[]()

unsigned int gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::operator[] ( Addr pc) const
inline

Obtains the local history entry of a given branch.

Definition at line 206 of file multiperspective_perceptron.hh.

References gem5::MipsISA::index, localHistories, and gem5::MipsISA::pc.

◆ update()

void gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::update ( Addr pc,
bool value )
inline

Adds a history bit to the local history entry of a given branch.

Definition at line 212 of file multiperspective_perceptron.hh.

References gem5::MipsISA::index, localHistories, localHistoryLength, and gem5::MipsISA::pc.

Member Data Documentation

◆ localHistories

std::vector<unsigned int> gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::localHistories
private

The array of histories.

Definition at line 193 of file multiperspective_perceptron.hh.

Referenced by getSize(), index(), operator[](), and update().

◆ localHistoryLength

const int gem5::branch_prediction::MultiperspectivePerceptron::LocalHistories::localHistoryLength
private

Size in bits of each history entry.

Definition at line 195 of file multiperspective_perceptron.hh.

Referenced by getLocalHistoryLength(), getSize(), and update().


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

Generated on Tue Jun 18 2024 16:24:18 for gem5 by doxygen 1.11.0