diff options
| -rw-r--r-- | src/test/scala/chiselTests/CompileOptionsTest.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompileOptionsTest.scala b/src/test/scala/chiselTests/CompileOptionsTest.scala index 5b27bf90..70843c3e 100644 --- a/src/test/scala/chiselTests/CompileOptionsTest.scala +++ b/src/test/scala/chiselTests/CompileOptionsTest.scala @@ -5,6 +5,7 @@ package chiselTests import org.scalatest._ import chisel3._ import chisel3.core.Binding.BindingException +import chisel3.internal.ExplicitCompileOptions import chisel3.testers.BasicTester class CompileOptionsSpec extends ChiselFlatSpec { @@ -236,4 +237,29 @@ class CompileOptionsSpec extends ChiselFlatSpec { } } } + + "A Module with unwrapped IO when compiled with an explicit requireIOWrap false " should "not throw an exception" in { + + object StrictNotIOWrap { + + implicit object CompileOptions extends ExplicitCompileOptions { + val connectFieldsMustMatch = true + val declaredTypeMustBeUnbound = true + val requireIOWrap = false + val dontTryConnectionsSwapped = true + val dontAssumeDirectionality = true + } + + } + class NotIOWrapModule extends Module()(StrictNotIOWrap.CompileOptions) { + val io = new Bundle { + val in = UInt(width = 32).asInput + val out = Bool().asOutput + } + io.out := io.in(1) + } + elaborate { + new NotIOWrapModule() + } + } } |
