diff options
| author | David Biancolin | 2021-09-29 16:58:10 -0700 |
|---|---|---|
| committer | GitHub | 2021-09-29 23:58:10 +0000 |
| commit | 519e8c8dea592d2faf949a1a1aa49ea303bd1c72 (patch) | |
| tree | d8bbbad77200db241e9345c0d3c2a6bc27735528 /src/test/scala | |
| parent | b81de69928b765949be0c79dea1d0cc714a31aa1 (diff) | |
TopWiring: filter out unnamed declarations when building source lists (#2376)
* Demonstrate a couple failing cases
* Have TopWiring ignore unnamed declarations as potential sources
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/TopWiringTest.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/transforms/TopWiringTest.scala b/src/test/scala/firrtlTests/transforms/TopWiringTest.scala index eb404393..1cee9f74 100644 --- a/src/test/scala/firrtlTests/transforms/TopWiringTest.scala +++ b/src/test/scala/firrtlTests/transforms/TopWiringTest.scala @@ -635,6 +635,17 @@ class TopWiringTests extends MiddleTransformSpec with TopWiringTestsCommon { outputState.circuit.serialize should include("output bar_foo") outputState.annotations.toSeq should be(empty) } + + "Unnamed side-affecting statements" should s"not be included as potential sources" in { + val input = + """circuit Top : + | module Top : + | input clock : Clock + | printf(clock, UInt<1>(1), "") + | stop(clock, UInt<1>(1), 1) + |""".stripMargin + execute(input, input, Seq()) + } } class AggregateTopWiringTests extends MiddleTransformSpec with TopWiringTestsCommon { |
