Skip to content

Commit

Permalink
reproduce LTL name collision in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tmckay-sifive committed Dec 5, 2024
1 parent 429cc7a commit e898cf1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/scala/chiselTests/LTLSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

0 comments on commit e898cf1

Please sign in to comment.