31 #ifndef __CPU_PRED_SAT_COUNTER_HH__
32 #define __CPU_PRED_SAT_COUNTER_HH__
73 if (initial_val >
maxVal) {
74 fatal(
"BP: Initial counter value exceeds max size.");
117 #endif // __CPU_PRED_SAT_COUNTER_HH__
SatCounter()
Constructor for the counter.
SatCounter(unsigned bits, uint8_t initial_val)
Constructor for the counter.
void increment()
Increments the counter's current value.
SatCounter(unsigned bits)
Constructor for the counter.
uint8_t read() const
Read the counter's value.
void decrement()
Decrements the counter's current value.
Private counter class for the internal saturating counters.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
void setBits(unsigned bits)
Sets the number of bits.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...