From bd9276f4f78c712e98b658ad9e0df81abf94c57b Mon Sep 17 00:00:00 2001 From: ducky Date: Mon, 26 Sep 2016 14:12:05 -0700 Subject: Add Strict default for compile options --- .../src/main/scala/chisel3/internal/CompileOptions.scala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chiselFrontend') 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" -- cgit v1.2.3