diff options
Diffstat (limited to 'src/main/scala/firrtl/passes/Checks.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/Checks.scala | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/passes/Checks.scala b/src/main/scala/firrtl/passes/Checks.scala index 5f58b7f1..85ed7de0 100644 --- a/src/main/scala/firrtl/passes/Checks.scala +++ b/src/main/scala/firrtl/passes/Checks.scala @@ -551,7 +551,7 @@ object CheckFlows extends Pass { case SourceFlow => "source" case SinkFlow => "sink" case UnknownFlow => "unknown" - case DuplexFlow => "sourceOrSink" + case DuplexFlow => "duplex" } class WrongFlow(info:Info, mname: String, expr: String, wrong: Flow, right: Flow) extends PassException( @@ -645,3 +645,20 @@ object CheckFlows extends Pass { c } } + +@deprecated("Use 'CheckFlows'. This object will be removed in 1.3", "1.2") +object CheckGenders { + + implicit def toStr(g: Gender): String = g match { + case MALE => "source" + case FEMALE => "sink" + case UNKNOWNGENDER => "unknown" + case BIGENDER => "sourceOrSink" + } + + def run(c: Circuit): Circuit = CheckFlows.run(c) + + @deprecated("Use 'CheckFlows.WrongFlow'. This class will be removed in 1.3", "1.2") + class WrongGender(info:Info, mname: String, expr: String, wrong: Flow, right: Flow) extends PassException( + s"$info: [module $mname] Expression $expr is used as a $wrong but can only be used as a $right.") +} |
