From e07248b8f6022fafdb84f5d1c0ebe3fc90a5475a Mon Sep 17 00:00:00 2001 From: Richard Lin Date: Thu, 13 Apr 2017 22:59:00 -0700 Subject: Module Hierarchy Refactor (#469) --- .../scala/chiselTests/CompileOptionsTest.scala | 76 ---------------------- 1 file changed, 76 deletions(-) (limited to 'src/test/scala/chiselTests/CompileOptionsTest.scala') diff --git a/src/test/scala/chiselTests/CompileOptionsTest.scala b/src/test/scala/chiselTests/CompileOptionsTest.scala index 63e6b9d1..102653af 100644 --- a/src/test/scala/chiselTests/CompileOptionsTest.scala +++ b/src/test/scala/chiselTests/CompileOptionsTest.scala @@ -14,10 +14,6 @@ class CompileOptionsSpec extends ChiselFlatSpec { abstract class StrictModule extends Module()(chisel3.core.ExplicitCompileOptions.Strict) abstract class NotStrictModule extends Module()(chisel3.core.ExplicitCompileOptions.NotStrict) - // Generate a set of options that do not have requireIOWrap enabled, in order to - // ensure its definition comes from the implicit options passed to the Module constructor. - val strictWithoutIOWrapVal = chisel3.core.ExplicitCompileOptions.Strict.copy(requireIOWrap = false) - class SmallBundle extends Bundle { val f1 = UInt(4.W) val f2 = UInt(5.W) @@ -95,19 +91,6 @@ class CompileOptionsSpec extends ChiselFlatSpec { io.out := io.in(1) } elaborate { new RequireIOWrapModule() } -} - - "A Module with unwrapped IO when compiled with implicit NotStrict.CompileOption " should "not throw an exception" in { - import chisel3.core.ExplicitCompileOptions.NotStrict - - class RequireIOWrapModule extends Module { - val io = new Bundle { - val in = UInt(32.W).asInput - val out = Bool().asOutput - } - io.out := io.in(1) - } - elaborate { new RequireIOWrapModule() } } "A Module with unwrapped IO when compiled with implicit Strict.CompileOption " should "throw an exception" in { @@ -204,63 +187,4 @@ class CompileOptionsSpec extends ChiselFlatSpec { } elaborate { new DirectionLessConnectionModule() } } - - "A Module with wrapped IO when compiled with explicit Strict.CompileOption " should "not throw an exception" in { - implicit val strictWithoutIOWrap = strictWithoutIOWrapVal - class RequireIOWrapModule extends StrictModule { - val io = IO(new Bundle { - val in = UInt(32.W).asInput - val out = Bool().asOutput - }) - io.out := io.in(1) - } - elaborate { - new RequireIOWrapModule() - } - } - - "A Module with unwrapped IO when compiled with explicit NotStrict.CompileOption " should "not throw an exception" in { - implicit val strictWithoutIOWrap = strictWithoutIOWrapVal - class RequireIOWrapModule extends NotStrictModule { - val io = new Bundle { - val in = UInt(32.W).asInput - val out = Bool().asOutput - } - io.out := io.in(1) - } - elaborate { - new RequireIOWrapModule() - } - } - - "A Module with unwrapped IO when compiled with explicit Strict.CompileOption " should "throw an exception" in { - a [BindingException] should be thrownBy { - implicit val strictWithoutIOWrap = strictWithoutIOWrapVal - class RequireIOWrapModule extends StrictModule { - val io = new Bundle { - val in = UInt(32.W).asInput - val out = Bool().asOutput - } - io.out := io.in(1) - } - elaborate { - new RequireIOWrapModule() - } - } - } - - "A Module with unwrapped IO when compiled with an explicit requireIOWrap false " should "not throw an exception" in { - - val strictNotIOWrap = chisel3.core.ExplicitCompileOptions.Strict.copy(requireIOWrap = false, deprecateOldDirectionMethods = false) - - class NotIOWrapModule extends Module()(strictNotIOWrap) { - val io = new Bundle { - val in = UInt(32.W).asInput - val out = Bool().asOutput - } - } - elaborate { - new NotIOWrapModule() - } - } } -- cgit v1.2.3