From af8d1f63c20890725cf7dc2abbbd46347eee5dfb 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 2ff6d3e56f1..08cd3b9ff9b 100644 --- a/src/test/scala/chiselTests/LTLSpec.scala +++ b/src/test/scala/chiselTests/LTLSpec.scala @@ -378,4 +378,23 @@ class LTLSpec extends AnyFlatSpec with Matchers with ChiselRunners { } }) } + + 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 + } + } }