Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
fixup! Fix CheckWidths error message for uninferred width (#2196)
Browse files Browse the repository at this point in the history
  • Loading branch information
seldridge committed Apr 22, 2021
1 parent d29ac72 commit 0242e32
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions src/main/scala/firrtl/passes/CheckWidths.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ object CheckWidths extends Pass with PreservesAll[Transform] {
/** The maximum allowed width for any circuit element */
val MaxWidth = 1000000
val DshlMaxWidth = getUIntWidth(MaxWidth)
<<<<<<< HEAD
class UninferredWidth (info: Info, target: String) extends PassException(
s"""|$info : Uninferred width for target below.serialize}. (Did you forget to assign to it?)
s"""|$info : Uninferred width for target below}. (Did you forget to assign to it?)
|$target""".stripMargin)
class UninferredBound (info: Info, target: String, bound: String) extends PassException(
s"""|$info : Uninferred $bound bound for target. (Did you forget to assign to it?)
Expand Down Expand Up @@ -50,43 +49,6 @@ object CheckWidths extends Pass with PreservesAll[Transform] {
s"$info: [target $mname] Parameter $n in tail operator is larger than input width $width.")
class AttachWidthsNotEqual(info: Info, mname: String, eName: String, source: String) extends PassException(
s"$info: [target $mname] Attach source $source and expression $eName must have identical widths.")
=======
class UninferredWidth(info: Info, target: String)
extends PassException(s"""|$info : Uninferred width for target below. (Did you forget to assign to it?)
|$target""".stripMargin)
class UninferredBound(info: Info, target: String, bound: String)
extends PassException(s"""|$info : Uninferred $bound bound for target. (Did you forget to assign to it?)
|$target""".stripMargin)
class InvalidRange(info: Info, target: String, i: IntervalType)
extends PassException(s"""|$info : Invalid range ${i.serialize} for target below. (Are the bounds valid?)
|$target""".stripMargin)
class WidthTooSmall(info: Info, mname: String, b: BigInt)
extends PassException(s"$info : [target $mname] Width too small for constant $b.")
class WidthTooBig(info: Info, mname: String, b: BigInt)
extends PassException(s"$info : [target $mname] Width $b greater than max allowed width of $MaxWidth bits")
class DshlTooBig(info: Info, mname: String)
extends PassException(
s"$info : [target $mname] Width of dshl shift amount must be less than $DshlMaxWidth bits."
)
class MultiBitAsClock(info: Info, mname: String)
extends PassException(s"$info : [target $mname] Cannot cast a multi-bit signal to a Clock.")
class MultiBitAsAsyncReset(info: Info, mname: String)
extends PassException(s"$info : [target $mname] Cannot cast a multi-bit signal to an AsyncReset.")
class NegWidthException(info: Info, mname: String)
extends PassException(s"$info: [target $mname] Width cannot be negative or zero.")
class BitsWidthException(info: Info, mname: String, hi: BigInt, width: BigInt, exp: String)
extends PassException(
s"$info: [target $mname] High bit $hi in bits operator is larger than input width $width in $exp."
)
class HeadWidthException(info: Info, mname: String, n: BigInt, width: BigInt)
extends PassException(s"$info: [target $mname] Parameter $n in head operator is larger than input width $width.")
class TailWidthException(info: Info, mname: String, n: BigInt, width: BigInt)
extends PassException(s"$info: [target $mname] Parameter $n in tail operator is larger than input width $width.")
class AttachWidthsNotEqual(info: Info, mname: String, eName: String, source: String)
extends PassException(
s"$info: [target $mname] Attach source $source and expression $eName must have identical widths."
)
>>>>>>> adc2ad9a... Fix CheckWidths error message for uninferred width (#2196)
class DisjointSqueeze(info: Info, mname: String, squeeze: DoPrim)
extends PassException({
val toSqz = squeeze.args.head.serialize
Expand Down

0 comments on commit 0242e32

Please sign in to comment.