Unverified Commit fca89f6c authored by Josh Bassett's avatar Josh Bassett Committed by GitHub
Browse files

Allow a counter to be instantiated using a Scala range (#1515)



* Add positive range generator

* Allow the Counter module to be instantiated with a Scala range

* Use head/last to determine counter width

Co-authored-by: default avatarJack Koenig <jack.koenig3@gmail.com>

* Let counter overflow naturally when appropriate

We only need to explicitly wrap counters that don't start at zero, or end on a power of two. Otherwise we just let the counter overflow naturally to avoid wasting an extra mux.

* Require counter range to be non-empty

Co-authored-by: default avatarJack Koenig <jack.koenig3@gmail.com>
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 164490c8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment