summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Vec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/chiselTests/Vec.scala')
-rw-r--r--src/test/scala/chiselTests/Vec.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/chiselTests/Vec.scala b/src/test/scala/chiselTests/Vec.scala
index 0d5a2188..90e337a8 100644
--- a/src/test/scala/chiselTests/Vec.scala
+++ b/src/test/scala/chiselTests/Vec.scala
@@ -13,7 +13,7 @@ import chisel3.util._
class ValueTester(w: Int, values: List[Int]) extends BasicTester {
val v = Vec(values.map(UInt(_, width = w))) // TODO: does this need a Wire? Why no error?
for ((a,b) <- v.zip(values)) {
- assert(a === UInt(b))
+ assert(a === b.asUInt)
}
stop()
}
@@ -31,12 +31,12 @@ class TabulateTester(n: Int) extends BasicTester {
}
class ShiftRegisterTester(n: Int) extends BasicTester {
- val (cnt, wrap) = Counter(Bool(true), n*2)
+ val (cnt, wrap) = Counter(true.B, n*2)
val shifter = Reg(Vec(n, UInt.width(log2Up(n))))
(shifter, shifter drop 1).zipped.foreach(_ := _)
shifter(n-1) := cnt
- when (cnt >= UInt(n)) {
- val expected = cnt - UInt(n)
+ when (cnt >= n.asUInt) {
+ val expected = cnt - n.asUInt
assert(shifter(0) === expected)
}
when (wrap) {