summaryrefslogtreecommitdiff
path: root/core/src/main/scala/chisel3/BlackBox.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/chisel3/BlackBox.scala')
-rw-r--r--core/src/main/scala/chisel3/BlackBox.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/chisel3/BlackBox.scala b/core/src/main/scala/chisel3/BlackBox.scala
index b204e301..1b093ee1 100644
--- a/core/src/main/scala/chisel3/BlackBox.scala
+++ b/core/src/main/scala/chisel3/BlackBox.scala
@@ -165,7 +165,8 @@ abstract class BlackBox(val params: Map[String, Param] = Map.empty[String, Param
// Long term solution will be to define BlackBox IO differently as part of
// it not descending from the (current) Module
for ((name, port) <- namedPorts) {
- port.setRef(ModuleIO(this, _namespace.name(name)))
+ // We have to force override the _ref because it was set during IO binding
+ port.setRef(ModuleIO(this, _namespace.name(name)), force = true)
}
// We need to call forceName and onModuleClose on all of the sub-elements