gem5  v20.1.0.0
Functions
The SatCounter API.

These methods relate to the SatCounter interface. More...

Functions

 SatCounter::SatCounter (unsigned bits, uint8_t initial_val=0)
 Constructor for the counter. More...
 
 SatCounter::SatCounter (const SatCounter &other)
 Copy constructor. More...
 
SatCounterSatCounter::operator= (const SatCounter &other)
 Copy assignment. More...
 
 SatCounter::SatCounter (SatCounter &&other)
 Move constructor. More...
 
SatCounterSatCounter::operator= (SatCounter &&other)
 Move assignment. More...
 
void SatCounter::swap (SatCounter &other)
 Swap the contents of every member of the class. More...
 
SatCounterSatCounter::operator++ ()
 Pre-increment operator. More...
 
SatCounter SatCounter::operator++ (int)
 Post-increment operator. More...
 
SatCounterSatCounter::operator-- ()
 Pre-decrement operator. More...
 
SatCounter SatCounter::operator-- (int)
 Post-decrement operator. More...
 
SatCounterSatCounter::operator>>= (const int &shift)
 Shift-right-assignment. More...
 
SatCounterSatCounter::operator<<= (const int &shift)
 Shift-left-assignment. More...
 
SatCounterSatCounter::operator+= (const int &value)
 Add-assignment. More...
 
SatCounterSatCounter::operator-= (const int &value)
 Subtract-assignment. More...
 
 SatCounter::operator uint8_t () const
 Read the counter's value. More...
 
void SatCounter::reset ()
 Reset the counter to its initial value. More...
 
double SatCounter::calcSaturation () const
 Calculate saturation percentile of the current counter's value with regard to its maximum possible value. More...
 
bool SatCounter::isSaturated () const
 Whether the counter has achieved its maximum value or not. More...
 
uint8_t SatCounter::saturate ()
 Saturate the counter. More...
 

Detailed Description

These methods relate to the SatCounter interface.

Function Documentation

◆ calcSaturation()

double SatCounter::calcSaturation ( ) const
inline

Calculate saturation percentile of the current counter's value with regard to its maximum possible value.

Returns
A value between 0.0 and 1.0 to indicate which percentile of the maximum value the current value is.

Definition at line 297 of file sat_counter.hh.

References SatCounter::counter, and SatCounter::maxVal.

Referenced by Prefetcher::SignaturePath::calculateLookaheadConfidence(), Prefetcher::Stride::calculatePrefetch(), Prefetcher::IndirectMemory::calculatePrefetch(), Prefetcher::SignaturePath::calculatePrefetchConfidence(), and TEST().

◆ isSaturated()

bool SatCounter::isSaturated ( ) const
inline

Whether the counter has achieved its maximum value or not.

Returns
True if the counter saturated.

Definition at line 306 of file sat_counter.hh.

References SatCounter::counter, and SatCounter::maxVal.

Referenced by Prefetcher::SignaturePathV2::increasePatternEntryCounter(), and TEST().

◆ operator uint8_t()

SatCounter::operator uint8_t ( ) const
inline

Read the counter's value.

Definition at line 279 of file sat_counter.hh.

References SatCounter::counter.

◆ operator++() [1/2]

SatCounter& SatCounter::operator++ ( )
inline

Pre-increment operator.

Definition at line 157 of file sat_counter.hh.

References SatCounter::counter, and SatCounter::maxVal.

◆ operator++() [2/2]

SatCounter SatCounter::operator++ ( int  )
inline

Post-increment operator.

Definition at line 171 of file sat_counter.hh.

◆ operator+=()

SatCounter& SatCounter::operator+= ( const int &  value)
inline

Add-assignment.

Definition at line 240 of file sat_counter.hh.

References SatCounter::counter, and SatCounter::maxVal.

◆ operator--() [1/2]

SatCounter& SatCounter::operator-- ( )
inline

Pre-decrement operator.

Definition at line 184 of file sat_counter.hh.

References SatCounter::counter.

◆ operator--() [2/2]

SatCounter SatCounter::operator-- ( int  )
inline

Post-decrement operator.

Definition at line 198 of file sat_counter.hh.

◆ operator-=()

SatCounter& SatCounter::operator-= ( const int &  value)
inline

Subtract-assignment.

Definition at line 260 of file sat_counter.hh.

References SatCounter::counter.

◆ operator<<=()

SatCounter& SatCounter::operator<<= ( const int &  shift)
inline

Shift-left-assignment.

Definition at line 224 of file sat_counter.hh.

References SatCounter::counter, SatCounter::maxVal, and ArmISA::shift.

◆ operator=() [1/2]

SatCounter& SatCounter::operator= ( const SatCounter other)
inline

Copy assignment.

Definition at line 97 of file sat_counter.hh.

References SatCounter::swap().

◆ operator=() [2/2]

SatCounter& SatCounter::operator= ( SatCounter &&  other)
inline

Move assignment.

Definition at line 124 of file sat_counter.hh.

References SatCounter::counter, SatCounter::initialVal, and SatCounter::maxVal.

◆ operator>>=()

SatCounter& SatCounter::operator>>= ( const int &  shift)
inline

Shift-right-assignment.

Definition at line 211 of file sat_counter.hh.

References SatCounter::counter, and ArmISA::shift.

◆ reset()

void SatCounter::reset ( )
inline

◆ SatCounter() [1/3]

SatCounter::SatCounter ( const SatCounter other)
inline

Copy constructor.

Definition at line 86 of file sat_counter.hh.

◆ SatCounter() [2/3]

SatCounter::SatCounter ( SatCounter &&  other)
inline

Move constructor.

Definition at line 110 of file sat_counter.hh.

References SatCounter::counter, SatCounter::initialVal, and SatCounter::maxVal.

◆ SatCounter() [3/3]

SatCounter::SatCounter ( unsigned  bits,
uint8_t  initial_val = 0 
)
inlineexplicit

Constructor for the counter.

The explicit keyword is used to make sure the user does not assign a number to the counter thinking it will be used as a counter value when it is in fact used as the number of bits.

Parameters
bitsHow many bits the counter will have.
initial_valStarting value for the counter.

Definition at line 71 of file sat_counter.hh.

References bits(), fatal_if, and SatCounter::maxVal.

◆ saturate()

uint8_t SatCounter::saturate ( )
inline

Saturate the counter.

Returns
The value added to the counter to reach saturation.

Definition at line 315 of file sat_counter.hh.

References SatCounter::counter, and SatCounter::maxVal.

Referenced by TEST().

◆ swap()

void SatCounter::swap ( SatCounter other)
inline

Swap the contents of every member of the class.

Used for the default copy-assignment created by the compiler.

Parameters
otherThe other object to swap contents with.

Definition at line 144 of file sat_counter.hh.

References SatCounter::counter, SatCounter::initialVal, and SatCounter::maxVal.

Referenced by SatCounter::operator=().


Generated on Wed Sep 30 2020 14:02:20 for gem5 by doxygen 1.8.17