Skip to content
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

Added usage of 'csr_next_value' function for almost all CSRs. #836

Merged

Conversation

silabs-oysteink
Copy link
Contributor

All CSR instances now use MASK and RESET_VAL. Some CSRs that are dependent on other CSR next values (mnxti, mscratchcsw[l]) do not use the function. Neither does the read-only CSRs that rely on inputs not coming from other CSRs (like mimpid, mip etc).

Should fix the remaining fixes for issue #766.

SEC clean with CLIC==0 and CLIC==1.

All CSR instances now use MASK and RESET_VAL. Some CSRs that are dependent on other CSR next values (mnxti, mscratchcsw[l]) do not use the function. Neither does the read-only CSRs that rely on inputs not coming from other CSRs (like mimpid, mip etc).

SEC clean with CLIC==0 and CLIC==1.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@silabs-oysteink silabs-oysteink added the Component:RTL For issues in the RTL (e.g. for files in the rtl directory) label Apr 20, 2023
@silabs-oysteink
Copy link
Contributor Author

I will revert some of these changes: I will only use the csr_next_value function wherever csr_wdata_int is used, and not for the cases where already resolved next_values or constants are used.

@silabs-oysteink silabs-oysteink added the Status:Do-not-merge Pull request that should not be merged (yet) label Apr 21, 2023
… not depent on csr_wdata_int.

SEC clean.

Signed-off-by: Oystein Knauserud <Oystein.Knauserud@silabs.com>
@silabs-oysteink silabs-oysteink removed the Status:Do-not-merge Pull request that should not be merged (yet) label Apr 24, 2023
mstatush_we = 1'b0;
mstatus_alias_we = 1'b0;

misa_n = misa_rdata; // Read only
misa_n = csr_next_value(misa_rdata, CSR_MISA_MASK, MISA_VALUE); // Read only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduce MISA_RESET_VAL (even though it will be the same as this value)

.WIDTH (32),
.RESETVALUE (32'd0)
.WIDTH (32 ),
.MASK (IRQ_MASK ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IRQ_MASK should be renamed as the others

@Silabs-ArjanB Silabs-ArjanB merged commit d11f021 into openhwgroup:master Apr 24, 2023
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.

2 participants