Instantiate a counter with the specified number of counts and a gate.
Instantiate a counter with the specified number of counts and a gate.
condition that controls whether the counter increments this cycle
number of counts before the counter resets
tuple of the counter value and whether the counter will wrap (the value is at maximum and the condition is true).
val countOn = true.B // increment counter every clock cycle val (counterValue, counterWrap) = Counter(countOn, 4) when (counterValue === 3.U) { ... }
Instantiate a counter with the specified number of counts.