gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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. More...
 
void update (Addr pc, bool value)
 Adds a history bit to the local history entry of a given branch. More...
 
int getLocalHistoryLength () const
 Returns the number of bits of each local history entry. More...
 
int getSize () const
 Size in bits required by all history entries. More...
 

Private Member Functions

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

Private Attributes

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

Detailed Description

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

Definition at line 170 of file multiperspective_perceptron.hh.

Constructor & Destructor Documentation

◆ LocalHistories()

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

Definition at line 181 of file multiperspective_perceptron.hh.

Member Function Documentation

◆ getLocalHistoryLength()

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

Returns the number of bits of each local history entry.

Definition at line 201 of file multiperspective_perceptron.hh.

References localHistoryLength.

◆ getSize()

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

Size in bits required by all history entries.

Definition at line 207 of file multiperspective_perceptron.hh.

References localHistories, and localHistoryLength.

◆ index()

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

Index function given the pc of the branch.

Definition at line 177 of file multiperspective_perceptron.hh.

References localHistories, and MipsISA::pc.

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

◆ operator[]()

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

Obtains the local history entry of a given branch.

Definition at line 185 of file multiperspective_perceptron.hh.

References index(), localHistories, and MipsISA::pc.

◆ update()

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

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

Definition at line 191 of file multiperspective_perceptron.hh.

References index(), localHistories, localHistoryLength, and MipsISA::pc.

Member Data Documentation

◆ localHistories

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

The array of histories.

Definition at line 172 of file multiperspective_perceptron.hh.

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

◆ localHistoryLength

const int MultiperspectivePerceptron::LocalHistories::localHistoryLength
private

Size in bits of each history entry.

Definition at line 174 of file multiperspective_perceptron.hh.

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


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

Generated on Wed Sep 30 2020 14:02:28 for gem5 by doxygen 1.8.17