gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
sat_counter.test.cc File Reference
#include <gtest/gtest-spi.h>
#include <gtest/gtest.h>
#include <utility>
#include "base/sat_counter.hh"

Go to the source code of this file.

Functions

 TEST (SatCounterTest, MaximumValue)
 Test if the maximum value is indeed the maximum value reachable. More...
 
 TEST (SatCounterTest, MinimumValue)
 Test if the minimum value is indeed the mimimum value reachable. More...
 
 TEST (SatCounterTest, InitialValue)
 Test initializing the counter with a value, updating it and then resetting. More...
 
 TEST (SatCounterTest, SaturationPercentile)
 Test calculating saturation percentile. More...
 
 TEST (SatCounterTest, Saturate)
 Test abrupt saturation. More...
 
 TEST (SatCounterTest, IntComparison)
 Test back and forth against an int. More...
 
 TEST (SatCounterTest, Shift)
 Test shift operators. More...
 
 TEST (SatCounterTest, PrePostOperators)
 Test both pre and post operators. More...
 
 TEST (SatCounterTest, CopyMove)
 Test copy and move for both constructor and assignment. More...
 
 TEST (SatCounterTest, AddSubAssignment)
 Test add-assignment and subtract assignment. More...
 
 TEST (SatCounterTest, NegativeAddSubAssignment)
 Test add-assignment and subtract assignment using negative numbers. More...
 

Function Documentation

◆ TEST() [1/11]

TEST ( SatCounterTest  ,
MaximumValue   
)

Test if the maximum value is indeed the maximum value reachable.

Definition at line 41 of file sat_counter.test.cc.

References bits(), and ArmISA::i.

◆ TEST() [2/11]

TEST ( SatCounterTest  ,
MinimumValue   
)

Test if the minimum value is indeed the mimimum value reachable.

Definition at line 57 of file sat_counter.test.cc.

References bits(), and ArmISA::i.

◆ TEST() [3/11]

TEST ( SatCounterTest  ,
InitialValue   
)

Test initializing the counter with a value, updating it and then resetting.

Definition at line 72 of file sat_counter.test.cc.

References bits(), and SatCounter::reset().

◆ TEST() [4/11]

TEST ( SatCounterTest  ,
SaturationPercentile   
)

Test calculating saturation percentile.

Definition at line 86 of file sat_counter.test.cc.

References bits(), SatCounter::calcSaturation(), and SatCounter::isSaturated().

◆ TEST() [5/11]

TEST ( SatCounterTest  ,
Saturate   
)

Test abrupt saturation.

Definition at line 103 of file sat_counter.test.cc.

References bits(), SatCounter::isSaturated(), and SatCounter::saturate().

◆ TEST() [6/11]

TEST ( SatCounterTest  ,
IntComparison   
)

Test back and forth against an int.

Definition at line 120 of file sat_counter.test.cc.

References bits().

◆ TEST() [7/11]

TEST ( SatCounterTest  ,
Shift   
)

Test shift operators.

Definition at line 144 of file sat_counter.test.cc.

References bits(), and SatCounter::reset().

◆ TEST() [8/11]

TEST ( SatCounterTest  ,
PrePostOperators   
)

Test both pre and post operators.

Definition at line 198 of file sat_counter.test.cc.

References bits(), and ArmISA::i.

◆ TEST() [9/11]

TEST ( SatCounterTest  ,
CopyMove   
)

Test copy and move for both constructor and assignment.

Definition at line 227 of file sat_counter.test.cc.

References bits(), ArmISA::i, and SatCounter::reset().

◆ TEST() [10/11]

TEST ( SatCounterTest  ,
AddSubAssignment   
)

Test add-assignment and subtract assignment.

Definition at line 281 of file sat_counter.test.cc.

References bits().

◆ TEST() [11/11]

TEST ( SatCounterTest  ,
NegativeAddSubAssignment   
)

Test add-assignment and subtract assignment using negative numbers.

Definition at line 331 of file sat_counter.test.cc.

References bits().


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13