Skip to content

Commit

Permalink
Add verilator version logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Nov 21, 2023
1 parent 1337031 commit f837bcc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_assert_immediate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ class Foo(m.Circuit):
"error": "%Error:",
}[severity]
msg += " Foo.v:9: "
# TODO: verilator 5.016 needs this
# if severity == "error":
# msg += "Assertion failed in "
msg += "Assertion failed in "
if verilator_version() >= 5.016:
if severity == "error":
msg += "Assertion failed in "
else:
msg += "Assertion failed in "
msg += "TOP.Foo"
if name is not None:
msg += f".{name}"
Expand Down

0 comments on commit f837bcc

Please sign in to comment.