diff options
| author | Donggyu Kim | 2016-09-08 22:53:40 -0700 |
|---|---|---|
| committer | Donggyu Kim | 2016-09-13 17:33:51 -0700 |
| commit | 41c78f9854124986e812fd7c7363d404fdb64b0b (patch) | |
| tree | 15b3983afce32430c2a333459286e77dc106cd56 /src/main/scala/firrtl/passes/Passes.scala | |
| parent | 1f90624762c419ab8e2ac51f9ddbca58fff07815 (diff) | |
use BoolType for UIntType(IntWidth(1))
Diffstat (limited to 'src/main/scala/firrtl/passes/Passes.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/Passes.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/passes/Passes.scala b/src/main/scala/firrtl/passes/Passes.scala index 9057c60d..7f53fac8 100644 --- a/src/main/scala/firrtl/passes/Passes.scala +++ b/src/main/scala/firrtl/passes/Passes.scala @@ -200,9 +200,9 @@ object Legalize extends Pass { lazy val msb = width - 1 if (amount >= width) { e.tpe match { - case UIntType(_) => UIntLiteral(0, IntWidth(1)) + case UIntType(_) => zero case SIntType(_) => - val bits = DoPrim(Bits, e.args, Seq(msb, msb), UIntType(IntWidth(1))) + val bits = DoPrim(Bits, e.args, Seq(msb, msb), BoolType) DoPrim(AsSInt, Seq(bits), Seq.empty, SIntType(IntWidth(1))) case t => error(s"Unsupported type ${t} for Primop Shift Right") } |
