summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Vec.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-20 17:08:55 -0700
committerJim Lawson2016-07-20 17:08:55 -0700
commit1fa57cc3f76bc3e5de7e6b943abe70becdcb2295 (patch)
tree1cea032150aae31fdf7cb995b26724be4b0ceb38 /src/test/scala/chiselTests/Vec.scala
parent2dce378deda1cc33833eb378c89a1c5415817bae (diff)
More literal/width rangling.
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 cdb1ba8d..22b518a2 100644
--- a/src/test/scala/chiselTests/Vec.scala
+++ b/src/test/scala/chiselTests/Vec.scala
@@ -18,9 +18,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 => UInt.Lit(i * 2)))
+ val x = Vec(Array.tabulate(n){ i => UInt.Lit(i * 2) })
+ val u = Vec.tabulate(n)(i => UInt.Lit(i*2))
assert(v.toBits === x.toBits)
assert(v.toBits === u.toBits)
@@ -31,7 +31,7 @@ class TabulateTester(n: Int) extends BasicTester {
class ShiftRegisterTester(n: Int) extends BasicTester {
val (cnt, wrap) = Counter(Bool(true), n*2)
- val shifter = Reg(Vec(n, UInt(width = log2Up(n))))
+ val shifter = Reg(Vec(n, UInt.width(log2Up(n))))
(shifter, shifter drop 1).zipped.foreach(_ := _)
shifter(n-1) := cnt
when (cnt >= UInt.Lit(n)) {