diff options
| author | Jim Lawson | 2019-02-27 11:10:31 -0800 |
|---|---|---|
| committer | mergify[bot] | 2019-02-27 19:10:31 +0000 |
| commit | 76862eb88adb8a056534fe937f2d7e9353feee94 (patch) | |
| tree | 81683619e1ba2e6c3a71f8e85f3513c11fbf059f /src/test/scala | |
| parent | aec54ed72d02932f8fdb3aa857e82a23507aecd2 (diff) | |
Add --nodedup option to facilitate FIRRTL to verilog regression testing. (#1035)
* Add --nodedup option to facilitate FIRRTL to verilog regression testing.
* Short-circuit the DedupModules transform if NoCircuitDedupAnnotation exists.
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/DedupTests.scala | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/test/scala/firrtlTests/transforms/DedupTests.scala b/src/test/scala/firrtlTests/transforms/DedupTests.scala index 9b949274..971e8a1d 100644 --- a/src/test/scala/firrtlTests/transforms/DedupTests.scala +++ b/src/test/scala/firrtlTests/transforms/DedupTests.scala @@ -5,7 +5,7 @@ package transforms import firrtl.RenameMap import firrtl.annotations._ -import firrtl.transforms.DedupModules +import firrtl.transforms.{DedupModules, NoCircuitDedupAnnotation} /** @@ -553,5 +553,30 @@ class DedupModuleTests extends HighTransformSpec { """.stripMargin execute(input, check, Seq.empty) } + "modules" should "not be deduped if the NoCircuitDedupAnnotation (or --no-dedup option) is supplied" in { + val input = + """circuit main: + | module dupe: + | input in: UInt<8> + | output out: UInt<8> + | out <= in + | module main: + | input in: UInt<8> + | output out: UInt<8> + | out <= in + """.stripMargin + val check = + """circuit main: + | module dupe: + | input in: UInt<8> + | output out: UInt<8> + | out <= in + | module main: + | input in: UInt<8> + | output out: UInt<8> + | out <= in + """.stripMargin + execute(input, check, Seq(NoCircuitDedupAnnotation)) + } } |
