summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/MulLookup.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-20 14:49:35 -0700
committerJim Lawson2016-07-20 14:49:35 -0700
commit2dce378deda1cc33833eb378c89a1c5415817bae (patch)
treee3bc5361030d63e017d065491e9e7e4cf788fe3c /src/test/scala/chiselTests/MulLookup.scala
parent28e80311f172ae4d1d477e8bb47ca3719c9a8fc5 (diff)
Distinguish between ?Int.Lit and ?Int.width
Diffstat (limited to 'src/test/scala/chiselTests/MulLookup.scala')
-rw-r--r--src/test/scala/chiselTests/MulLookup.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/scala/chiselTests/MulLookup.scala b/src/test/scala/chiselTests/MulLookup.scala
index b22b2820..16a29104 100644
--- a/src/test/scala/chiselTests/MulLookup.scala
+++ b/src/test/scala/chiselTests/MulLookup.scala
@@ -9,9 +9,9 @@ import chisel3.testers.BasicTester
class MulLookup(val w: Int) extends Module {
val io = IO(new Bundle {
- val x = Input(UInt(w))
- val y = Input(UInt(w))
- val z = Output(UInt(2 * w))
+ val x = Input(UInt.width(w))
+ val y = Input(UInt.width(w))
+ val z = Output(UInt.width(2 * w))
})
val tbl = Vec(
for {
@@ -24,9 +24,9 @@ class MulLookup(val w: Int) extends Module {
class MulLookupTester(w: Int, x: Int, y: Int) extends BasicTester {
val dut = Module(new MulLookup(w))
- dut.io.x := UInt(x)
- dut.io.y := UInt(y)
- assert(dut.io.z === UInt(x * y))
+ dut.io.x := UInt.Lit(x)
+ dut.io.y := UInt.Lit(y)
+ assert(dut.io.z === UInt.Lit(x * y))
stop()
}