Otawa  0.10
otawa::hard::BHT Class Reference

This class contains all information about the Branch History Predictor, that is,. More...

#include <otawa/hard/BHT.h>

Inheritance diagram for otawa::hard::BHT:
otawa::hard::PureCache

Public Types

enum  replace_policy_t {
  NONE = 0, OTHER = 1, LRU = 2, RANDOM = 3,
  FIFO = 4, PLRU = 5
}
 
typedef enum
otawa::hard::PureCache::replace_policy_t 
replace_policy_t
 

Public Member Functions

 BHT (void)
 
virtual ~BHT (void)
 
void setCondPenalty (int time)
 
void setIndirectPenalty (int time)
 
void setCondIndirectPenalty (int time)
 
void setDefaultPrediction (int def)
 
int getCondPenalty (void) const
 
int getIndirectPenalty (void) const
 
int getCondIndirectPenalty (void) const
 
int getDefaultPrediction (void) const
 
ot::size cacheSize (void) const
 
ot::size blockSize (void) const
 
int wayCount (void) const
 
int rowCount (void) const
 
int blockCount (void) const
 
replace_policy_t replacementPolicy (void) const
 
int blockBits (void) const
 
int rowBits (void) const
 
int tagBits (void) const
 
int wayBits (void) const
 
ot::mask blockMask (void) const
 
ot::mask lineMask (void) const
 
ot::mask tagMask (void) const
 
ot::mask offset (address_t addr) const
 
ot::mask line (address_t addr) const
 
ot::mask tag (address_t addr) const
 
ot::mask block (address_t addr) const
 
void setBlockBits (int block_bits)
 
void setRowBits (int set_bits)
 Set the row count as a number of bits. More...
 
void setWayBits (int way_bits)
 Set the way count as a number of bits. More...
 
void setReplacePolicy (replace_policy_t replace)
 Set the replace policy of the cache. More...
 

Public Attributes

int block_bits
 
int row_bits
 
int way_bits
 
replace_policy_t replace
 

Private Member Functions

 SERIALIZABLE (BHT, ELM_BASE(PureCache)&DFIELD(cond_penalty, 10)&DFIELD(indirect_penalty, 10)&DFIELD(cond_indirect_penalty, 10)&)
 

Private Attributes

int cond_penalty
 
int indirect_penalty
 
int cond_indirect_penalty
 
int def_predict
 

Detailed Description

This class contains all information about the Branch History Predictor, that is,.

  • the definition of the stored target a cache,
  • timing information for non-predicted conditional branch,
  • timing for predicted indirect branch,
  • timing for non-predicted indirect branch,
  • default prediction behavior.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
NONE 
OTHER 
LRU 
RANDOM 
FIFO 
PLRU 

Constructor & Destructor Documentation

otawa::hard::BHT::BHT ( void  )
inline
virtual otawa::hard::BHT::~BHT ( void  )
inlinevirtual

Member Function Documentation

ot::mask otawa::hard::PureCache::block ( address_t  addr) const
inlineinherited
int otawa::hard::PureCache::blockCount ( void  ) const
inlineinherited
ot::mask otawa::hard::PureCache::blockMask ( void  ) const
inlineinherited
ot::size otawa::hard::PureCache::blockSize ( void  ) const
inlineinherited
ot::size otawa::hard::PureCache::cacheSize ( void  ) const
inlineinherited
int otawa::hard::BHT::getCondIndirectPenalty ( void  ) const
inline

References cond_indirect_penalty.

int otawa::hard::BHT::getCondPenalty ( void  ) const
inline
int otawa::hard::BHT::getDefaultPrediction ( void  ) const
inline

References def_predict.

int otawa::hard::BHT::getIndirectPenalty ( void  ) const
inline

References indirect_penalty.

ot::mask otawa::hard::PureCache::line ( address_t  addr) const
inlineinherited
ot::mask otawa::hard::PureCache::lineMask ( void  ) const
inlineinherited
ot::mask otawa::hard::PureCache::offset ( address_t  addr) const
inlineinherited
PureCache::replace_policy_t otawa::hard::PureCache::replacementPolicy ( void  ) const
inlineinherited
int otawa::hard::PureCache::rowBits ( void  ) const
inlineinherited
int otawa::hard::PureCache::rowCount ( void  ) const
inlineinherited
otawa::hard::BHT::SERIALIZABLE ( BHT  ,
ELM_BASE(PureCache)&DFIELD(cond_penalty, 10)&DFIELD(indirect_penalty, 10)&DFIELD(cond_indirect_penalty, 10)&   
)
private
void otawa::hard::PureCache::setBlockBits ( int  block_bits)
inherited
void otawa::hard::BHT::setCondIndirectPenalty ( int  time)
inline

References cond_indirect_penalty.

void otawa::hard::BHT::setCondPenalty ( int  time)
inline

References cond_penalty.

void otawa::hard::BHT::setDefaultPrediction ( int  def)
inline

References def_predict.

void otawa::hard::BHT::setIndirectPenalty ( int  time)
inline

References indirect_penalty.

void otawa::hard::PureCache::setReplacePolicy ( replace_policy_t  replace)
inherited

Set the replace policy of the cache.

Parameters
replaceReplace policy, one of OTHER, LRU, RANDOM, FIFO, PLRU.
void otawa::hard::PureCache::setRowBits ( int  row_bits)
inherited

Set the row count as a number of bits.

The actual row count is 1 << row_bits.

Parameters
row_bitsRow count in bits.
void otawa::hard::PureCache::setWayBits ( int  way_bits)
inherited

Set the way count as a number of bits.

The actual way count is 1 << way_bits.

Parameters
way_bitsWay count in bits.
ot::mask otawa::hard::PureCache::tag ( address_t  addr) const
inlineinherited
int otawa::hard::PureCache::tagBits ( void  ) const
inlineinherited
ot::mask otawa::hard::PureCache::tagMask ( void  ) const
inlineinherited
int otawa::hard::PureCache::wayBits ( void  ) const
inlineinherited
int otawa::hard::PureCache::wayCount ( void  ) const
inlineinherited

Member Data Documentation

int otawa::hard::PureCache::block_bits
inherited
int otawa::hard::BHT::cond_indirect_penalty
private
int otawa::hard::BHT::cond_penalty
private

Referenced by getCondPenalty(), and setCondPenalty().

int otawa::hard::BHT::def_predict
private
int otawa::hard::BHT::indirect_penalty
private
replace_policy_t otawa::hard::PureCache::replace
inherited
int otawa::hard::PureCache::row_bits
inherited
int otawa::hard::PureCache::way_bits
inherited

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