diff options
| author | Donggyu | 2016-09-13 19:51:31 -0700 |
|---|---|---|
| committer | GitHub | 2016-09-13 19:51:31 -0700 |
| commit | 36c19ed40bec120ef38aefa7e2c875c5e21bf048 (patch) | |
| tree | 15b3983afce32430c2a333459286e77dc106cd56 /src/main/scala/firrtl/passes/Passes.scala | |
| parent | d832d6d1e36be43c958c81b1ca347f2c413eed49 (diff) | |
| parent | 41c78f9854124986e812fd7c7363d404fdb64b0b (diff) | |
Merge pull request #291 from ucb-bar/case_object_WVoid_WInvalid
Case object for WVoid WInvalid
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") } |
