From 208176767a8b93172e02b55fe5e5cc19891e5921 Mon Sep 17 00:00:00 2001 From: Adam Izraelevitz Date: Tue, 14 Feb 2017 11:36:42 -0800 Subject: Fixes #441, ConvertFixedToSInt not recursing exps --- src/main/scala/firrtl/passes/ConvertFixedToSInt.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala index 1b57360f..3ddfb124 100644 --- a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala +++ b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala @@ -39,10 +39,10 @@ object ConvertFixedToSInt extends Pass { val types = mutable.HashMap[String,Type]() def updateExpType(e:Expression): Expression = e match { case DoPrim(Mul, args, consts, tpe) => e map updateExpType - case DoPrim(AsFixedPoint, args, consts, tpe) => DoPrim(AsSInt, args, Seq.empty, tpe) - case DoPrim(BPShl, args, consts, tpe) => DoPrim(Shl, args, consts, tpe) - case DoPrim(BPShr, args, consts, tpe) => DoPrim(Shr, args, consts, tpe) - case DoPrim(BPSet, args, consts, FixedType(w, IntWidth(p))) => alignArg(args.head, p) + case DoPrim(AsFixedPoint, args, consts, tpe) => DoPrim(AsSInt, args, Seq.empty, tpe) map updateExpType + case DoPrim(BPShl, args, consts, tpe) => DoPrim(Shl, args, consts, tpe) map updateExpType + case DoPrim(BPShr, args, consts, tpe) => DoPrim(Shr, args, consts, tpe) map updateExpType + case DoPrim(BPSet, args, consts, FixedType(w, IntWidth(p))) => alignArg(args.head, p) map updateExpType case DoPrim(op, args, consts, tpe) => val point = calcPoint(args) val newExp = DoPrim(op, args.map(x => alignArg(x, point)), consts, UnknownType) -- cgit v1.2.3