From 0aa0ba8fac56fc81f57b24b6e0694d93de2b66df Mon Sep 17 00:00:00 2001 From: Sequencer Date: Thu, 16 Jan 2020 06:49:57 +0800 Subject: improve the tail ir usability. (#1241) Co-authored-by: Jim Lawson Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- src/main/scala/firrtl/passes/CheckWidths.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/scala/firrtl/passes/CheckWidths.scala b/src/main/scala/firrtl/passes/CheckWidths.scala index 5ae5dad4..6ceac032 100644 --- a/src/main/scala/firrtl/passes/CheckWidths.scala +++ b/src/main/scala/firrtl/passes/CheckWidths.scala @@ -121,7 +121,7 @@ object CheckWidths extends Pass { errors append new BitsWidthException(info, target.serialize, hi, bitWidth(a.tpe), e.serialize) case DoPrim(Head, Seq(a), Seq(n), _) if (hasWidth(a.tpe) && bitWidth(a.tpe) < n) => errors append new HeadWidthException(info, target.serialize, n, bitWidth(a.tpe)) - case DoPrim(Tail, Seq(a), Seq(n), _) if (hasWidth(a.tpe) && bitWidth(a.tpe) <= n) => + case DoPrim(Tail, Seq(a), Seq(n), _) if (hasWidth(a.tpe) && bitWidth(a.tpe) < n) => errors append new TailWidthException(info, target.serialize, n, bitWidth(a.tpe)) case DoPrim(Dshl, Seq(a, b), _, _) if (hasWidth(a.tpe) && bitWidth(b.tpe) >= DshlMaxWidth) => errors append new DshlTooBig(info, target.serialize) -- cgit v1.2.3