diff options
| author | Schuyler Eldridge | 2019-05-03 21:00:52 -0400 |
|---|---|---|
| committer | mergify[bot] | 2019-05-04 01:00:52 +0000 |
| commit | 14b9ead2ee028ba977e9c61eff962380d4e87d30 (patch) | |
| tree | 3912736ea73234db1a4b5c3383506a06a9a2a45b /src/test/scala | |
| parent | 04d69d88cafa65f673cc6ef23ca1dc1f771d3be4 (diff) | |
Add register init to RemoveWires dependencies (#1078)
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/firrtlTests/RemoveWiresSpec.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/RemoveWiresSpec.scala b/src/test/scala/firrtlTests/RemoveWiresSpec.scala index e40a770b..06e5dccd 100644 --- a/src/test/scala/firrtlTests/RemoveWiresSpec.scala +++ b/src/test/scala/firrtlTests/RemoveWiresSpec.scala @@ -182,4 +182,20 @@ class RemoveWiresSpec extends FirrtlFlatSpec { // Check declaration before use is maintained passes.CheckHighForm.execute(result) } + + it should "order registers respecting initializations" in { + val result = compileBody( + s"""|input clock : Clock + |input foo : UInt<2> + |output bar : UInt<2> + |wire y_fault : UInt<2> + |reg y : UInt<2>, clock with : + | reset => (UInt<1>("h0"), y_fault) + |y_fault <= foo + |bar <= y + |""".stripMargin) + // Check declaration before use is maintained + passes.CheckHighForm.execute(result) + } + } |
