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/GCD.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/scala/chiselTests/GCD.scala') diff --git a/src/test/scala/chiselTests/GCD.scala b/src/test/scala/chiselTests/GCD.scala index d683ce34..c20d26ad 100644 --- a/src/test/scala/chiselTests/GCD.scala +++ b/src/test/scala/chiselTests/GCD.scala @@ -9,14 +9,14 @@ import org.scalatest.prop._ class GCD extends Module { val io = IO(new Bundle { - val a = Input(UInt.width(32)) - val b = Input(UInt.width(32)) + val a = Input(UInt(32.W)) + val b = Input(UInt(32.W)) val e = Input(Bool()) - val z = Output(UInt.width(32)) + val z = Output(UInt(32.W)) val v = Output(Bool()) }) - val x = Reg(UInt.width( 32)) - val y = Reg(UInt.width( 32)) + val x = Reg(UInt(32.W)) + val y = Reg(UInt(32.W)) when (x > y) { x := x -% y } .otherwise { y := y -% x } when (io.e) { x := io.a; y := io.b } @@ -30,7 +30,7 @@ class GCDTester(a: Int, b: Int, z: Int) extends BasicTester { dut.io.a := a.U dut.io.b := b.U dut.io.e := first - when(first) { first := Bool(false) } + when(first) { first := false.B } when(!first && dut.io.v) { assert(dut.io.z === z.U) stop() -- cgit v1.2.3