-
Notifications
You must be signed in to change notification settings - Fork 188
Replace all asserts & assumes with macros from assertions.svh
#233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
niwis
merged 25 commits into
pulp-platform:master
from
michael-platzer:michael-platzer/feature/use-assert-macros
Oct 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1df4e91
assertions: Rename defines for consistency
michael-platzer a4ab123
assertions: Enable in Verilator by default, disable with global ASSER…
michael-platzer b90413c
assertions: Allow overriding any defines that turn asserts off
michael-platzer 6128757
assertions: Undefine helper macros at end of header
michael-platzer c978a9e
assertions: Add optional description msg arg to all assert macros
michael-platzer e55f24d
Include assertions.svh header in all sources using assertions
michael-platzer 3565379
Replace all named concurrent assertions with ASSERT macro
michael-platzer a96c2ad
Replace unnamed concurrent assertions with ASSERT macro
michael-platzer 8a6d004
Replace concurrent assertions without message with ASSERT macro
michael-platzer 1093b48
Replace all concurrent assumes with ASSUME macro
michael-platzer 0a0ec7e
Replace all immediate asserts in initial blocks with ASSERT_INIT macro
michael-platzer 0e1e16c
Replace final assertion with ASSERT_FINAL macro
michael-platzer eeef8fd
Replace initial assertions with ASSERT_INIT macro
michael-platzer b4ecb95
Replace all immediate assumes with ASSUME_I macro
michael-platzer de574b8
Remove unnecessary ifndefs for SYNTHESIS around assertions
michael-platzer eb08c3f
spill_register_flushable: Promote flush+feed warning to error
michael-platzer 8e117dc
Remove obsolete default disables for assertions
michael-platzer 35b6a64
addr_decode_dync: Promote onehot assert warning to error
michael-platzer f543c00
stream_omega_net: Use $sformatf() for assert msg
michael-platzer d7c357d
stream_xbar: Use $sformatf() for assert msg
michael-platzer 0a5647a
Distribute ASSERT macros over multiple lines
michael-platzer 647ec7d
stream_omega_net: Fix typo in assert name
michael-platzer ed55c2a
mem_to_banks_detailed: Check power of 2 in a more sensible way
michael-platzer 5b66e85
stream_intf: Replace non-existing reset with constant in asserts
michael-platzer f69ec8d
stream_inft: Add missing include of assertions.svh
michael-platzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Replace all concurrent assumes with ASSUME macro
Reproducible with the following sed command for named assumes: sed -zi 's/\([a-zA-Z_][a-zA-Z0-9_]*\)[ \t\r\n]*:[ \t\r\n]*assume *property[ \t\r\n]*([ \t\r\n]*@(posedge *\([a-zA-Z_][a-zA-Z0-9_]*\))[ \t\r\n]*disable *iff *([~!]\([^)]*\))[ \t\r\n]*\([^;]*\)[ \t\r\n]*)[ \t\r\n]*else[ \t\r\n]*\$fatal[ \t\r\n]*(1,[ \t\r\n]*\([^;]*\)[ \t\r\n]*);/`ASSUME(\1, \4, \2, !\3, \5)/g' src/*.sv And the following sed command for unnamed assumes without reset and with $error instead of $fatal: sed -zi 's/assume *property[ \t\r\n]*([ \t\r\n]*@(posedge *\([a-zA-Z_][a-zA-Z0-9_]*\))[ \t\r\n]*\([^;]*\)[ \t\r\n]*)[ \t\r\n]*else[ \t\r\n]*\$error[ \t\r\n]*([ \t\r\n]*\([^;]*\)[ \t\r\n]*);/`ASSUME(NAME_ME, \2, \1, !rst_ni, \3)/g' src/*.sv Requires cleanup to replace NAME_ME with a suitable property name. Redundant parenthesis can be removed with the following command: sed -i 's/`ASSUME(\([^,]*\), (\([^,]*\)),/`ASSUME(\1, \2,/g' src/*.sv
- Loading branch information
commit 1093b48a93ff8b600064a92fb4ecb52c49b4ce7d
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.