Skip to content

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

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

davideschiavone
Copy link
Contributor

No description provided.

Copy link
Contributor

@Silabs-ArjanB Silabs-ArjanB left a 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:;
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link
Contributor

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-ArjanB
Copy link
Contributor

@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.

@Silabs-ArjanB Silabs-ArjanB added Component:RTL For issues in the RTL (e.g. for files in the rtl directory) Status:Do-not-merge Pull request that should not be merged (yet) labels Jul 21, 2022
@davideschiavone
Copy link
Contributor Author

Hi @Silabs-ArjanB , indeed I got most of the time just warnings, even when the case was somehow complete (with Verilator)

@Silabs-ArjanB
Copy link
Contributor

@davideschiavone My point is that I believe that we sometimes get warnings because of adding a default (but we will recheck that).

@davideschiavone
Copy link
Contributor Author

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

@silabs-oysteink
Copy link
Contributor

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.

@silabs-oysteink silabs-oysteink removed the Status:Do-not-merge Pull request that should not be merged (yet) label Aug 2, 2022
@silabs-oysteink silabs-oysteink merged commit 31b2bd9 into openhwgroup:master Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants