|
gem5
v20.1.0.5
|
Implements an n bit saturating counter and provides methods to increment, decrement, and read it. More...
#include <sat_counter.hh>
Public Member Functions | |
| SatCounter ()=delete | |
| The default constructor should never be used. More... | |
| SatCounter (unsigned bits, uint8_t initial_val=0) | |
| Constructor for the counter. More... | |
| SatCounter (const SatCounter &other) | |
| Copy constructor. More... | |
| SatCounter & | operator= (const SatCounter &other) |
| Copy assignment. More... | |
| SatCounter (SatCounter &&other) | |
| Move constructor. More... | |
| SatCounter & | operator= (SatCounter &&other) |
| Move assignment. More... | |
| void | swap (SatCounter &other) |
| Swap the contents of every member of the class. More... | |
| SatCounter & | operator++ () |
| Pre-increment operator. More... | |
| SatCounter | operator++ (int) |
| Post-increment operator. More... | |
| SatCounter & | operator-- () |
| Pre-decrement operator. More... | |
| SatCounter | operator-- (int) |
| Post-decrement operator. More... | |
| SatCounter & | operator>>= (const int &shift) |
| Shift-right-assignment. More... | |
| SatCounter & | operator<<= (const int &shift) |
| Shift-left-assignment. More... | |
| SatCounter & | operator+= (const int &value) |
| Add-assignment. More... | |
| SatCounter & | operator-= (const int &value) |
| Subtract-assignment. More... | |
| operator uint8_t () const | |
| Read the counter's value. More... | |
| void | reset () |
| Reset the counter to its initial value. More... | |
| double | calcSaturation () const |
| Calculate saturation percentile of the current counter's value with regard to its maximum possible value. More... | |
| bool | isSaturated () const |
| Whether the counter has achieved its maximum value or not. More... | |
| uint8_t | saturate () |
| Saturate the counter. More... | |
Private Attributes | |
| uint8_t | initialVal |
| uint8_t | maxVal |
| uint8_t | counter |
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
Definition at line 54 of file sat_counter.hh.
|
delete |
The default constructor should never be used.
|
private |
Definition at line 325 of file sat_counter.hh.
Referenced by calcSaturation(), Prefetcher::SignaturePath::PatternEntry::getStrideEntry(), Prefetcher::SignaturePathV2::increasePatternEntryCounter(), isSaturated(), operator uint8_t(), operator++(), operator+=(), operator--(), operator-=(), operator<<=(), operator=(), operator>>=(), reset(), SatCounter(), saturate(), and swap().
|
private |
Definition at line 323 of file sat_counter.hh.
Referenced by operator=(), reset(), SatCounter(), and swap().
|
private |
Definition at line 324 of file sat_counter.hh.
Referenced by calcSaturation(), isSaturated(), operator++(), operator+=(), operator<<=(), operator=(), SatCounter(), saturate(), and swap().