diff options
Diffstat (limited to 'src/main/scala/firrtl/passes/ConvertFixedToSInt.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/ConvertFixedToSInt.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala index 5b9cc70b..4a426209 100644 --- a/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala +++ b/src/main/scala/firrtl/passes/ConvertFixedToSInt.scala @@ -8,11 +8,11 @@ import firrtl.ir._ import firrtl._ import firrtl.Mappers._ import firrtl.Utils.{sub_type, module_type, field_type, max, throwInternalError} -import firrtl.options.{Dependency, PreservesAll} +import firrtl.options.Dependency /** Replaces FixedType with SIntType, and correctly aligns all binary points */ -object ConvertFixedToSInt extends Pass with PreservesAll[Transform] { +object ConvertFixedToSInt extends Pass { override def prerequisites = Seq( Dependency(PullMuxes), @@ -22,6 +22,8 @@ object ConvertFixedToSInt extends Pass with PreservesAll[Transform] { Dependency[ExpandWhensAndCheck], Dependency[RemoveIntervals] ) ++ firrtl.stage.Forms.Deduped + override def invalidates(a: Transform) = false + def alignArg(e: Expression, point: BigInt): Expression = e.tpe match { case FixedType(IntWidth(w), IntWidth(p)) => // assert(point >= p) if((point - p) > 0) { |
