CohereSim: A Bus-based Cache Simulator  v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
rr.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "replacement_policy.h"
7 
9 class RR : public ReplacementPolicy {
10 public:
11 
16  RR(CacheABC& cache, uint32_t num_sets, uint32_t assoc);
17 
21  uint32_t getVictim(uint32_t set_idx);
22 };
The cache interface.
Definition: cache_abc.h:9
The RR replacement policy.
Definition: rr.h:9
RR(CacheABC &cache, uint32_t num_sets, uint32_t assoc)
Construct a new RR replacement policy.
Definition: rr.cc:10
uint32_t getVictim(uint32_t set_idx)
Determine which line of a range of lines to replace.
Definition: rr.cc:15
The base class for replacement policies.
Definition: replacement_policy.h:9
uint32_t num_sets
The number of sets in the cache.
Definition: replacement_policy.h:40
uint32_t assoc
The associativity of the cache.
Definition: replacement_policy.h:42
CacheABC & cache
The parent cache.
Definition: replacement_policy.h:37
Declaration of the replacement policy base class.