Otawa  0.10
otawa::dcache::MUSTProblem::Domain Class Reference

#include <otawa/dcache/ACSBuilder.h>

Inheritance diagram for otawa::dcache::MUSTProblem::Domain:
otawa::dcache::ACS

Public Member Functions

 Domain (const int _size, const int _A)
 
 Domain (const Domain &source)
 
 Domain (const ACS &source)
 
Domainoperator= (const ACS &d)
 
void addDamage (const int id, const int damage)
 
void inject (const int id)
 
void ageAll (void)
 
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
 

Constructor & Destructor Documentation

otawa::dcache::MUSTProblem::Domain::Domain ( const int  _size,
const int  _A 
)
inline
otawa::dcache::MUSTProblem::Domain::Domain ( const Domain source)
inline
otawa::dcache::MUSTProblem::Domain::Domain ( const ACS source)
inline

Member Function Documentation

void otawa::dcache::MUSTProblem::Domain::addDamage ( const int  id,
const int  damage 
)
inline
void otawa::dcache::MUSTProblem::Domain::ageAll ( void  )
inline
bool otawa::dcache::ACS::contains ( const int  id) const
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.

Parameters
idNumber of the tested block.
Returns
True if it is in the cache, false else.

References otawa::dcache::ACS::age.

Referenced by otawa::dcache::PERSProblem::Item::inject(), otawa::dcache::MAYProblem::Domain::inject(), otawa::dcache::PERSProblem::Item::isPersistent(), and otawa::dcache::CATBuilder::processLBlockSet().

bool otawa::dcache::ACS::equals ( const ACS acs) const
inlineinherited

Test if two ACS are equals.

Parameters
acsACS to compare the current one with.
Returns
True if both ACS are equal, false else.

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().

int otawa::dcache::ACS::getA ( void  ) const
inlineinherited
int otawa::dcache::ACS::getAge ( int  id) const
inlineinherited

Get the age of a block.

Parameters
Numberof the block.
Returns
Block age.

References otawa::dcache::ACS::age.

int otawa::dcache::ACS::getSize ( void  ) const
inlineinherited

Get the number of blocks of the ACS.

Returns
Number of blocks.

References otawa::dcache::ACS::size.

Referenced by otawa::dcache::PERSProblem::purge().

void otawa::dcache::MUSTProblem::Domain::inject ( const int  id)
inline
Domain& otawa::dcache::MUSTProblem::Domain::operator= ( const ACS d)
inline
const int& otawa::dcache::ACS::operator[] ( int  i) const
inlineinherited
int& otawa::dcache::ACS::operator[] ( int  i)
inlineinherited
void otawa::dcache::ACS::print ( elm::io::Output output) const
inherited

Print the ACS.

Parameters
outStream to output to.

References otawa::dcache::ACS::age, and otawa::dcache::ACS::size.

Referenced by otawa::dcache::operator<<(), and otawa::dcache::MUSTPERS::print().

void otawa::dcache::ACS::set ( const ACS acs)
inlineinherited

Set the ages of the given ACS to the current one.

Parameters
acsACS to set.

References otawa::dcache::ACS::A, otawa::dcache::ACS::age, and otawa::dcache::ACS::size.

Referenced by otawa::dcache::ACS::operator=().

void otawa::dcache::ACS::setAge ( const int  id,
const int  _age 
)
inlineinherited

Change the age of a block.

Parameters
idBlock number.
ageNew age to set.

References otawa::dcache::ACS::A, and otawa::dcache::ACS::age.

Member Data Documentation


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