diff options
| author | mergify[bot] | 2022-09-29 18:53:44 +0000 |
|---|---|---|
| committer | GitHub | 2022-09-29 18:53:44 +0000 |
| commit | 5a79814631bdc8c71c5a7b4722cd43712f7ff445 (patch) | |
| tree | 6a42aceb9b6002bcbeb3070c7bb98d1b17db91b4 /core/src/main/scala/chisel3/VerificationStatement.scala | |
| parent | 9f1eae19445e110bb743176767f59970ce1d36b5 (diff) | |
Add lexical scope checks to Assert, Assume and Printf (#2706) (#2753)
(cherry picked from commit f462c9f9307bebf3012da52432c3729cd752321c)
Co-authored-by: Aditya Naik <91489422+adkian-sifive@users.noreply.github.com>
Diffstat (limited to 'core/src/main/scala/chisel3/VerificationStatement.scala')
| -rw-r--r-- | core/src/main/scala/chisel3/VerificationStatement.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/scala/chisel3/VerificationStatement.scala b/core/src/main/scala/chisel3/VerificationStatement.scala index 1b13b86c..10cece60 100644 --- a/core/src/main/scala/chisel3/VerificationStatement.scala +++ b/core/src/main/scala/chisel3/VerificationStatement.scala @@ -178,6 +178,7 @@ object assert extends VerifPrintMacrosDoc { compileOptions: CompileOptions ): Assert = { val id = new Assert() + message.foreach(Printable.checkScope(_)) when(!Module.reset.asBool()) { failureMessage("Assertion", line, cond, message) Builder.pushCommand(Verification(id, Formal.Assert, sourceInfo, Module.clock.ref, cond.ref, "")) @@ -343,6 +344,7 @@ object assume extends VerifPrintMacrosDoc { compileOptions: CompileOptions ): Assume = { val id = new Assume() + message.foreach(Printable.checkScope(_)) when(!Module.reset.asBool()) { failureMessage("Assumption", line, cond, message) Builder.pushCommand(Verification(id, Formal.Assume, sourceInfo, Module.clock.ref, cond.ref, "")) |
