summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/Binding.scala
diff options
context:
space:
mode:
authorJim Lawson2016-08-29 17:04:51 -0700
committerJim Lawson2016-08-29 17:04:51 -0700
commit1973e4d7333e2c57be4bcb7204210ecafdacab93 (patch)
tree9752427bbfa2487dc6250cfb0d2aa8b952c3d24a /chiselFrontend/src/main/scala/chisel3/core/Binding.scala
parent62817134d222747f1eab34626fe7b1bb13b9f6df (diff)
Check module-specific compile options.
Import chisel3.NotStrict.CompileOptions in Chisel package. Add CompileOptions tests.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Binding.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Binding.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Binding.scala b/chiselFrontend/src/main/scala/chisel3/core/Binding.scala
index a32d3ade..b36794f1 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Binding.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Binding.scala
@@ -1,6 +1,6 @@
package chisel3.core
-import chisel3.internal.Builder.compileOptions
+import chisel3.internal.Builder.{compileOptions, forcedModule}
/**
* The purpose of a Binding is to indicate what type of hardware 'entity' a
@@ -91,7 +91,7 @@ object Binding {
element.binding = binder(unbound)
}
// If autoIOWrap is enabled and we're rebinding a PortBinding, just ignore the rebinding.
- case portBound @ PortBinding(_, _) if (!compileOptions.requireIOWrap && binder.isInstanceOf[PortBinder]) =>
+ case portBound @ PortBinding(_, _) if (!(compileOptions.requireIOWrap || forcedModule.compileOptions.requireIOWrap)&& binder.isInstanceOf[PortBinder]) =>
case binding => throw AlreadyBoundException(binding.toString)
}
)
@@ -145,7 +145,7 @@ object Binding {
case binding =>
// The following kludge is an attempt to provide backward compatibility
// It should be done at at higher level.
- if ((compileOptions.requireIOWrap || !elementOfIO(element)))
+ if ((compileOptions.requireIOWrap || forcedModule.compileOptions.requireIOWrap || !elementOfIO(element)))
throw NotSynthesizableException
else
Binding.bind(element, PortBinder(element._parent.get), "Error: IO")