diff options
| author | azidar | 2016-12-05 16:03:59 -0800 |
|---|---|---|
| committer | Adam Izraelevitz | 2017-03-22 10:30:36 -0700 |
| commit | 012b4378f5d8b25c5b19c4c5c5e0e46b9097ce21 (patch) | |
| tree | e864783be5745725617120719c6cbb1c67f84ff6 /src/test/scala/firrtlTests/ClockListTests.scala | |
| parent | 13fc27f35e85026c002e644b61c32268bd258d78 (diff) | |
Bugfix: apply/unapply of PinAnnotation broken
Diffstat (limited to 'src/test/scala/firrtlTests/ClockListTests.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/ClockListTests.scala | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ClockListTests.scala b/src/test/scala/firrtlTests/ClockListTests.scala index 9069c145..2ac45e0b 100644 --- a/src/test/scala/firrtlTests/ClockListTests.scala +++ b/src/test/scala/firrtlTests/ClockListTests.scala @@ -115,4 +115,37 @@ class ClockListTests extends FirrtlFlatSpec { val retC = new ClockList("A", writer).run(c) (writer.toString) should be (check) } + "Have not circuit main be top of clocklist pass" should "still work" in { + val input = + """circuit A : + | module A : + | input clock: Clock + | input clkB: Clock + | inst b of B + | inst d of D + | b.clock <= clkB + | b.clkC <= clock + | module B : + | input clock: Clock + | input clkC: Clock + | inst c of C + | c.clock <= clkC + | module C : + | input clock: Clock + | reg r: UInt<5>, clock + | extmodule D : + | input clock: Clock + |""".stripMargin + val check = + """Sourcelist: List(clock, clkC) + |Good Origin of clock is clock + |Good Origin of c.clock is clkC + |""".stripMargin + val c = passes.foldLeft(parse(input)) { + (c: Circuit, p: Pass) => p.run(c) + } + val writer = new StringWriter() + val retC = new ClockList("B", writer).run(c) + (writer.toString) should be (check) + } } |
