-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix for issue #74; updates to use latest version of CV32E40P #82
Conversation
…E40P; moved assertions out of RTL to prevent issues with various tools (e.g. synthesis tools) Signed-off-by: Arjan Bink <Arjan.Bink@silabs.com>
Signed-off-by: Arjan Bink <Arjan.Bink@silabs.com>
src/dm_sba.sv
Outdated
@@ -53,8 +53,7 @@ module dm_sba #( | |||
output logic [2:0] sberror_o // bus error occurred | |||
); | |||
|
|||
typedef enum logic [2:0] { Idle, Read, Write, WaitRead, WaitWrite } state_e; | |||
state_e state_d, state_q; | |||
dm::sba_state_t state_d, state_q; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum types should end in _e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a new commit to fix the naming issue
I think you are just running into the define problem with your synthesis tool because the |
Signed-off-by: Arjan Bink <Arjan.Bink@silabs.com>
Not all tools use such pragmas. The only work-around we had was to define VERILATOR during ASIC and FPGA synthesis, which is really a hack. Other reason for putting the assertions outside is to get rid of define usage in RTL code and to offer a path for (later) converting to UVM style warnings/errors (as otherwise warnings/errors will go unnoticed in UVM simulations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I didn't have really good experience with bind
and various eda tools, but If you think it makes future uvm support easier I can accept it.
This pull requests addresses the following:
Note that the original `ifndef VERILATOR to guard assertions causes problems for synthesis tools. Either the synthesis tool would object against the assertions or you would have to define VERILATOR (both of which are not okay). Now binding the assertions to the RTL for a cleaner split between assertions and RTL. Also got rid of the #0 construct in the assertions as that was not a clean solution.
Signed-off-by: Arjan Bink Arjan.Bink@silabs.com