Otawa
0.10
|
This class represents the full configuration of caches of a processor. More...
#include <otawa/hard/CacheConfiguration.h>
Public Member Functions | |
CacheConfiguration (const Cache *inst_cache=0, const Cache *data_cache=0) | |
Build a new configuration from the passed cache. More... | |
virtual | ~CacheConfiguration (void) |
const Cache * | instCache (void) const |
Get the instruction cache. More... | |
const Cache * | dataCache (void) const |
Get the data cache. More... | |
bool | hasInstCache (void) const |
Check if some instruction is available (in a harvard or an unified architecture). More... | |
bool | hasDataCache (void) const |
Check if some data is available (in a harvard or an unified architecture). More... | |
bool | isUnified (void) const |
Check if the cache ois unified. More... | |
bool | isHarvard (void) const |
Check if the cache follows the Harvard architecture. More... | |
string | cacheName (const Cache *cache) const |
Compute name of the cache. More... | |
Static Public Member Functions | |
static CacheConfiguration * | load (elm::xom::Element *element) |
Load a cache configuration from the given element. More... | |
static CacheConfiguration * | load (const elm::system::Path &path) |
Load a cache configuration from an XML file. More... | |
Static Public Attributes | |
static const CacheConfiguration | NO_CACHE |
Useful constant representing a configuration without cache. More... | |
Protected Attributes | |
const Cache * | icache |
const Cache * | dcache |
Private Member Functions | |
SERIALIZABLE (CacheConfiguration, FIELD(icache)&FIELD(dcache)) | |
This class represents the full configuration of caches of a processor.
|
inline |
Build a new configuration from the passed cache.
Build a cache configuration.
For creating a no-cache configuration, do not give any cache in argument. If you want to create an unified cache, pass the the same cache as inst_cache and data_cache.
inst_cache | Instruction cache. |
data_cache | Data cache. |
icache | Instruction cache. |
dcache | Data cache. |
Referenced by load().
|
virtual |
Compute name of the cache.
cache | Cache to get name for. |
References buf, dataCache(), dcache, icache, instCache(), otawa::hard::Cache::nextLevel(), and elm::StringBuffer::toString().
|
inline |
Get the data cache.
References dcache.
Referenced by cacheName(), and otawa::ipet::TrivialDataCacheManager::configure().
|
inline |
Check if some data is available (in a harvard or an unified architecture).
References dcache.
|
inline |
Check if some instruction is available (in a harvard or an unified architecture).
References icache.
Referenced by otawa::ets::ACSComputation::applyProcess(), otawa::ets::ACSComputation::initialization(), and otawa::ets::ACSComputation::processWorkSpace().
|
inline |
Get the instruction cache.
References icache.
Referenced by cacheName(), otawa::ets::ACSComputation::initialization(), otawa::ParExeGraph::ParExeGraph(), otawa::ets::ACSComputation::processAST(), otawa::EdgeCAT2Builder::processCFG(), otawa::LBlockProcessor::processWorkSpace(), otawa::EdgeCAT2ConstraintBuilder::processWorkSpace(), otawa::ets::ACSComputation::processWorkSpace(), otawa::EdgeACSBuilder::processWorkSpace(), otawa::ipet::TrivialInstCacheManager::setup(), otawa::LBlockBuilder::setup(), and otawa::ccg::LBlockBuilder::setup().
|
inline |
|
inline |
Check if the cache ois unified.
References dcache, and icache.
Referenced by otawa::ets::ACSComputation::applyProcess(), otawa::ets::ACSComputation::initialization(), and otawa::ets::ACSComputation::processWorkSpace().
|
static |
Load a cache configuration from the given element.
element | Element to load from. |
References CacheConfiguration().
Referenced by otawa::hard::Platform::loadCacheConfig().
|
static |
Load a cache configuration from an XML file.
path | Path to the file. |
References CacheConfiguration().
|
private |
|
protected |
Referenced by cacheName(), dataCache(), hasDataCache(), isHarvard(), and isUnified().
|
protected |
Referenced by cacheName(), hasInstCache(), instCache(), isHarvard(), and isUnified().
|
static |
Useful constant representing a configuration without cache.