aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/firrtl/passes/ConvertFixedToSInt.scala')
-rw-r--r--src/main/scala/firrtl/passes/ConvertFixedToSInt.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala
index 05604bd8..b52dacb7 100644
--- a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala
+++ b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala
@@ -7,7 +7,7 @@ import firrtl.PrimOps._
import firrtl.ir._
import firrtl._
import firrtl.Mappers._
-import firrtl.Utils.{sub_type, module_type, field_type, max, error}
+import firrtl.Utils.{sub_type, module_type, field_type, max, error, throwInternalError}
/** Replaces FixedType with SIntType, and correctly aligns all binary points
*/
@@ -19,7 +19,7 @@ object ConvertFixedToSInt extends Pass {
} else if (point - p < 0) {
DoPrim(Shr, Seq(e), Seq(p - point), UnknownType)
} else e
- case FixedType(w, p) => error("Shouldn't be here")
+ case FixedType(w, p) => throwInternalError(Some(s"alignArg: shouldn't be here - $e"))
case _ => e
}
def calcPoint(es: Seq[Expression]): BigInt =
@@ -29,7 +29,7 @@ object ConvertFixedToSInt extends Pass {
}).reduce(max(_, _))
def toSIntType(t: Type): Type = t match {
case FixedType(IntWidth(w), IntWidth(p)) => SIntType(IntWidth(w))
- case FixedType(w, p) => error("Shouldn't be here")
+ case FixedType(w, p) => throwInternalError(Some(s"toSIntType: shouldn't be here - $t"))
case _ => t map toSIntType
}
def run(c: Circuit): Circuit = {