gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
IndirectPredictor Class Reference

#include <indirect.hh>

Classes

struct  HistoryEntry
 
struct  IPredEntry
 
struct  ThreadInfo
 

Public Member Functions

 IndirectPredictor (bool hash_ghr, bool hash_targets, unsigned num_sets, unsigned num_ways, unsigned tag_bits, unsigned path_len, unsigned inst_shift, unsigned num_threads)
 
bool lookup (Addr br_addr, unsigned ghr, TheISA::PCState &br_target, ThreadID tid)
 
void recordIndirect (Addr br_addr, Addr tgt_addr, InstSeqNum seq_num, ThreadID tid)
 
void commit (InstSeqNum seq_num, ThreadID tid)
 
void squash (InstSeqNum seq_num, ThreadID tid)
 
void recordTarget (InstSeqNum seq_num, unsigned ghr, const TheISA::PCState &target, ThreadID tid)
 

Private Member Functions

Addr getSetIndex (Addr br_addr, unsigned ghr, ThreadID tid)
 
Addr getTag (Addr br_addr)
 

Private Attributes

const bool hashGHR
 
const bool hashTargets
 
const unsigned numSets
 
const unsigned numWays
 
const unsigned tagBits
 
const unsigned pathLength
 
const unsigned instShift
 
std::vector< std::vector
< IPredEntry > > 
targetCache
 
std::vector< ThreadInfothreadInfo
 

Detailed Description

Definition at line 40 of file indirect.hh.

Constructor & Destructor Documentation

IndirectPredictor::IndirectPredictor ( bool  hash_ghr,
bool  hash_targets,
unsigned  num_sets,
unsigned  num_ways,
unsigned  tag_bits,
unsigned  path_len,
unsigned  inst_shift,
unsigned  num_threads 
)

Definition at line 36 of file indirect.cc.

References ArmISA::i, isPowerOf2(), numSets, numWays, panic, targetCache, and threadInfo.

Member Function Documentation

void IndirectPredictor::commit ( InstSeqNum  seq_num,
ThreadID  tid 
)
Addr IndirectPredictor::getSetIndex ( Addr  br_addr,
unsigned  ghr,
ThreadID  tid 
)
inlineprivate
Addr IndirectPredictor::getTag ( Addr  br_addr)
inlineprivate

Definition at line 182 of file indirect.cc.

References instShift, and tagBits.

Referenced by lookup(), and recordTarget().

bool IndirectPredictor::lookup ( Addr  br_addr,
unsigned  ghr,
TheISA::PCState &  br_target,
ThreadID  tid 
)

Definition at line 57 of file indirect.cc.

References DPRINTF, getSetIndex(), getTag(), numSets, and targetCache.

Referenced by BPredUnit::predict().

void IndirectPredictor::recordIndirect ( Addr  br_addr,
Addr  tgt_addr,
InstSeqNum  seq_num,
ThreadID  tid 
)

Definition at line 79 of file indirect.cc.

References DPRINTF, and threadInfo.

Referenced by BPredUnit::predict().

void IndirectPredictor::recordTarget ( InstSeqNum  seq_num,
unsigned  ghr,
const TheISA::PCState &  target,
ThreadID  tid 
)
void IndirectPredictor::squash ( InstSeqNum  seq_num,
ThreadID  tid 
)

Definition at line 106 of file indirect.cc.

References DPRINTF, IndirectPredictor::ThreadInfo::pathHist, and threadInfo.

Referenced by BPredUnit::squash().

Member Data Documentation

const bool IndirectPredictor::hashGHR
private

Definition at line 57 of file indirect.hh.

Referenced by getSetIndex().

const bool IndirectPredictor::hashTargets
private

Definition at line 58 of file indirect.hh.

Referenced by getSetIndex().

const unsigned IndirectPredictor::instShift
private

Definition at line 63 of file indirect.hh.

Referenced by getSetIndex(), and getTag().

const unsigned IndirectPredictor::numSets
private

Definition at line 59 of file indirect.hh.

Referenced by getSetIndex(), IndirectPredictor(), lookup(), and recordTarget().

const unsigned IndirectPredictor::numWays
private

Definition at line 60 of file indirect.hh.

Referenced by IndirectPredictor(), and recordTarget().

const unsigned IndirectPredictor::pathLength
private

Definition at line 62 of file indirect.hh.

Referenced by commit(), and getSetIndex().

const unsigned IndirectPredictor::tagBits
private

Definition at line 61 of file indirect.hh.

Referenced by getTag().

std::vector<std::vector<IPredEntry> > IndirectPredictor::targetCache
private

Definition at line 72 of file indirect.hh.

Referenced by IndirectPredictor(), lookup(), and recordTarget().

std::vector<ThreadInfo> IndirectPredictor::threadInfo
private

Definition at line 94 of file indirect.hh.

Referenced by commit(), getSetIndex(), IndirectPredictor(), recordIndirect(), recordTarget(), and squash().


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

Generated on Fri Jun 9 2017 13:04:13 for gem5 by doxygen 1.8.6