The FIFO replacement policy.
More...
#include <fifo.h>
|
uint32_t * | up_next |
| The index of the next line to evict.
|
|
|
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 FIFO replacement policy.
◆ FIFO()
FIFO::FIFO |
( |
CacheABC & |
cache, |
|
|
uint32_t |
num_sets, |
|
|
uint32_t |
assoc |
|
) |
| |
Construct a new FIFO replacement policy.
- Parameters
-
cache | The parent cache |
num_sets | The number of sets in the cache |
assoc | The associativity of the chace |
◆ getVictim()
uint32_t FIFO::getVictim |
( |
uint32_t |
set_idx | ) |
|
|
virtual |
Determine which line of a range of lines to replace.
- Parameters
-
set_idx | The index of the set to choose from |
- Returns
- The chosen line's index within the set (0 to assoc-1)
Reimplemented from ReplacementPolicy.
◆ printState()
void FIFO::printState |
( |
uint32_t |
set_idx | ) |
|
|
virtual |
Print out the replacer's internal state.
- Parameters
-
set_idx | The index of the set |
Reimplemented from ReplacementPolicy.
The documentation for this class was generated from the following files: