summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/Counter.scala
diff options
context:
space:
mode:
authorAditya Naik2024-06-03 19:41:04 -0700
committerAditya Naik2024-06-03 19:41:04 -0700
commit52824ce57e9d60fe6ef721cfb073249e654dcf46 (patch)
tree1763ea303391b0cf1c0e4e21e7b7d3626f4d64fb /src/main/scala/chisel3/util/Counter.scala
parenta529d0e962cbe6a8f32dcc87d5193df46c0ebc94 (diff)
fix stuff in src/
build is failing with a compile error in 3.3.3 due to something in Aggregate.scala. reduce to smallest form and file a bug report maybe?
Diffstat (limited to 'src/main/scala/chisel3/util/Counter.scala')
-rw-r--r--src/main/scala/chisel3/util/Counter.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/util/Counter.scala b/src/main/scala/chisel3/util/Counter.scala
index be6e3257..ba9466e1 100644
--- a/src/main/scala/chisel3/util/Counter.scala
+++ b/src/main/scala/chisel3/util/Counter.scala
@@ -55,7 +55,9 @@ class Counter private (r: Range, oldN: Option[Int] = None) extends AffectsChisel
*
* @param n number of steps before the counter resets
*/
- def this(n: Int) { this(0 until math.max(1, n), Some(n)) }
+ def this(n: Int) = {
+ this(0 until math.max(1, n), Some(n))
+ }
/** The current value of the counter. */
val value = if (r.length > 1) RegInit(r.head.U(width.W)) else WireInit(r.head.U)