From b2373ebda5e63fa850de21585307013f8419320a Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 5 Oct 2016 15:18:25 -0700 Subject: Make asInput/asOutput/flip deprecation warnings dynamic Code that imports Chisel._ shouldn't see them. Not sure if requireIOWrap is the right condition... or if cyan is a good choice of color for deprecation warnings. --- chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala') diff --git a/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala b/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala index 0e66a241..85aa8cdc 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala @@ -17,6 +17,9 @@ trait CompileOptions { val dontTryConnectionsSwapped: Boolean // If connection directionality is not explicit, do not use heuristics to attempt to determine it. val dontAssumeDirectionality: Boolean + // Issue a deprecation warning if Data.{flip, asInput,asOutput} is used + // instead of Flipped, Input, or Output. + val deprecateOldDirectionMethods: Boolean } object CompileOptions { @@ -34,6 +37,7 @@ object ExplicitCompileOptions { val requireIOWrap = false val dontTryConnectionsSwapped = false val dontAssumeDirectionality = false + val deprecateOldDirectionMethods = false } // Collection of "strict" connection compile options, preferred for new code. @@ -44,5 +48,6 @@ object ExplicitCompileOptions { val requireIOWrap = true val dontTryConnectionsSwapped = true val dontAssumeDirectionality = true + val deprecateOldDirectionMethods = true } } -- cgit v1.2.3 From a18002c879d14b6c51cd49311a3b2a99a6a204fc Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 5 Oct 2016 14:16:13 -0700 Subject: Give <> and := legacy behavior in compatibility mode --- chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala') diff --git a/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala b/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala index 85aa8cdc..4dea39b5 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/CompileOptions.scala @@ -20,6 +20,8 @@ trait CompileOptions { // Issue a deprecation warning if Data.{flip, asInput,asOutput} is used // instead of Flipped, Input, or Output. val deprecateOldDirectionMethods: Boolean + // Check that referenced Data have actually been declared. + val checkSynthesizable: Boolean } object CompileOptions { @@ -38,6 +40,7 @@ object ExplicitCompileOptions { val dontTryConnectionsSwapped = false val dontAssumeDirectionality = false val deprecateOldDirectionMethods = false + val checkSynthesizable = false } // Collection of "strict" connection compile options, preferred for new code. @@ -49,5 +52,6 @@ object ExplicitCompileOptions { val dontTryConnectionsSwapped = true val dontAssumeDirectionality = true val deprecateOldDirectionMethods = true + val checkSynthesizable = true } } -- cgit v1.2.3