From 32430bcfc49b0293748ba3f6e5000a45a3dcce92 Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Fri, 1 Apr 2022 17:24:56 +0000 Subject: Prevent FIRRTL bulk connects on BlackBox Bundles. (#2468) (#2469) (cherry picked from commit 4da1e89f3a0b79adcb39ea5defb393ed6c00fa2f) Co-authored-by: fzi-hielscher <47524191+fzi-hielscher@users.noreply.github.com>--- core/src/main/scala/chisel3/internal/BiConnect.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/src/main') diff --git a/core/src/main/scala/chisel3/internal/BiConnect.scala b/core/src/main/scala/chisel3/internal/BiConnect.scala index a8b425f5..2d6c9e4a 100644 --- a/core/src/main/scala/chisel3/internal/BiConnect.scala +++ b/core/src/main/scala/chisel3/internal/BiConnect.scala @@ -285,7 +285,13 @@ private[chisel3] object BiConnect { case _ => true } - typeCheck && contextCheck && bindingCheck && flow_check && sourceNotLiteralCheck + // do not bulk connect the 'io' pseudo-bundle of a BlackBox since it will be decomposed in FIRRTL + def blackBoxCheck = Seq(source, sink).map(_._parent).forall { + case Some(_: BlackBox) => false + case _ => true + } + + typeCheck && contextCheck && bindingCheck && flow_check && sourceNotLiteralCheck && blackBoxCheck } // These functions (finally) issue the connection operation -- cgit v1.2.3