Otawa
0.10
|
#include <otawa/hard/PureCache.h>
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 | |
PureCache (void) | |
virtual | ~PureCache (void) |
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 (PureCache, DFIELD(block_bits, 4)&DFIELD(row_bits, 12)&DFIELD(way_bits, 0)&elm::field("replace", replace, LRU)) | |
Private Attributes | |
const PureCache * | _next |
|
inline |
|
inlinevirtual |
References blockBits(), and otawa::Address::offset().
|
inline |
References block_bits.
Referenced by block(), blockSize(), cacheSize(), line(), lineMask(), tag(), and tagBits().
|
inline |
References blockSize().
|
inline |
References blockBits().
Referenced by blockMask().
|
inline |
References blockBits(), rowBits(), and wayBits().
References blockBits(), lineMask(), and otawa::Address::offset().
|
inline |
References blockBits(), and rowCount().
References blockMask(), and otawa::Address::offset().
|
inline |
References replace.
|
inline |
References row_bits.
Referenced by cacheSize(), rowCount(), tag(), and tagBits().
|
inline |
References rowBits().
Referenced by lineMask().
|
private |
void otawa::hard::PureCache::setBlockBits | ( | int | block_bits | ) |
void otawa::hard::PureCache::setReplacePolicy | ( | replace_policy_t | replace | ) |
Set the replace policy of the cache.
replace | Replace policy, one of OTHER, LRU, RANDOM, FIFO, PLRU. |
void otawa::hard::PureCache::setRowBits | ( | int | row_bits | ) |
Set the row count as a number of bits.
The actual row count is 1 << row_bits.
row_bits | Row count in bits. |
void otawa::hard::PureCache::setWayBits | ( | int | way_bits | ) |
Set the way count as a number of bits.
The actual way count is 1 << way_bits.
way_bits | Way count in bits. |
References blockBits(), otawa::Address::offset(), and rowBits().
|
inline |
References blockBits(), and rowBits().
|
inline |
References blockMask(), and lineMask().
|
inline |
References way_bits.
Referenced by cacheSize(), and wayCount().
|
inline |
References wayBits().
|
private |
int otawa::hard::PureCache::block_bits |
Referenced by blockBits().
replace_policy_t otawa::hard::PureCache::replace |
Referenced by replacementPolicy().
int otawa::hard::PureCache::row_bits |
Referenced by blockCount(), and rowBits().
int otawa::hard::PureCache::way_bits |
Referenced by blockCount(), and wayBits().