summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/GCD.scala
diff options
context:
space:
mode:
authorducky2016-11-17 13:01:03 -0800
committerducky2016-11-21 13:31:12 -0800
commit54d3f8dc054e55dfbd01d1aa034169a3dabe89f2 (patch)
tree7f6f9de04de6eb08878ac46be339fefc2a71395f /src/test/scala/chiselTests/GCD.scala
parentcd904da0aa0e96ba679906a3ee5dbdc068eace48 (diff)
Restyle a lot of test code, mainly with regex
Diffstat (limited to 'src/test/scala/chiselTests/GCD.scala')
-rw-r--r--src/test/scala/chiselTests/GCD.scala12
1 files changed, 6 insertions, 6 deletions
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()