diff options
| author | Jiuyang Liu | 2021-11-23 03:33:51 +0800 |
|---|---|---|
| committer | GitHub | 2021-11-22 19:33:51 +0000 |
| commit | 15c0d4a041b50389fb386733c53a7012535f9b71 (patch) | |
| tree | d6a71de0fa161c26e84cb959413cc2cc4f06adb1 | |
| parent | 3677587592b0e776e277f72422f8adcb5a0de1a7 (diff) | |
[deprecation clean up] remove deprecated API in firrtl.Utils (#2420)
* remove firrtl.Utils.get_flip.
* remove firrtl.Utils.indent.
| -rw-r--r-- | src/main/scala/firrtl/Utils.scala | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/main/scala/firrtl/Utils.scala b/src/main/scala/firrtl/Utils.scala index 51748b68..ec68d4eb 100644 --- a/src/main/scala/firrtl/Utils.scala +++ b/src/main/scala/firrtl/Utils.scala @@ -264,10 +264,6 @@ object Utils extends LazyLogging { def isTemp(str: String): Boolean = str.head == '_' - /** Indent the results of [[ir.FirrtlNode.serialize]] */ - @deprecated("Use ther new firrt.ir.Serializer instead.", "FIRRTL 1.4") - def indent(str: String) = str.replaceAllLiterally("\n", "\n ") - implicit def toWrappedExpression(x: Expression): WrappedExpression = new WrappedExpression(x) def getSIntWidth(s: BigInt): Int = s.bitLength + 1 def getUIntWidth(u: BigInt): Int = u.bitLength @@ -356,34 +352,6 @@ object Utils extends LazyLogging { ReferenceTarget(main, module, Nil, ref, tokens.toSeq) } - @deprecated("get_flip is fundamentally slow, use to_flip(flow(expr))", "FIRRTL 1.2") - def get_flip(t: Type, i: Int, f: Orientation): Orientation = { - if (i >= get_size(t)) throwInternalError(s"get_flip: shouldn't be here - $i >= get_size($t)") - t match { - case (_: GroundType) => f - case (tx: BundleType) => - val (_, flip) = tx.fields.foldLeft((i, None: Option[Orientation])) { - case ((n, ret), x) if n < get_size(x.tpe) => - ret match { - case None => (n, Some(get_flip(x.tpe, n, times(x.flip, f)))) - case Some(_) => (n, ret) - } - case ((n, ret), x) => (n - get_size(x.tpe), ret) - } - flip.get - case (tx: VectorType) => - val (_, flip) = (0 until tx.size).foldLeft((i, None: Option[Orientation])) { - case ((n, ret), x) if n < get_size(tx.tpe) => - ret match { - case None => (n, Some(get_flip(tx.tpe, n, f))) - case Some(_) => (n, ret) - } - case ((n, ret), x) => (n - get_size(tx.tpe), ret) - } - flip.get - } - } - def get_point(e: Expression): Int = e match { case (e: WRef) => 0 case (e: WSubField) => |
