chipsalliance / chipsalliance/chisel
Chisel Counter more than 32 bits.
- Dominant language
- Scala
- Stars
- 4.8k
- Forks
- 658
- Avg merge
- 18h 59m
- Merged PRs (30d)
- 14
Description
**Type of issue**: Feature Request
**Is your feature request related to a problem? Please describe.**
[`Counter()`](https://github.com/chipsalliance/chisel3/blob/master/src/main/scala/chisel3/util/Counter.scala) can't count more than 32 bits integer `Int`.
**Describe the solution you'd like**
As Jack described it on [stackoverflow](https://stackoverflow.com/a/74606457/4422957), API should take NumericRange[BigInt] instead of just `Range`.
**Describe alternatives you've considered**
For the moment, the workarround is simply to count «by hand» :
```scala
val counterValue = RegInit(0.U(countersize.W))
counterValue := counterValue + 1.U
```
**What is the use case for implementing this feature?**
Big counter can be usefull for lots of cases.
Contributor guide
Assessment
This issue has not been assessed yet.