7 #ifndef OTAWA_SIM_ABSTRACT_DRIVER_H
8 #define OTAWA_SIM_ABSTRACT_DRIVER_H
32 virtual void touch(
int index,
int num,
tag_t *line) = 0;
46 virtual void touch(
int index,
int num,
tag_t *line);
56 virtual void touch(
int index,
int num,
tag_t *line);
67 virtual void touch(
int index,
int num,
tag_t *line);
76 #endif // OTAWA_SIM_ABSTRACT_DRIVER_H
result_t
This enumeration allows to know the result of a cache access.
Definition: CacheDriver.h:22
static CacheDriver * lookup(const hard::Cache *cache)
This method retrieve the cache driver matching the given cache description.
Definition: sim_AbstractCacheDriver.cpp:30
This class provide a cache driver implementing direct mapped cache driver.
Definition: AbstractCacheDriver.h:51
const hard::Cache * _cache
Definition: AbstractCacheDriver.h:36
virtual void touch(int index, int num, tag_t *line)=0
This function is called each time a cache block in a set is accessed (read / write).
virtual void replace(tag_t tag, int num, tag_t *line)
This function is called each time a replacement in a set is required.
Definition: sim_AbstractCacheDriver.cpp:155
virtual result_t access(address_t address, size_t size, action_t action)
This function is called each time the cache is accessed.
Definition: sim_AbstractCacheDriver.cpp:87
virtual void replace(tag_t tag, int num, tag_t *line)
This function is called each time a replacement in a set is required.
Definition: sim_AbstractCacheDriver.cpp:125
virtual void touch(int index, int num, tag_t *line)
This function is called each time a cache block in a set is accessed (read / write).
Definition: sim_AbstractCacheDriver.cpp:179
tag_t * lines
Definition: AbstractCacheDriver.h:37
unsigned long tag_t
Definition: AbstractCacheDriver.h:24
~FIFOCacheDriver(void)
Definition: sim_AbstractCacheDriver.cpp:204
virtual void touch(int index, int num, tag_t *line)
This function is called each time a cache block in a set is accessed (read / write).
Definition: sim_AbstractCacheDriver.cpp:149
elm::io::IntFormat address(Address addr)
Build a format to display addresses.
Definition: base.cpp:213
This class provide a cache driver implementing a FIFO policy.
Definition: AbstractCacheDriver.h:61
virtual void touch(int index, int num, tag_t *line)
This function is called each time a cache block in a set is accessed (read / write).
Definition: sim_AbstractCacheDriver.cpp:115
virtual void replace(tag_t tag, int num, tag_t *line)
This function is called each time a replacement in a set is required.
Definition: sim_AbstractCacheDriver.cpp:185
FIFOCacheDriver(const hard::Cache *cache)
Build an associative cache driver with FIFO replacement policy.
Definition: sim_AbstractCacheDriver.cpp:195
This class contains the configuration of a level of cache of processor.
Definition: Cache.h:34
This class provides a simple interface to drive the cache management unit of a simulator.
Definition: CacheDriver.h:20
virtual void replace(tag_t tag, int num, tag_t *line)=0
This function is called each time a replacement in a set is required.
The representation of an address in OTAWA.
Definition: base.h:54
virtual ~AbstractCacheDriver(void)
Definition: sim_AbstractCacheDriver.cpp:80
const hard::Cache * cache(void) const
Definition: AbstractCacheDriver.h:28
This is an abstract implementation of the cache driver allowing to customize only the cache replaceme...
Definition: AbstractCacheDriver.h:22
AbstractCacheDriver(const hard::Cache *cache)
Build a cache driver with the given cache.
Definition: sim_AbstractCacheDriver.cpp:71
int * counters
Definition: AbstractCacheDriver.h:71
DirectMappedCacheDriver(const hard::Cache *cache)
Build a direct-mapped cache driver.
Definition: sim_AbstractCacheDriver.cpp:165
action_t
This enumeration identifies the kind of cache access.
Definition: CacheDriver.h:27
LRUCacheDriver(const hard::Cache *cache)
Build a LRU cache driver.
Definition: sim_AbstractCacheDriver.cpp:136
This class provide a cache driver implementing the LRU replacement policy.
Definition: AbstractCacheDriver.h:41