summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Decoder.scala
diff options
context:
space:
mode:
authorducky2018-01-19 19:19:43 -0800
committerRichard Lin2018-01-19 21:39:36 -0800
commit70ca35b9d7b3884e5f701d49bc5286f89701fd14 (patch)
tree018a4d886b146e326c7dbabf51056a71dd6ccd7d /src/test/scala/chiselTests/Decoder.scala
parent6b277ff0c3266e9b02fe9b483086ab46085202ce (diff)
Fix deprecations in tests
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()