summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Lawson2016-08-30 10:17:18 -0700
committerJim Lawson2016-08-30 10:17:18 -0700
commit1379a192ca1f6c05aeba454b81e19fb8356e6cf3 (patch)
treea91454c84271488ddf8a349cd457366f3e2da7fa
parent55719f690e637700579867edb8f90fae4d3a42ef (diff)
Add example of specific CompileOptions settings to tests.
-rw-r--r--src/test/scala/chiselTests/CompileOptionsTest.scala26
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()
+ }
+ }
}