aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/WIR.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/firrtl/WIR.scala')
-rw-r--r--src/main/scala/firrtl/WIR.scala19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/main/scala/firrtl/WIR.scala b/src/main/scala/firrtl/WIR.scala
index eb4a665f..3ed02fd0 100644
--- a/src/main/scala/firrtl/WIR.scala
+++ b/src/main/scala/firrtl/WIR.scala
@@ -26,18 +26,7 @@ case object SinkFlow extends Flow
case object DuplexFlow extends Flow
case object UnknownFlow extends Flow
-private[firrtl] trait GenderFromFlow { this: Expression =>
- val flow: Flow
- @deprecated("Migrate from 'Gender' to 'Flow'. This method will be removed in 1.3.", "1.2")
- def gender: Gender = flow match {
- case SourceFlow => MALE
- case SinkFlow => FEMALE
- case DuplexFlow => BIGENDER
- case UnknownFlow => UNKNOWNGENDER
- }
-}
-
-case class WRef(name: String, tpe: Type, kind: Kind, flow: Flow) extends Expression with GenderFromFlow {
+case class WRef(name: String, tpe: Type, kind: Kind, flow: Flow) extends Expression {
def serialize: String = name
def mapExpr(f: Expression => Expression): Expression = this
def mapType(f: Type => Type): Expression = this.copy(tpe = f(tpe))
@@ -62,7 +51,7 @@ object WRef {
/** Creates a WRef from an arbitrary string name */
def apply(n: String, t: Type = UnknownType, k: Kind = ExpKind): WRef = new WRef(n, t, k, UnknownFlow)
}
-case class WSubField(expr: Expression, name: String, tpe: Type, flow: Flow) extends Expression with GenderFromFlow {
+case class WSubField(expr: Expression, name: String, tpe: Type, flow: Flow) extends Expression {
def serialize: String = s"${expr.serialize}.$name"
def mapExpr(f: Expression => Expression): Expression = this.copy(expr = f(expr))
def mapType(f: Type => Type): Expression = this.copy(tpe = f(tpe))
@@ -75,7 +64,7 @@ object WSubField {
def apply(expr: Expression, n: String): WSubField = new WSubField(expr, n, field_type(expr.tpe, n), UnknownFlow)
def apply(expr: Expression, name: String, tpe: Type): WSubField = new WSubField(expr, name, tpe, UnknownFlow)
}
-case class WSubIndex(expr: Expression, value: Int, tpe: Type, flow: Flow) extends Expression with GenderFromFlow {
+case class WSubIndex(expr: Expression, value: Int, tpe: Type, flow: Flow) extends Expression {
def serialize: String = s"${expr.serialize}[$value]"
def mapExpr(f: Expression => Expression): Expression = this.copy(expr = f(expr))
def mapType(f: Type => Type): Expression = this.copy(tpe = f(tpe))
@@ -84,7 +73,7 @@ case class WSubIndex(expr: Expression, value: Int, tpe: Type, flow: Flow) extend
def foreachType(f: Type => Unit): Unit = f(tpe)
def foreachWidth(f: Width => Unit): Unit = Unit
}
-case class WSubAccess(expr: Expression, index: Expression, tpe: Type, flow: Flow) extends Expression with GenderFromFlow {
+case class WSubAccess(expr: Expression, index: Expression, tpe: Type, flow: Flow) extends Expression {
def serialize: String = s"${expr.serialize}[${index.serialize}]"
def mapExpr(f: Expression => Expression): Expression = this.copy(expr = f(expr), index = f(index))
def mapType(f: Type => Type): Expression = this.copy(tpe = f(tpe))