summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Koenig2019-12-06 12:11:28 -0800
committermergify[bot]2019-12-06 20:11:28 +0000
commit69ae14b485c67834ad3c9c518ef080cf75ce9b1d (patch)
tree79e09d309b51dbc9ecdfd442c968b89bf81079c2
parent03bbb258a4ce6800b692e20a579757e4f054fa63 (diff)
Revert "Compat compile options macro (#1253)" (#1268)
This reverts commit 85fe90d5b7ed4e1101b0b3959a1d362eb93915ac.
-rw-r--r--src/main/scala/chisel3/compatibility.scala22
-rw-r--r--src/test/scala/chiselTests/CompatibilitySpec.scala13
2 files changed, 3 insertions, 32 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index 432446cb..02dfa329 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -9,17 +9,11 @@ package object Chisel { // scalastyle:ignore package.object.name number.of.t
import chisel3.internal.firrtl.Width
import scala.language.experimental.macros
- import scala.reflect.macros.blackbox.Context
- import scala.annotation.{StaticAnnotation, compileTimeOnly}
+ import scala.annotation.StaticAnnotation
+ import scala.annotation.compileTimeOnly
import scala.language.implicitConversions
-
- /** Default NotStrict CompileOptions for compatibility code
- *
- * No longer implicit, materialization macro below provides a low-priority default
- */
- @deprecated("Use chisel3.ExplicitCompileOptions.NotStrict", "3.3")
- val defaultCompileOptions = chisel3.ExplicitCompileOptions.NotStrict
+ implicit val defaultCompileOptions = chisel3.ExplicitCompileOptions.NotStrict
abstract class Direction
case object INPUT extends Direction
@@ -590,16 +584,6 @@ package object Chisel { // scalastyle:ignore package.object.name number.of.t
val Pipe = chisel3.util.Pipe
type Pipe[T <: Data] = chisel3.util.Pipe[T]
- /** Provides a low priority NotStrict default. Can be overridden by providing a custom implicit
- * val in lexical scope (ie. imported)
- * Implemented as a macro to provide a low-priority default
- */
- implicit def materializeCompileOptions: CompileOptions = macro materializeCompileOptions_impl
-
- def materializeCompileOptions_impl(c: Context): c.Tree = {
- import c.universe._
- q"_root_.chisel3.ExplicitCompileOptions.NotStrict"
- }
/** Package for experimental features, which may have their API changed, be removed, etc.
*
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala
index b0f22774..d2b39c49 100644
--- a/src/test/scala/chiselTests/CompatibilitySpec.scala
+++ b/src/test/scala/chiselTests/CompatibilitySpec.scala
@@ -118,19 +118,6 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks
}
elaborate { new Dummy }
}
-
- it should "be able to provide custom CompileOptions" in {
- implicit val CustomCompileOptions = chisel3.ExplicitCompileOptions.NotStrict.copy(inferModuleReset = true)
- // Top-level Module always uses Bool so needs to be an inner Module
- elaborate(new Module {
- val io = IO(new Bundle {})
- val inst = Module(new Module {
- val io = IO(new Bundle {})
- assert(reset.isInstanceOf[chisel3.ResetType])
- })
- })
- }
-
// Verify we can elaborate a design expressed in Chisel2
class Chisel2CompatibleRisc extends Module {
val io = new Bundle {