-
Notifications
You must be signed in to change notification settings - Fork 52
fix default assignments #617
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 default assignments #617
Conversation
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.
We will Lint check first before we can merge this
@@ -1015,6 +1015,7 @@ module cv32e40x_cs_registers import cv32e40x_pkg::*; | |||
csr_wdata_int = csr_wdata; | |||
csr_we_int = 1'b0; | |||
end | |||
default:; |
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.
This case statement is already complete. I believe we would get a Lint warning when adding a default here.
@@ -307,6 +307,7 @@ module cv32e40x_id_stage import cv32e40x_pkg::*; | |||
unique case (imm_a_mux_sel) | |||
IMMA_Z: imm_a = imm_z_type; | |||
IMMA_ZERO: imm_a = '0; | |||
default: imm_a = '0; |
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.
This case statement is already complete. I believe we would get a Lint warning when adding a default here.
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.
However, if the above is true, then we should have a warning for jalr_fw_mux.
@silabs-oysteink Can you check with our Lint setup if this PR would increase the number of default related warnings? Some of the fixes in this PR are definitely good, but maybe not all. |
Hi @Silabs-ArjanB , indeed I got most of the time just warnings, even when the case was somehow complete (with Verilator) |
@davideschiavone My point is that I believe that we sometimes get warnings because of adding a default (but we will recheck that). |
ah no I don't think so (for my case I mean), because using the branch of the PR is shutting down those warnings, again, with Verilator. Other tools may behave differenlty |
I think the changes are good. They do lead to an increased amount of lint warnings though, both for the fully covered cases with added default, and for those that are not full which now gets a 'reachable default'. I think it is better to be consistent with defaults, and instead waive warnings in lint if wanted. |
No description provided.