diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/PrimOps.scala | 4 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/PrimOps.scala b/src/main/scala/firrtl/PrimOps.scala index b28cd000..fa523e12 100644 --- a/src/main/scala/firrtl/PrimOps.scala +++ b/src/main/scala/firrtl/PrimOps.scala @@ -314,9 +314,7 @@ object PrimOps extends LazyLogging { case _ => UnknownType } case Cat => (t1, t2) match { - case (_: UIntType | _: SIntType, _: UIntType | _: SIntType) => UIntType(PLUS(w1, w2)) - case (_: FixedType, _: UIntType| _: SIntType) => FixedType(PLUS(w1, w2), PLUS(p1, w2)) - case (_: UIntType | _: SIntType, _: FixedType) => FixedType(PLUS(w1, w2), p1) + case (_: UIntType | _: SIntType | _: FixedType, _: UIntType | _: SIntType | _: FixedType) => UIntType(PLUS(w1, w2)) case (t1, t2) => UnknownType } case Bits => t1 match { diff --git a/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala b/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala index d567a6da..44fa1d29 100644 --- a/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala +++ b/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala @@ -206,7 +206,7 @@ class FixedTypeInferenceSpec extends FirrtlFlatSpec { | input a : Fixed<10><<2>> | input b : Fixed<7><<3>> | input c : UInt<2> - | output cat : Fixed + | output cat : UInt | output head : UInt | output tail : UInt | output bits : UInt @@ -220,7 +220,7 @@ class FixedTypeInferenceSpec extends FirrtlFlatSpec { | input a : Fixed<10><<2>> | input b : Fixed<7><<3>> | input c : UInt<2> - | output cat : Fixed<12><<4>> + | output cat : UInt<12> | output head : UInt<3> | output tail : UInt<7> | output bits : UInt<4> |
