Chisel
Counter Object for Counter
val countOn = Bool(true) // increment counter every clock cycle val myCounter = Counter(8) when ( myCounter.inc() ) { ... // When counter value is max at 7 do something }
Get a counter which takes an input Bool of when to increment
a UInt which is the value of the counter and a Bool indicating when the counter resets
Counter Object for Counter