diff options
| author | Schuyler Eldridge | 2020-01-15 17:12:53 -0500 |
|---|---|---|
| committer | mergify[bot] | 2020-01-15 22:12:53 +0000 |
| commit | 6b21b7df6f70ed753abe03814c88ef9010259303 (patch) | |
| tree | 691d1db42444b6d751e7f5bc9d4e1c570977495a /src/test | |
| parent | 16acdc39291b8e35548e22ebaabb036da847de37 (diff) | |
Filter ResolvePaths in EliminateTargetPaths (#1310)
Change EliminateTargetPaths to remove ResolvePaths annotations in the
output AnnotationSeq. This prevents a bug whereby the upstream
ResolvePaths annotations from previous runs of EliminateTargetPaths
can result in unexpected duplication.
Adds a test that checks that ResolvePaths annotations are actually
removed.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala index c75e0914..7aac277f 100644 --- a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala +++ b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala @@ -357,4 +357,19 @@ class EliminateTargetPathsSpec extends FirrtlPropSpec with FirrtlMatchers { outputLines should contain (line) } } + + property("It should remove ResolvePaths annotations") { + val input = + """|circuit Foo: + | module Bar: + | skip + | module Foo: + | inst bar of Bar + |""".stripMargin + + CircuitState(passes.ToWorkingIR.run(Parser.parse(input)), UnknownForm, Nil) + .resolvePaths(Seq(CircuitTarget("Foo").module("Foo").instOf("bar", "Bar"))) + .annotations + .collect{ case a: firrtl.annotations.transforms.ResolvePaths => a } should be (empty) + } } |
