diff options
| author | Donggyu Kim | 2016-09-02 17:28:39 -0700 |
|---|---|---|
| committer | Donggyu Kim | 2016-09-13 13:36:38 -0700 |
| commit | 4cb46ca17da26c7ccc0b66a6be489a49fb2e9173 (patch) | |
| tree | a283ed9716f10cee128a9a782dada088bba97d5f /src/main/scala/firrtl/passes/InferWidths.scala | |
| parent | 590c3f2cd959c3c125c6511287294aec8409b57b (diff) | |
remove Utils.{width_BANG, long_BANG}
Diffstat (limited to 'src/main/scala/firrtl/passes/InferWidths.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/InferWidths.scala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/scala/firrtl/passes/InferWidths.scala b/src/main/scala/firrtl/passes/InferWidths.scala index 5a81c268..6b2ff6ed 100644 --- a/src/main/scala/firrtl/passes/InferWidths.scala +++ b/src/main/scala/firrtl/passes/InferWidths.scala @@ -214,8 +214,8 @@ object InferWidths extends Pass { def get_constraints_e(e: Expression): Expression = { e match { case (e: Mux) => v ++= Seq( - WGeq(width_BANG(e.cond), IntWidth(1)), - WGeq(IntWidth(1), width_BANG(e.cond)) + WGeq(getWidth(e.cond), IntWidth(1)), + WGeq(IntWidth(1), getWidth(e.cond)) ) case _ => } @@ -230,8 +230,8 @@ object InferWidths extends Pass { val exps = create_exps(s.expr) v ++= ((locs zip exps).zipWithIndex map {case ((locx, expx), i) => get_flip(s.loc.tpe, i, Default) match { - case Default => WGeq(width_BANG(locx), width_BANG(expx)) - case Flip => WGeq(width_BANG(expx), width_BANG(locx)) + case Default => WGeq(getWidth(locx), getWidth(expx)) + case Flip => WGeq(getWidth(expx), getWidth(locx)) } }) case (s: PartialConnect) => @@ -242,17 +242,17 @@ object InferWidths extends Pass { val locx = locs(x) val expx = exps(y) get_flip(s.loc.tpe, x, Default) match { - case Default => WGeq(width_BANG(locx), width_BANG(expx)) - case Flip => WGeq(width_BANG(expx), width_BANG(locx)) + case Default => WGeq(getWidth(locx), getWidth(expx)) + case Flip => WGeq(getWidth(expx), getWidth(locx)) } }) case (s:DefRegister) => v ++= (Seq( - WGeq(width_BANG(s.reset), IntWidth(1)), - WGeq(IntWidth(1), width_BANG(s.reset)) + WGeq(getWidth(s.reset), IntWidth(1)), + WGeq(IntWidth(1), getWidth(s.reset)) ) ++ get_constraints_t(s.tpe, s.init.tpe, Default)) case (s:Conditionally) => v ++= Seq( - WGeq(width_BANG(s.pred), IntWidth(1)), - WGeq(IntWidth(1), width_BANG(s.pred)) + WGeq(getWidth(s.pred), IntWidth(1)), + WGeq(IntWidth(1), getWidth(s.pred)) ) case _ => } |
