summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/Counter.scala
diff options
context:
space:
mode:
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)