Otawa
0.10
|
ACS for the multi-level data cache persistence analysis. More...
#include <otawa/dcache/PERSProblem.h>
Public Member Functions | |
Item (const int _size, const int _A) | |
Item (const Item &source) | |
Item (const ACS &source) | |
Item & | operator= (const Item &src) |
Item & | operator= (const ACS &src) |
void | refresh (int id, int newage) |
void | lub (const Item &dom) |
Perform join on persistent ACS. More... | |
bool | equals (const Item &dom) const |
Test if two ACS are equals. More... | |
void | inject (MUSTProblem::Domain *must, const int id) |
Consider that an access to the designed block is performed. More... | |
bool | isWiped (const int id) |
bool | isPersistent (const int id) |
void | addDamage (const int id, int damage) |
Change the age of the designed block considering the given damage to the ACS. More... | |
void | ageAll (void) |
Consider that an unknown access is performed and, therefore, all blocks must be aged. More... | |
int | getSize (void) const |
Get the number of blocks of the ACS. More... | |
int | getA (void) const |
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 |
ACS for the multi-level data cache persistence analysis.
Items are composed on each level.
|
inline |
|
inline |
|
inline |
void otawa::dcache::PERSProblem::Item::addDamage | ( | const int | id, |
int | damage | ||
) |
void otawa::dcache::PERSProblem::Item::ageAll | ( | void | ) |
Consider that an unknown access is performed and, therefore, all blocks must be aged.
References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
|
inlineinherited |
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 otawa::dcache::ACS::age.
Referenced by inject(), otawa::dcache::MAYProblem::Domain::inject(), isPersistent(), and otawa::dcache::CATBuilder::processLBlockSet().
|
inlineinherited |
Set all block to age -1.
References otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
Referenced by otawa::dcache::PERSProblem::Domain::enterContext(), otawa::dcache::MAYProblem::MAYProblem(), otawa::dcache::MUSTProblem::MUSTProblem(), and otawa::dcache::MUSTProblem::purge().
bool otawa::dcache::PERSProblem::Item::equals | ( | const Item & | dom | ) | const |
Test if two ACS are equals.
dom | ACS to test with. |
References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
|
inlineinherited |
Test if two ACS are equals.
acs | ACS to compare the current one with. |
References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
Referenced by otawa::dcache::MUSTProblem::equals(), and otawa::dcache::MAYProblem::equals().
|
inlineinherited |
References otawa::dcache::ACS::A.
Referenced by otawa::dcache::PERSProblem::purge().
|
inlineinherited |
Get the age of a block.
Number | of the block. |
References otawa::dcache::ACS::age.
|
inlineinherited |
Get the number of blocks of the ACS.
References otawa::dcache::ACS::size.
Referenced by otawa::dcache::PERSProblem::purge().
void otawa::dcache::PERSProblem::Item::inject | ( | MUSTProblem::Domain * | must, |
const int | id | ||
) |
Consider that an access to the designed block is performed.
must | Must ACS (useful to work around a bug in the initial persistent ACS implementation). |
id | Identifier of the injected block. |
References otawa::dcache::ACS::contains().
|
inline |
References otawa::dcache::ACS::contains(), and isWiped().
|
inline |
References otawa::dcache::ACS::A, and otawa::dcache::ACS::age.
Referenced by isPersistent().
void otawa::dcache::PERSProblem::Item::lub | ( | const Item & | dom | ) |
Perform join on persistent ACS.
dom | Domain to join with. |
References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
References otawa::dcache::ACS::operator=().
References otawa::dcache::ACS::operator=().
|
inlineinherited |
References otawa::dcache::ACS::age.
|
inlineinherited |
References otawa::dcache::ACS::age.
|
inherited |
Print the ACS.
out | Stream to output to. |
References otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
Referenced by otawa::dcache::operator<<(), and otawa::dcache::MUSTPERS::print().
|
inline |
References otawa::dcache::ACS::age.
|
inlineinherited |
Set the ages of the given ACS to the current one.
acs | ACS to set. |
References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.
Referenced by otawa::dcache::ACS::operator=().
|
inlineinherited |
Change the age of a block.
id | Block number. |
age | New age to set. |
References otawa::dcache::ACS::A, and otawa::dcache::ACS::age.
|
protectedinherited |
Referenced by otawa::dcache::MAYProblem::Domain::addDamage(), ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), equals(), otawa::dcache::ACS::equals(), otawa::dcache::ACS::getA(), otawa::dcache::MAYProblem::Domain::inject(), isWiped(), lub(), otawa::dcache::MAYProblem::Domain::lub(), otawa::dcache::ACS::set(), and otawa::dcache::ACS::setAge().
|
protectedinherited |
Referenced by otawa::dcache::ACS::ACS(), otawa::dcache::MAYProblem::Domain::addDamage(), ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), otawa::dcache::ACS::contains(), otawa::dcache::ACS::empty(), equals(), otawa::dcache::ACS::equals(), otawa::dcache::ACS::getAge(), otawa::dcache::MAYProblem::Domain::inject(), isWiped(), lub(), otawa::dcache::MAYProblem::Domain::lub(), otawa::dcache::ACS::operator[](), otawa::dcache::ACS::print(), refresh(), otawa::dcache::ACS::set(), otawa::dcache::ACS::setAge(), and otawa::dcache::ACS::~ACS().
|
protectedinherited |
Referenced by otawa::dcache::ACS::ACS(), ageAll(), otawa::dcache::MAYProblem::Domain::ageAll(), otawa::dcache::ACS::empty(), equals(), otawa::dcache::ACS::equals(), otawa::dcache::ACS::getSize(), otawa::dcache::MAYProblem::Domain::inject(), lub(), otawa::dcache::MAYProblem::Domain::lub(), otawa::dcache::ACS::print(), and otawa::dcache::ACS::set().