summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/BulkConnectSpec.scala
diff options
context:
space:
mode:
authorJack2022-04-26 02:53:08 +0000
committerJack2022-04-26 02:53:08 +0000
commit3a6cc75d72cbf890bbd45a002c31d16abfc6896d (patch)
tree298a39cbdbcd7e89953d75dbd840884f29ff7699 /src/test/scala/chiselTests/BulkConnectSpec.scala
parentbe1ac06bf20c6c3d84c8ce5b0a50e2980e546e7e (diff)
parentd5a964f6e7beea1f38f9623224fc65e2397e1fe7 (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/test/scala/chiselTests/BulkConnectSpec.scala')
-rw-r--r--src/test/scala/chiselTests/BulkConnectSpec.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/BulkConnectSpec.scala b/src/test/scala/chiselTests/BulkConnectSpec.scala
index 463122bd..281890d4 100644
--- a/src/test/scala/chiselTests/BulkConnectSpec.scala
+++ b/src/test/scala/chiselTests/BulkConnectSpec.scala
@@ -94,6 +94,26 @@ class BulkConnectSpec extends ChiselPropSpec {
chirrtl should include("deq <= enq")
}
+ property("Chisel connects should not emit a FIRRTL bulk connect for BlackBox IO Bundles") {
+ class MyBundle extends Bundle {
+ val O: Bool = Output(Bool())
+ val I: Bool = Input(Bool())
+ }
+
+ val chirrtl = ChiselStage.emitChirrtl(new Module {
+ val io: MyBundle = IO(Flipped(new MyBundle))
+
+ val bb = Module(new BlackBox {
+ val io: MyBundle = IO(Flipped(new MyBundle))
+ })
+
+ io <> bb.io
+ })
+ // There won't be a bb.io Bundle in FIRRTL, so connections have to be done element-wise
+ chirrtl should include("bb.O <= io.O")
+ chirrtl should include("io.I <= bb.I")
+ }
+
property("MonoConnect should bulk connect undirectioned internal wires") {
val chirrtl = ChiselStage.emitChirrtl(new Module {
val io = IO(new Bundle {})