summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests
diff options
context:
space:
mode:
authorKevin Laeufer2021-04-29 11:52:20 -0700
committerGitHub2021-04-29 18:52:20 +0000
commit4d8fed00225d15221cf32177ea9147b20d0b91f7 (patch)
treeb2696fe705f118865733bdd4e7e281a57208fae6 /src/test/scala/chiselTests
parent992a0a69e7a064abfeef737fcfff22cb96ec8b65 (diff)
verification: guard statements with module reset (#1891)
Diffstat (limited to 'src/test/scala/chiselTests')
-rw-r--r--src/test/scala/chiselTests/experimental/verification/VerificationSpec.scala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/experimental/verification/VerificationSpec.scala b/src/test/scala/chiselTests/experimental/verification/VerificationSpec.scala
index fe642156..86d6418c 100644
--- a/src/test/scala/chiselTests/experimental/verification/VerificationSpec.scala
+++ b/src/test/scala/chiselTests/experimental/verification/VerificationSpec.scala
@@ -30,8 +30,15 @@ class VerificationSpec extends ChiselPropSpec {
property("basic equality check should work") {
val fir = ChiselStage.emitChirrtl(new VerificationModule)
val lines = fir.split("\n").map(_.trim)
+
+ // reset guard around the verification statement
+ assertContains(lines, "when _T_2 : @[VerificationSpec.scala 16:15]")
assertContains(lines, "cover(clock, _T, UInt<1>(\"h1\"), \"\") @[VerificationSpec.scala 16:15]")
- assertContains(lines, "assume(clock, _T_2, UInt<1>(\"h1\"), \"\") @[VerificationSpec.scala 18:18]")
- assertContains(lines, "assert(clock, _T_3, UInt<1>(\"h1\"), \"\") @[VerificationSpec.scala 19:18]")
+
+ assertContains(lines, "when _T_6 : @[VerificationSpec.scala 18:18]")
+ assertContains(lines, "assume(clock, _T_4, UInt<1>(\"h1\"), \"\") @[VerificationSpec.scala 18:18]")
+
+ assertContains(lines, "when _T_9 : @[VerificationSpec.scala 19:18]")
+ assertContains(lines, "assert(clock, _T_7, UInt<1>(\"h1\"), \"\") @[VerificationSpec.scala 19:18]")
}
}