Otawa
0.10
|
Representation of an Abstract Cache State where each data cache block is represented by its age. More...
#include <otawa/dcache/features.h>
Public Member Functions | |
ACS (const int _size, const int _A, int init=-1) | |
~ACS () | |
int | getSize (void) const |
Get the number of blocks of the ACS. More... | |
int | getA (void) const |
ACS (const ACS &source) | |
Constructor by cloning. More... | |
ACS & | operator= (const ACS &src) |
bool | equals (const ACS &dom) const |
Test if two ACS are equals. More... | |
void | empty (void) |
Set all block to age -1. More... | |
bool | contains (const int id) const |
Test if a block is in the ACS , that is, its each age is in the interval [0, A[ where A is the associativity of the cache. More... | |
void | print (elm::io::Output &output) const |
Print the ACS. More... | |
int | getAge (int id) const |
Get the age of a block. More... | |
void | setAge (const int id, const int _age) |
Change the age of a block. More... | |
void | set (const ACS &dom) |
Set the ages of the given ACS to the current one. More... | |
const int & | operator[] (int i) const |
int & | operator[] (int i) |
Protected Attributes | |
int | A |
int | size |
int * | age |
Representation of an Abstract Cache State where each data cache block is represented by its age.
The initial state is the unknown one, that is when each block has an age of -1 (unknown age).
|
inline |
|
inline |
References age.
|
inline |
|
inline |
Test if a block is in the ACS , that is, its each age is in the interval [0, A[ where A is the associativity of the cache.
id | Number of the tested block. |
References age.
Referenced by otawa::dcache::PERSProblem::Item::inject(), otawa::dcache::MAYProblem::Domain::inject(), otawa::dcache::PERSProblem::Item::isPersistent(), and otawa::dcache::CATBuilder::processLBlockSet().
|
inline |
Set all block to age -1.
Referenced by otawa::dcache::PERSProblem::Domain::enterContext(), otawa::dcache::MAYProblem::MAYProblem(), otawa::dcache::MUSTProblem::MUSTProblem(), and otawa::dcache::MUSTProblem::purge().
|
inline |
Test if two ACS are equals.
acs | ACS to compare the current one with. |
Referenced by otawa::dcache::MUSTProblem::equals(), and otawa::dcache::MAYProblem::equals().
|
inline |
References A.
Referenced by otawa::dcache::PERSProblem::purge().
|
inline |
|
inline |
Get the number of blocks of the ACS.
References size.
Referenced by otawa::dcache::PERSProblem::purge().
References set().
Referenced by otawa::dcache::PERSProblem::Item::operator=(), and otawa::dcache::MAYProblem::Domain::operator=().
|
inline |
References age.
|
inline |
References age.
void otawa::dcache::ACS::print | ( | elm::io::Output & | output | ) | const |
Print the ACS.
out | Stream to output to. |
Referenced by otawa::dcache::operator<<(), and otawa::dcache::MUSTPERS::print().
|
inline |
|
inline |
|
protected |
Referenced by otawa::dcache::MAYProblem::Domain::addDamage(), otawa::dcache::PERSProblem::Item::ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), otawa::dcache::PERSProblem::Item::equals(), equals(), getA(), otawa::dcache::MAYProblem::Domain::inject(), otawa::dcache::PERSProblem::Item::isWiped(), otawa::dcache::PERSProblem::Item::lub(), otawa::dcache::MAYProblem::Domain::lub(), set(), and setAge().
|
protected |
Referenced by ACS(), otawa::dcache::MAYProblem::Domain::addDamage(), otawa::dcache::PERSProblem::Item::ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), contains(), empty(), otawa::dcache::PERSProblem::Item::equals(), equals(), getAge(), otawa::dcache::MAYProblem::Domain::inject(), otawa::dcache::PERSProblem::Item::isWiped(), otawa::dcache::PERSProblem::Item::lub(), otawa::dcache::MAYProblem::Domain::lub(), operator[](), print(), otawa::dcache::PERSProblem::Item::refresh(), set(), setAge(), and ~ACS().
|
protected |
Referenced by ACS(), otawa::dcache::PERSProblem::Item::ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), empty(), otawa::dcache::PERSProblem::Item::equals(), equals(), getSize(), otawa::dcache::MAYProblem::Domain::inject(), otawa::dcache::PERSProblem::Item::lub(), otawa::dcache::MAYProblem::Domain::lub(), print(), and set().