From 54d3f8dc054e55dfbd01d1aa034169a3dabe89f2 Mon Sep 17 00:00:00 2001 From: ducky Date: Thu, 17 Nov 2016 13:01:03 -0800 Subject: Restyle a lot of test code, mainly with regex --- src/test/scala/chiselTests/Counter.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/scala/chiselTests/Counter.scala') diff --git a/src/test/scala/chiselTests/Counter.scala b/src/test/scala/chiselTests/Counter.scala index 69d8a44a..cccd8c0e 100644 --- a/src/test/scala/chiselTests/Counter.scala +++ b/src/test/scala/chiselTests/Counter.scala @@ -11,18 +11,18 @@ import chisel3.util._ class CountTester(max: Int) extends BasicTester { val cnt = Counter(max) - when(Bool(true)) { cnt.inc() } + when(true.B) { cnt.inc() } when(cnt.value === UInt(max-1)) { stop() } } class EnableTester(seed: Int) extends BasicTester { - val ens = Reg(init = UInt(seed)) + val ens = Reg(init = seed.asUInt) ens := ens >> 1 val (cntEnVal, _) = Counter(ens(0), 32) - val (_, done) = Counter(Bool(true), 33) + val (_, done) = Counter(true.B, 33) when(done) { assert(cntEnVal === UInt(popCount(seed))) @@ -31,7 +31,7 @@ class EnableTester(seed: Int) extends BasicTester { } class WrapTester(max: Int) extends BasicTester { - val (cnt, wrap) = Counter(Bool(true), max) + val (cnt, wrap) = Counter(true.B, max) when(wrap) { assert(cnt === UInt(max - 1)) stop() -- cgit v1.2.3