summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Vec.scala
diff options
context:
space:
mode:
authorducky2016-11-17 13:16:40 -0800
committerducky2016-11-21 13:31:12 -0800
commit37a569372c70a651c813d0beb44124878a596e73 (patch)
treec5a691564f37110e1c056227a9d0818ea337af69 /src/test/scala/chiselTests/Vec.scala
parent73906fcc796b259c81d5df7733968b77fbb81ba8 (diff)
Fix all deprecations from new style
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 c621c1e1..4822d892 100644
--- a/src/test/scala/chiselTests/Vec.scala
+++ b/src/test/scala/chiselTests/Vec.scala
@@ -19,9 +19,9 @@ class ValueTester(w: Int, values: List[Int]) extends BasicTester {
}
class TabulateTester(n: Int) extends BasicTester {
- val v = Vec(Range(0, n).map(i => UInt(i * 2)))
- val x = Vec(Array.tabulate(n){ i => UInt(i * 2) })
- val u = Vec.tabulate(n)(i => UInt(i*2))
+ val v = Vec(Range(0, n).map(i => (i*2).asUInt))
+ val x = Vec(Array.tabulate(n){ i => (i*2).asUInt })
+ val u = Vec.tabulate(n)(i => (i*2).asUInt)
assert(v.asUInt() === x.asUInt())
assert(v.asUInt() === u.asUInt())
@@ -32,7 +32,7 @@ class TabulateTester(n: Int) extends BasicTester {
class ShiftRegisterTester(n: Int) extends BasicTester {
val (cnt, wrap) = Counter(true.B, n*2)
- val shifter = Reg(Vec(n, UInt.width(log2Up(n))))
+ val shifter = Reg(Vec(n, UInt(log2Up(n).W)))
(shifter, shifter drop 1).zipped.foreach(_ := _)
shifter(n-1) := cnt
when (cnt >= n.asUInt) {