aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJack Koenig2017-06-29 22:05:11 -0700
committerJack Koenig2017-06-29 22:06:32 -0700
commitec02d9336800f3d837ac69e173533d4c0b264eb4 (patch)
tree24971386ddc050f29c18c423eaac68b359863df2 /src
parentb60c31806e9220d63ac2dae98ef4b54c37122491 (diff)
Add test for padding constant connections to wires in ConstProp
Diffstat (limited to 'src')
-rw-r--r--src/test/scala/firrtlTests/ConstantPropagationTests.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ConstantPropagationTests.scala b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
index 8f09ac9e..985d9956 100644
--- a/src/test/scala/firrtlTests/ConstantPropagationTests.scala
+++ b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
@@ -514,4 +514,21 @@ class ConstantPropagationIntegrationSpec extends LowTransformSpec {
| z <= UInt<1>(0)""".stripMargin
execute(input, check, Seq.empty)
}
+
+ it should "pad constant connections to wires when propagating" in {
+ val input =
+ """circuit Top :
+ | module Top :
+ | output z : UInt<16>
+ | wire w : { a : UInt<8>, b : UInt<8> }
+ | w.a <= UInt<2>("h3")
+ | w.b <= UInt<2>("h3")
+ | z <= cat(w.a, w.b)""".stripMargin
+ val check =
+ """circuit Top :
+ | module Top :
+ | output z : UInt<16>
+ | z <= UInt<16>("h303")""".stripMargin
+ execute(input, check, Seq.empty)
+ }
}