diff options
| author | Jiuyang Liu | 2020-12-02 01:53:04 +0000 |
|---|---|---|
| committer | GitHub | 2020-12-02 01:53:04 +0000 |
| commit | 6c5ce834e26386100b196881f6e487aed26c9c0a (patch) | |
| tree | f2b9225dc42fd04ea7e7c8fb4d80bd2071b68966 /src/test | |
| parent | 4e46f8c614b81143621f2b4187392f6912d882bf (diff) | |
Fix subaccess (#1984)
* add test for RemoveAccessesSpec.
* fix nested SubAccess bug.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/LowerTypesSpec.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/LowerTypesSpec.scala b/src/test/scala/firrtlTests/LowerTypesSpec.scala index 9e58b74c..da84b362 100644 --- a/src/test/scala/firrtlTests/LowerTypesSpec.scala +++ b/src/test/scala/firrtlTests/LowerTypesSpec.scala @@ -456,6 +456,23 @@ class LowerTypesUniquifySpec extends FirrtlFlatSpec { executeTest(input, expected) } + it should "remove index express in SubAccess" in { + val input = + s"""circuit Bug : + | module Bug : + | input in0 : UInt<1> [2][2] + | input in1 : UInt<1> [2] + | input in2 : UInt<1> [2] + | output out : UInt<1> + | out <= in0[in1[in2[0]]][in1[in2[1]]] + |""".stripMargin + val expected = Seq( + "out <= _in0_in1_in1_in2_1" + ) + + executeTest(input, expected) + } + it should "rename memories" in { val input = """circuit Test : |
