CounterΒΆ

Counter is a single hardware counter with an associated start (inclusive), end (exclusive), step size, and parallelization factor. By default, the parallelization factor is assumed to be a design parameter. Counters can be chained together using CounterChain, but this is typically done implicitly when creating controllers.

It is generally recommended to create a Range and allow the compiler to implicitly convert this to a Counter, as Range provides slightly better syntax sugar.


Static Methods

object Counter
def apply(end: Index): Counter
Creates a Counter with start of 0, given end, and step size of 1.
def apply(start: Index, end: Index): Counter
Creates a Counter with given start and end, and step size of 1.
def apply(start: Index, end: Index, step: Index): Counter
Creates a Counter with given start, end, and step size.
def apply(start: Index, end: Index, step: Index, par: Index): Counter
Creates a Counter with given start, end, step, and par parallelization factor.