summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/MixedVecSpec.scala
diff options
context:
space:
mode:
authorJack2022-03-15 19:37:37 +0000
committerJack2022-03-15 19:37:37 +0000
commit2f21943ff772da2171df866d4cee71dfa8127bf8 (patch)
treed00c9059c9361920036e784425641288782515d5 /src/test/scala/chiselTests/MixedVecSpec.scala
parent1876e740a48be2e5ff5bd4fd6c2018927f1dcec2 (diff)
parentf26df23bbe0ae9b7162ed70369f24b01d75a1493 (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/test/scala/chiselTests/MixedVecSpec.scala')
-rw-r--r--src/test/scala/chiselTests/MixedVecSpec.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/MixedVecSpec.scala b/src/test/scala/chiselTests/MixedVecSpec.scala
index 16efafd4..ee19d653 100644
--- a/src/test/scala/chiselTests/MixedVecSpec.scala
+++ b/src/test/scala/chiselTests/MixedVecSpec.scala
@@ -280,4 +280,20 @@ class MixedVecSpec extends ChiselPropSpec with Utils {
})
}
}
+
+ property("MixedVec connections should emit FIRRTL bulk connects when possible") {
+ val chirrtl = ChiselStage.emitChirrtl(new Module {
+ val io = IO(new Bundle {
+ val inMono = Input(MixedVec(Seq(UInt(8.W), UInt(16.W), UInt(4.W), UInt(7.W))))
+ val outMono = Output(MixedVec(Seq(UInt(8.W), UInt(16.W), UInt(4.W), UInt(7.W))))
+ val inBi = Input(MixedVec(Seq(UInt(8.W), UInt(16.W), UInt(4.W), UInt(7.W))))
+ val outBi = Output(MixedVec(Seq(UInt(8.W), UInt(16.W), UInt(4.W), UInt(7.W))))
+ })
+ // Explicit upcast avoids weird issue where Scala 2.12 overloading resolution calls version of := accepting Seq[T] instead of normal Data version
+ io.outMono := (io.inMono: Data)
+ io.outBi <> io.inBi
+ })
+ chirrtl should include("io.outMono <= io.inMono @[MixedVecSpec.scala")
+ chirrtl should include("io.outBi <= io.inBi @[MixedVecSpec.scala")
+ }
}