gem5  v20.1.0.0
Public Member Functions | Static Public Member Functions | List of all members
MultiperspectivePerceptron::GHIST Class Reference

Available features. More...

#include <multiperspective_perceptron.hh>

Inheritance diagram for MultiperspectivePerceptron::GHIST:
MultiperspectivePerceptron::HistorySpec

Public Member Functions

 GHIST (int p1, int p2, double coeff, int size, int width, MultiperspectivePerceptron &mpp)
 
unsigned int getHash (ThreadID tid, Addr pc, Addr pc2, int t) const override
 Gets the hash to index the table, using the pc of the branch, and the index of the table. More...
 
void setBitRequirements () const override
 Sets the size requirements of the table, used when initializing to set the proper size of the tables. More...
 
- Public Member Functions inherited from MultiperspectivePerceptron::HistorySpec
 HistorySpec (int _p1, int _p2, int _p3, double _coeff, int _size, int _width, MultiperspectivePerceptron &_mpp)
 

Static Public Member Functions

static unsigned int hash (const std::vector< unsigned int > &ghist_words, int block_size, int start_pos, int end_pos)
 

Additional Inherited Members

- Public Attributes inherited from MultiperspectivePerceptron::HistorySpec
const int p1
 First parameter. More...
 
const int p2
 Second parameter. More...
 
const int p3
 Third parameter. More...
 
const double coeff
 Coefficient of the feature, models the accuracy of the feature. More...
 
const int size
 Pre-assigned size in bits assigned to this feature. More...
 
const int width
 Width of the table in bits
More...
 
MultiperspectivePerceptronmpp
 Reference to the branch predictor class. More...
 

Detailed Description

Available features.

Definition at line 483 of file multiperspective_perceptron.hh.

Constructor & Destructor Documentation

◆ GHIST()

MultiperspectivePerceptron::GHIST::GHIST ( int  p1,
int  p2,
double  coeff,
int  size,
int  width,
MultiperspectivePerceptron mpp 
)
inline

Definition at line 485 of file multiperspective_perceptron.hh.

Member Function Documentation

◆ getHash()

unsigned int MultiperspectivePerceptron::GHIST::getHash ( ThreadID  tid,
Addr  pc,
Addr  pc2,
int  t 
) const
inlineoverridevirtual

Gets the hash to index the table, using the pc of the branch, and the index of the table.

Parameters
tidThread ID of the branch
pcaddress of the branch
pc2address of the branch shifted 2 bits to the right
tinteger index of the table
Returns
resulting hash value that will be used to index the table

Implements MultiperspectivePerceptron::HistorySpec.

Definition at line 490 of file multiperspective_perceptron.hh.

References MultiperspectivePerceptron::blockSize, hash(), MultiperspectivePerceptron::HistorySpec::mpp, MultiperspectivePerceptron::HistorySpec::p1, MultiperspectivePerceptron::HistorySpec::p2, and MultiperspectivePerceptron::threadData.

◆ hash()

static unsigned int MultiperspectivePerceptron::GHIST::hash ( const std::vector< unsigned int > &  ghist_words,
int  block_size,
int  start_pos,
int  end_pos 
)
inlinestatic

Definition at line 497 of file multiperspective_perceptron.hh.

References ArmISA::a, SparcISA::am, ArmISA::b, ArmISA::i, and RiscvISA::x.

Referenced by getHash().

◆ setBitRequirements()

void MultiperspectivePerceptron::GHIST::setBitRequirements ( ) const
inlineoverridevirtual

Sets the size requirements of the table, used when initializing to set the proper size of the tables.

Reimplemented from MultiperspectivePerceptron::HistorySpec.

Definition at line 526 of file multiperspective_perceptron.hh.

References MultiperspectivePerceptron::ghist_length, MultiperspectivePerceptron::HistorySpec::mpp, and MultiperspectivePerceptron::HistorySpec::p2.


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