CohereSim: A Bus-based Cache Simulator
v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
|
The RR replacement policy. More...
#include <rr.h>
Public Member Functions | |
RR (CacheABC &cache, uint32_t num_sets, uint32_t assoc) | |
Construct a new RR replacement policy. More... | |
uint32_t | getVictim (uint32_t set_idx) |
Determine which line of a range of lines to replace. More... | |
![]() | |
ReplacementPolicy (CacheABC &cache, uint32_t num_sets, uint32_t assoc) | |
Construct a new replacement policy. More... | |
virtual void | touch (uint32_t set_idx, uint32_t way_idx) |
Notify the replacement policy that a line was just accessed. More... | |
virtual void | printState (uint32_t set_idx) |
Print out the replacer's internal state. More... | |
Additional Inherited Members | |
![]() | |
CacheABC & | cache |
The parent cache. | |
uint32_t | num_sets |
The number of sets in the cache. | |
uint32_t | assoc |
The associativity of the cache. | |
The RR replacement policy.
RR::RR | ( | CacheABC & | cache, |
uint32_t | num_sets, | ||
uint32_t | assoc | ||
) |
Construct a new RR replacement policy.
cache | The parent cache |
num_sets | The number of sets in the cache |
assoc | The associativity of the chace |
|
virtual |
Determine which line of a range of lines to replace.
set_idx | The index of the set to choose from |
Reimplemented from ReplacementPolicy.