From 73868fc6e8110282ce545c296540d3ebbafadfeb Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Fri, 21 Aug 2020 11:27:50 -0700 Subject: Fix Uniquify bug and improve ReplaceSeqMems transforms (#1855) * Fix bug in Uniquify clobbering DefInstance types * Change ReplaceMemTransform to not run Uniquify nor fixups Use invalidation as mechanism for rerunning resolution passes--- src/test/scala/firrtlTests/ReplSeqMemTests.scala | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/test') diff --git a/src/test/scala/firrtlTests/ReplSeqMemTests.scala b/src/test/scala/firrtlTests/ReplSeqMemTests.scala index 17f4dcfd..13eb63e2 100644 --- a/src/test/scala/firrtlTests/ReplSeqMemTests.scala +++ b/src/test/scala/firrtlTests/ReplSeqMemTests.scala @@ -530,4 +530,26 @@ circuit Top : } } + "ReplSeqMem" should "not run a buggy Uniquify" in { + val input = + """circuit test : + | extmodule foo : + | input in : UInt<8> + | output y : UInt<8> + | + | module test : + | input in : UInt<8> + | output out : UInt<8> + | + | inst f of foo + | node f_in = and(in, UInt(123)) + | f.in <= f_in + | out <= f.y""".stripMargin + val confLoc = "ReplSeqMemTests.confTEMP" + val annos = Seq(ReplSeqMemAnnotation.parse("-c:test:-o:" + confLoc)) + // Just check that it doesn't crash + compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos)) + (new java.io.File(confLoc)).delete() + } + } -- cgit v1.2.3