|
gem5
v19.0.0.0
|
#include <stride.hh>
Public Member Functions | |
| PCTable (int assoc, int sets, const std::string name, BaseReplacementPolicy *replacementPolicy) | |
| Default constructor. More... | |
| ~PCTable () | |
| Default destructor. More... | |
| StrideEntry * | findEntry (Addr pc, bool is_secure) |
| Search for an entry in the pc table. More... | |
| StrideEntry * | findVictim (Addr pc) |
| Find a replacement victim to make room for given PC. More... | |
Private Member Functions | |
| const std::string | name () |
| Addr | pcHash (Addr pc) const |
| PC hashing function to index sets in the table. More... | |
Private Attributes | |
| const int | pcTableSets |
| const std::string | _name |
| std::vector< std::vector< StrideEntry > > | entries |
| BaseReplacementPolicy * | replacementPolicy |
| Replacement policy used by StridePrefetcher. More... | |
| StridePrefetcher::PCTable::PCTable | ( | int | assoc, |
| int | sets, | ||
| const std::string | name, | ||
| BaseReplacementPolicy * | replacementPolicy | ||
| ) |
Default constructor.
Create a table with given parameters.
| assoc | Associativity of the table. |
| sets | Number of sets in the table. |
| name | Name of the prefetcher. |
| replacementPolicy | Replacement policy used by the table. |
Definition at line 118 of file stride.cc.
References entries, and BaseReplacementPolicy::instantiateEntry().
| StridePrefetcher::PCTable::~PCTable | ( | ) |
|
inline |
Search for an entry in the pc table.
| pc | The PC to look for. |
| is_secure | True if the target memory space is secure. |
Definition at line 251 of file stride.cc.
References DPRINTF, entries, pcHash(), replacementPolicy, StridePrefetcher::StridePrefetcher(), and BaseReplacementPolicy::touch().
Referenced by StridePrefetcher::calculatePrefetch().
|
inline |
Find a replacement victim to make room for given PC.
| pc | The PC value. |
Definition at line 229 of file stride.cc.
References DPRINTF, entries, ReplaceableEntry::getSet(), BaseReplacementPolicy::getVictim(), ReplaceableEntry::getWay(), pcHash(), and replacementPolicy.
Referenced by StridePrefetcher::calculatePrefetch().
|
inlineprivate |
PC hashing function to index sets in the table.
| pc | The PC value. |
Definition at line 221 of file stride.cc.
References floorLog2(), and pcTableSets.
Referenced by findEntry(), and findVictim().
|
private |
|
private |
Definition at line 138 of file stride.hh.
Referenced by findEntry(), findVictim(), and PCTable().
|
private |
|
private |
Replacement policy used by StridePrefetcher.
Definition at line 143 of file stride.hh.
Referenced by StridePrefetcher::calculatePrefetch(), findEntry(), and findVictim().