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