aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/InlineInstancesTests.scala
diff options
context:
space:
mode:
authorAdam Izraelevitz2018-10-24 20:40:27 -0700
committerGitHub2018-10-24 20:40:27 -0700
commit7e2f787e125227dc389d5cf1d09717748ecfed2e (patch)
tree2c654726a5c9850440792cf673e91ed01e0bdfe4 /src/test/scala/firrtlTests/InlineInstancesTests.scala
parentf2c50e11c0e1ff3ed7b8ca3ae3d2d3b16f157453 (diff)
Instance Annotations (#865)
Added Target, which now supports Instance Annotations. See #865 for details.
Diffstat (limited to 'src/test/scala/firrtlTests/InlineInstancesTests.scala')
-rw-r--r--src/test/scala/firrtlTests/InlineInstancesTests.scala37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/InlineInstancesTests.scala b/src/test/scala/firrtlTests/InlineInstancesTests.scala
index 6d386d48..4affd64d 100644
--- a/src/test/scala/firrtlTests/InlineInstancesTests.scala
+++ b/src/test/scala/firrtlTests/InlineInstancesTests.scala
@@ -346,6 +346,43 @@ class InlineInstancesTests extends LowTransformSpec {
| b <= a""".stripMargin
failingexecute(input, Seq(inline("A")))
}
+
+ "Jack's Bug" should "not fail" in {
+
+ val input = """circuit Top :
+ | module Top :
+ | input a : UInt<32>
+ | output b : UInt<32>
+ | inst i of Inline
+ | i.a <= a
+ | b <= i.b
+ | module Inline :
+ | input a : UInt<32>
+ | output b : UInt<32>
+ | inst child of InlineChild
+ | child.a <= a
+ | b <= child.b
+ | module InlineChild :
+ | input a : UInt<32>
+ | output b : UInt<32>
+ | b <= a""".stripMargin
+ val check = """circuit Top :
+ | module Top :
+ | input a : UInt<32>
+ | output b : UInt<32>
+ | wire i_a : UInt<32>
+ | wire i_b : UInt<32>
+ | inst i_child of InlineChild
+ | i_b <= i_child.b
+ | i_child.a <= i_a
+ | b <= i_b
+ | i_a <= a
+ | module InlineChild :
+ | input a : UInt<32>
+ | output b : UInt<32>
+ | b <= a""".stripMargin
+ execute(input, check, Seq(inline("Inline")))
+ }
}
// Execution driven tests for inlining modules