From 794812fc2f18767416c2d4c39605f4d8016cc4dc Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Fri, 7 Jul 2017 13:00:47 -0700 Subject: Ensure IO is non-null before attempting to autoWrapPorts. (#643) --- src/main/scala/chisel3/compatibility.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala index b9357bbd..4223d63b 100644 --- a/src/main/scala/chisel3/compatibility.scala +++ b/src/main/scala/chisel3/compatibility.scala @@ -238,7 +238,7 @@ package object Chisel { // scalastyle:ignore package.object.name this(Option(_clock), Option(_reset))(moduleCompileOptions) override def _autoWrapPorts() = { - if (!_ioPortBound()) { + if (!_ioPortBound() && io != null) { IO(io) } } -- cgit v1.2.3