chisel3.util.Counter
See theCounter companion object
class Counter extends AffectsChiselPrefix
Used to generate an inline (logic directly in the containing Module, no internal Module is created) hardware counter.
Typically instantiated with apply methods in object Counter
Does not create a new Chisel Module
Attributes
- Example
-
val countOn = true.B // increment counter every clock cycle val (counterValue, counterWrap) = Counter(countOn, 4) when (counterValue === 3.U) { ... }// Using Scala Range API val (counterValue, counterWrap) = Counter(0 until 10 by 2) when (counterValue === 4.U) { ... } - Companion
- object
- Source
- Counter.scala
- Graph
-
- Supertypes
Members list
In this article