diff options
| author | chick | 2016-09-25 18:23:07 -0700 |
|---|---|---|
| committer | jackkoenig | 2016-09-27 13:14:58 -0700 |
| commit | 3f8e1536ff2f4b5090cd2c074ada5d7a413d169f (patch) | |
| tree | c327771170e4438661b4d654e93960b92b31b023 /src/main/scala/firrtl/PrimOps.scala | |
| parent | 39f06c4cff41030e7802c7b371123e040d9c447b (diff) | |
remove unnecessary parentheses
Diffstat (limited to 'src/main/scala/firrtl/PrimOps.scala')
| -rw-r--r-- | src/main/scala/firrtl/PrimOps.scala | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main/scala/firrtl/PrimOps.scala b/src/main/scala/firrtl/PrimOps.scala index 09cae392..b7c2669e 100644 --- a/src/main/scala/firrtl/PrimOps.scala +++ b/src/main/scala/firrtl/PrimOps.scala @@ -139,7 +139,7 @@ object PrimOps extends LazyLogging { def w2 = passes.getWidth(e.args(1).tpe) def c1 = IntWidth(e.consts.head) def c2 = IntWidth(e.consts(1)) - e copy (tpe = (e.op match { + e copy (tpe = e.op match { case Add => (t1, t2) match { case (_: UIntType, _: UIntType) => UIntType(PLUS(MAX(w1, w2), IntWidth(1))) case (_: UIntType, _: SIntType) => SIntType(PLUS(MAX(w1, MINUS(w2, IntWidth(1))), IntWidth(2))) @@ -244,18 +244,18 @@ object PrimOps extends LazyLogging { case _ => UnknownType } case Shl => t1 match { - case _: UIntType => UIntType(PLUS(w1,c1)) - case _: SIntType => SIntType(PLUS(w1,c1)) + case _: UIntType => UIntType(PLUS(w1, c1)) + case _: SIntType => SIntType(PLUS(w1, c1)) case _ => UnknownType } case Shr => t1 match { - case _: UIntType => UIntType(MAX(MINUS(w1,c1),IntWidth(1))) - case _: SIntType => SIntType(MAX(MINUS(w1,c1),IntWidth(1))) + case _: UIntType => UIntType(MAX(MINUS(w1, c1), IntWidth(1))) + case _: SIntType => SIntType(MAX(MINUS(w1, c1), IntWidth(1))) case _ => UnknownType } case Dshl => t1 match { - case _: UIntType => UIntType(PLUS(w1,POW(w2))) - case _: SIntType => SIntType(PLUS(w1,POW(w2))) + case _: UIntType => UIntType(PLUS(w1, POW(w2))) + case _: SIntType => SIntType(PLUS(w1, POW(w2))) case _ => UnknownType } case Dshr => t1 match { @@ -264,13 +264,13 @@ object PrimOps extends LazyLogging { case _ => UnknownType } case Cvt => t1 match { - case _: UIntType => SIntType(PLUS(w1,IntWidth(1))) + case _: UIntType => SIntType(PLUS(w1, IntWidth(1))) case _: SIntType => SIntType(w1) case _ => UnknownType } case Neg => t1 match { - case _: UIntType => SIntType(PLUS(w1,IntWidth(1))) - case _: SIntType => SIntType(PLUS(w1,IntWidth(1))) + case _: UIntType => SIntType(PLUS(w1, IntWidth(1))) + case _: SIntType => SIntType(PLUS(w1, IntWidth(1))) case _ => UnknownType } case Not => t1 match { @@ -307,7 +307,7 @@ object PrimOps extends LazyLogging { case (t1, t2) => UnknownType } case Bits => t1 match { - case (_: UIntType | _: SIntType) => UIntType(PLUS(MINUS(c1,c2),IntWidth(1))) + case (_: UIntType | _: SIntType) => UIntType(PLUS(MINUS(c1, c2), IntWidth(1))) case _ => UnknownType } case Head => t1 match { @@ -315,9 +315,9 @@ object PrimOps extends LazyLogging { case _ => UnknownType } case Tail => t1 match { - case (_: UIntType | _: SIntType) => UIntType(MINUS(w1,c1)) + case (_: UIntType | _: SIntType) => UIntType(MINUS(w1, c1)) case _ => UnknownType } - })) + }) } } |
