summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Decoder.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/chiselTests/Decoder.scala')
-rw-r--r--src/test/scala/chiselTests/Decoder.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/Decoder.scala b/src/test/scala/chiselTests/Decoder.scala
index ff73a676..ff6c83b9 100644
--- a/src/test/scala/chiselTests/Decoder.scala
+++ b/src/test/scala/chiselTests/Decoder.scala
@@ -15,14 +15,14 @@ class Decoder(bitpats: List[String]) extends Module {
val inst = Input(UInt(32.W))
val matched = Output(Bool())
})
- io.matched := Vec(bitpats.map(BitPat(_) === io.inst)).reduce(_||_)
+ io.matched := VecInit(bitpats.map(BitPat(_) === io.inst)).reduce(_||_)
}
class DecoderTester(pairs: List[(String, String)]) extends BasicTester {
val (insts, bitpats) = pairs.unzip
val (cnt, wrap) = Counter(true.B, pairs.size)
val dut = Module(new Decoder(bitpats))
- dut.io.inst := Vec(insts.map(_.asUInt))(cnt)
+ dut.io.inst := VecInit(insts.map(_.asUInt))(cnt)
when(!dut.io.matched) {
assert(cnt === 0.U)
stop()