gem5 [DEVELOP-FOR-25.1]
Loading...
Searching...
No Matches
fifo_rp.test.cc File Reference
#include <gtest/gtest-spi.h>
#include <gtest/gtest.h>
#include <cassert>
#include "mem/cache/replacement_policies/fifo_rp.hh"
#include "params/FIFORP.hh"

Go to the source code of this file.

Classes

class  FIFORPTestF
 Copyright (c) 2025 Daniel R. More...
class  FIFORPVictimizationTestF
 Fixture that tests victimization. More...

Typedefs

typedef FIFORPTestF FIFORPFDeathTest

Functions

 TEST_F (FIFORPTestF, InstantiatedEntry)
 Test that instantiating an entry generates a non-null replacement data.
 TEST_F (FIFORPTestF, GetVictim1Candidate)
 Test that if there is one candidate, then it will always be the victim, regardless of its replacement data.
 TEST_F (FIFORPVictimizationTestF, GetVictimAllInvalid)
 Test that when all entries are invalid the first candidate will always be selected, regardless of the order of the invalidations.
 TEST_F (FIFORPVictimizationTestF, GetVictimAllInvalid2)
 Test that when all entries are invalid the first candidate will always be selected, regardless of the order of the invalidations.
 TEST_F (FIFORPVictimizationTestF, GetVictimOneInvalid)
 Test that when there is at least a single invalid entry, it will be selected during the victimization.
 TEST_F (FIFORPVictimizationTestF, GetVictim)
 Test that the first entry to be reset will be selected during victimization.
 TEST_F (FIFORPVictimizationTestF, GetVictimAfterTouch)
 Test that the first entry to be reset will be selected during victimization, even if it was touched before the victimization process.
 TEST_F (FIFORPFDeathTest, InvalidateNull)
 TEST_F (FIFORPFDeathTest, ResetNull)
 TEST_F (FIFORPFDeathTest, TouchNull)
 TEST_F (FIFORPFDeathTest, NoCandidates)

Typedef Documentation

◆ FIFORPFDeathTest

Definition at line 207 of file fifo_rp.test.cc.

Function Documentation

◆ TEST_F() [1/11]

TEST_F ( FIFORPFDeathTest ,
InvalidateNull  )

Definition at line 209 of file fifo_rp.test.cc.

◆ TEST_F() [2/11]

TEST_F ( FIFORPFDeathTest ,
NoCandidates  )

Definition at line 228 of file fifo_rp.test.cc.

◆ TEST_F() [3/11]

TEST_F ( FIFORPFDeathTest ,
ResetNull  )

Definition at line 214 of file fifo_rp.test.cc.

◆ TEST_F() [4/11]

TEST_F ( FIFORPFDeathTest ,
TouchNull  )

Definition at line 219 of file fifo_rp.test.cc.

◆ TEST_F() [5/11]

TEST_F ( FIFORPTestF ,
GetVictim1Candidate  )

Test that if there is one candidate, then it will always be the victim, regardless of its replacement data.

Definition at line 62 of file fifo_rp.test.cc.

References gem5::ReplaceableEntry::replacementData.

◆ TEST_F() [6/11]

TEST_F ( FIFORPTestF ,
InstantiatedEntry  )

Test that instantiating an entry generates a non-null replacement data.

Definition at line 52 of file fifo_rp.test.cc.

◆ TEST_F() [7/11]

TEST_F ( FIFORPVictimizationTestF ,
GetVictim  )

Test that the first entry to be reset will be selected during victimization.

Definition at line 159 of file fifo_rp.test.cc.

◆ TEST_F() [8/11]

TEST_F ( FIFORPVictimizationTestF ,
GetVictimAfterTouch  )

Test that the first entry to be reset will be selected during victimization, even if it was touched before the victimization process.

Definition at line 182 of file fifo_rp.test.cc.

◆ TEST_F() [9/11]

TEST_F ( FIFORPVictimizationTestF ,
GetVictimAllInvalid  )

Test that when all entries are invalid the first candidate will always be selected, regardless of the order of the invalidations.

Definition at line 104 of file fifo_rp.test.cc.

◆ TEST_F() [10/11]

TEST_F ( FIFORPVictimizationTestF ,
GetVictimAllInvalid2  )

Test that when all entries are invalid the first candidate will always be selected, regardless of the order of the invalidations.

The order of invalidations of this test is reversed in comparison to the other test.

Definition at line 125 of file fifo_rp.test.cc.

◆ TEST_F() [11/11]

TEST_F ( FIFORPVictimizationTestF ,
GetVictimOneInvalid  )

Test that when there is at least a single invalid entry, it will be selected during the victimization.

Definition at line 143 of file fifo_rp.test.cc.


Generated on Mon Oct 27 2025 04:13:06 for gem5 by doxygen 1.14.0