summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Decoder.scala
diff options
context:
space:
mode:
authorJim Lawson2016-12-12 09:14:33 -0800
committerGitHub2016-12-12 09:14:33 -0800
commitb581a24728bfba0c39ed2c032fd86f628a1e1a50 (patch)
treef625219f936d39e760192aa69df17e776b95dd56 /src/test/scala/chiselTests/Decoder.scala
parent0bd9ae059368570dc72f25f7939afa5cfe5fd06e (diff)
parentad53161bbb9f67e16b88ca7a508a537f88d77e05 (diff)
Merge branch 'master' into buildinfousepackageaspath
Diffstat (limited to 'src/test/scala/chiselTests/Decoder.scala')
-rw-r--r--src/test/scala/chiselTests/Decoder.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/scala/chiselTests/Decoder.scala b/src/test/scala/chiselTests/Decoder.scala
index b50a80c0..ff73a676 100644
--- a/src/test/scala/chiselTests/Decoder.scala
+++ b/src/test/scala/chiselTests/Decoder.scala
@@ -12,7 +12,7 @@ import chisel3.util._
class Decoder(bitpats: List[String]) extends Module {
val io = IO(new Bundle {
- val inst = Input(UInt.width(32))
+ val inst = Input(UInt(32.W))
val matched = Output(Bool())
})
io.matched := Vec(bitpats.map(BitPat(_) === io.inst)).reduce(_||_)
@@ -20,11 +20,11 @@ class Decoder(bitpats: List[String]) extends Module {
class DecoderTester(pairs: List[(String, String)]) extends BasicTester {
val (insts, bitpats) = pairs.unzip
- val (cnt, wrap) = Counter(Bool(true), pairs.size)
+ val (cnt, wrap) = Counter(true.B, pairs.size)
val dut = Module(new Decoder(bitpats))
- dut.io.inst := Vec(insts.map(UInt(_)))(cnt)
+ dut.io.inst := Vec(insts.map(_.asUInt))(cnt)
when(!dut.io.matched) {
- assert(cnt === UInt(0))
+ assert(cnt === 0.U)
stop()
}
when(wrap) {