From e898cf141c414864f22e70ab047b866c804dddac Mon Sep 17 00:00:00 2001 From: Trevor McKay Date: Thu, 5 Dec 2024 14:48:25 -0800 Subject: [PATCH] reproduce LTL name collision in unit test --- src/test/scala/chiselTests/LTLSpec.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/test/scala/chiselTests/LTLSpec.scala b/src/test/scala/chiselTests/LTLSpec.scala index 78e6017a14..76f74b6572 100644 --- a/src/test/scala/chiselTests/LTLSpec.scala +++ b/src/test/scala/chiselTests/LTLSpec.scala @@ -407,4 +407,23 @@ class LTLSpec extends AnyFlatSpec with Matchers with ChiselRunners { assert(assertBlockLoc < delayIntrinsicLoc) assert(assumeblockLoc < implicationIntrinsicLoc) } + + it should "not produce name collisions" in { + class Test extends RawModule { + val io = IO(Input(UInt(8.W))) + + val clockWire = Wire(Clock()) + val resetWire = Wire(Reset()) + + withClockAndReset(clockWire, resetWire) { + AssertProperty(Property.eventually(io.orR)) + } + + val clock = IO(Input(Clock())) + val reset = IO(Input(Reset())) + + clockWire := clock + resetWire := reset + } + } }