summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Lawson2016-09-26 17:14:39 -0700
committerGitHub2016-09-26 17:14:39 -0700
commit0c73611321cf12ff07c68e867f94430a329075e7 (patch)
tree7e154d0bad704edf087e03c59e92248b10893360
parent3e174cc55be350a06e6e95ac6505a77167bd5a29 (diff)
parentbd9276f4f78c712e98b658ad9e0df81abf94c57b (diff)
Merge pull request #295 from ucb-bar/gsdt-defaultco
Add Strict default for compile options, onto gsdt
-rw-r--r--chiselFrontend/src/main/scala/chisel3/internal/CompileOptions.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/internal/CompileOptions.scala b/chiselFrontend/src/main/scala/chisel3/internal/CompileOptions.scala
index 2890f6dc..2b913908 100644
--- a/chiselFrontend/src/main/scala/chisel3/internal/CompileOptions.scala
+++ b/chiselFrontend/src/main/scala/chisel3/internal/CompileOptions.scala
@@ -2,6 +2,9 @@
package chisel3.internal
+import scala.language.experimental.macros
+import scala.reflect.macros.blackbox.Context
+
trait CompileOptions {
// Should Bundle connections require a strict match of fields.
// If true and the same fields aren't present in both source and sink, a MissingFieldException,
@@ -15,6 +18,11 @@ trait CompileOptions {
trait ExplicitCompileOptions extends CompileOptions
+object ExplicitCompileOptions {
+ // Provides a low priority Strict default. Can be overridden by importing the NotStrict option.
+ implicit def materialize: ExplicitCompileOptions = chisel3.Strict.CompileOptions
+}
+
///** Initialize compilation options from a string map.
// *
// * @param optionsMap the map from "option" to "value"