aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala
diff options
context:
space:
mode:
authorJack Koenig2020-08-21 11:27:50 -0700
committerGitHub2020-08-21 18:27:50 +0000
commit73868fc6e8110282ce545c296540d3ebbafadfeb (patch)
treef06427c430dde383b0d6362874aa44ed188052aa /src/test/scala
parentf1c314e6c7e116df33ffc215ec907212037292dc (diff)
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
Diffstat (limited to 'src/test/scala')
-rw-r--r--src/test/scala/firrtlTests/ReplSeqMemTests.scala22
1 files changed, 22 insertions, 0 deletions
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()
+ }
+
}