| gem5
    | 
Private counter class for the internal saturating counters. More...
#include <sat_counter.hh>
| Public Member Functions | |
| SatCounter () | |
| Constructor for the counter.  More... | |
| SatCounter (unsigned bits) | |
| Constructor for the counter.  More... | |
| SatCounter (unsigned bits, uint8_t initial_val) | |
| Constructor for the counter.  More... | |
| void | setBits (unsigned bits) | 
| Sets the number of bits.  More... | |
| void | reset () | 
| void | increment () | 
| Increments the counter's current value.  More... | |
| void | decrement () | 
| Decrements the counter's current value.  More... | |
| uint8_t | read () const | 
| Read the counter's value.  More... | |
| Private Attributes | |
| uint8_t | initialVal | 
| uint8_t | maxVal | 
| uint8_t | counter | 
Private counter class for the internal saturating counters.
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
Definition at line 44 of file sat_counter.hh.
| 
 | inline | 
Constructor for the counter.
Definition at line 50 of file sat_counter.hh.
| 
 | inline | 
Constructor for the counter.
| bits | How many bits the counter will have. | 
Definition at line 58 of file sat_counter.hh.
| 
 | inline | 
Constructor for the counter.
| bits | How many bits the counter will have. | 
| initial_val | Starting value for each counter. | 
Definition at line 67 of file sat_counter.hh.
| 
 | inline | 
Decrements the counter's current value.
Definition at line 98 of file sat_counter.hh.
References counter.
| 
 | inline | 
Increments the counter's current value.
Definition at line 88 of file sat_counter.hh.
| 
 | inline | 
| 
 | inline | 
Definition at line 83 of file sat_counter.hh.
References counter, and initialVal.
| 
 | inline | 
Sets the number of bits.
Definition at line 81 of file sat_counter.hh.
| 
 | private | 
Definition at line 114 of file sat_counter.hh.
Referenced by decrement(), increment(), read(), and reset().
| 
 | private | 
Definition at line 112 of file sat_counter.hh.
Referenced by reset().
| 
 | private | 
Definition at line 113 of file sat_counter.hh.
Referenced by increment(), SatCounter(), and setBits().