gem5  v22.1.0.0
Classes | Functions | Variables
dueling.test.cc File Reference
#include <gtest/gtest.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <tuple>
#include <vector>
#include "base/sat_counter.hh"
#include "mem/cache/tags/dueling.hh"

Go to the source code of this file.

Classes

class  DuelingMonitorTest
 

Functions

 TEST (DuelerTest, SetSample)
 Test whether dueler provides correct sampling functionality and assigns teams correctly. More...
 
 TEST_P (DuelingMonitorTest, CountSamples)
 Test whether entry initialization creates exactly the amount of samples requested. More...
 
 TEST_P (DuelingMonitorTest, WinnerSelection)
 Test winner selection with multiple different threshold configurations. More...
 
 INSTANTIATE_TEST_CASE_P (DuelingMonitorTests, DuelingMonitorTest, ::testing::Values(std::make_tuple(32, 2, 1, 1, 0.5, 0.5), std::make_tuple(32, 4, 1, 1, 0.5, 0.5), std::make_tuple(32, 4, 2, 1, 0.5, 0.5), std::make_tuple(32, 8, 1, 1, 0.5, 0.5), std::make_tuple(32, 8, 2, 1, 0.5, 0.5), std::make_tuple(32, 8, 4, 1, 0.5, 0.5), std::make_tuple(32, 16, 1, 1, 0.5, 0.5), std::make_tuple(32, 16, 2, 1, 0.5, 0.5), std::make_tuple(32, 16, 4, 1, 0.5, 0.5), std::make_tuple(32, 16, 8, 1, 0.5, 0.5), std::make_tuple(16, 4, 1, 3, 0.5, 0.5), std::make_tuple(16, 4, 1, 3, 0.1, 0.7), std::make_tuple(16, 4, 1, 3, 0.4, 0.6), std::make_tuple(16, 4, 1, 3, 0.8, 0.9), std::make_tuple(2048, 32, 4, 4, 0.4, 0.6)))
 

Variables

static uint64_t monitor_id = 0
 

Function Documentation

◆ INSTANTIATE_TEST_CASE_P()

INSTANTIATE_TEST_CASE_P ( DuelingMonitorTests  ,
DuelingMonitorTest  ,
::testing::Values(std::make_tuple(32, 2, 1, 1, 0.5, 0.5), std::make_tuple(32, 4, 1, 1, 0.5, 0.5), std::make_tuple(32, 4, 2, 1, 0.5, 0.5), std::make_tuple(32, 8, 1, 1, 0.5, 0.5), std::make_tuple(32, 8, 2, 1, 0.5, 0.5), std::make_tuple(32, 8, 4, 1, 0.5, 0.5), std::make_tuple(32, 16, 1, 1, 0.5, 0.5), std::make_tuple(32, 16, 2, 1, 0.5, 0.5), std::make_tuple(32, 16, 4, 1, 0.5, 0.5), std::make_tuple(32, 16, 8, 1, 0.5, 0.5), std::make_tuple(16, 4, 1, 3, 0.5, 0.5), std::make_tuple(16, 4, 1, 3, 0.1, 0.7), std::make_tuple(16, 4, 1, 3, 0.4, 0.6), std::make_tuple(16, 4, 1, 3, 0.8, 0.9), std::make_tuple(2048, 32, 4, 4, 0.4, 0.6))   
)

◆ TEST()

TEST ( DuelerTest  ,
SetSample   
)

Test whether dueler provides correct sampling functionality and assigns teams correctly.

Definition at line 46 of file dueling.test.cc.

References gem5::Dueler::isSample(), and gem5::Dueler::setSample().

◆ TEST_P() [1/2]

TEST_P ( DuelingMonitorTest  ,
CountSamples   
)

Test whether entry initialization creates exactly the amount of samples requested.

Definition at line 141 of file dueling.test.cc.

References monitor_id.

◆ TEST_P() [2/2]

TEST_P ( DuelingMonitorTest  ,
WinnerSelection   
)

Test winner selection with multiple different threshold configurations.

Definition at line 165 of file dueling.test.cc.

References gem5::GenericSatCounter< T >::calcSaturation(), gem5::ArmISA::i, gem5::MipsISA::index, monitor_id, and gem5::GenericSatCounter< T >::saturate().

Variable Documentation

◆ monitor_id

uint64_t monitor_id = 0
static

Definition at line 81 of file dueling.test.cc.

Referenced by DuelingMonitorTest::TearDown(), and TEST_P().


Generated on Wed Dec 21 2022 10:22:57 for gem5 by doxygen 1.9.1