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

mcause reset value 0x0000_0000 with SMCLIC=1 violates CLIC spec #549

Closed
silabs-hfegran opened this issue May 23, 2022 · 3 comments · Fixed by #555
Closed

mcause reset value 0x0000_0000 with SMCLIC=1 violates CLIC spec #549

silabs-hfegran opened this issue May 23, 2022 · 3 comments · Fixed by #555
Labels
Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files) Component:RTL For issues in the RTL (e.g. for files in the rtl directory) Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in any content (RTL, Documentation, etc.)

Comments

@silabs-hfegran
Copy link
Contributor

mcause reset value 0x0000_0000 with SMCLIC=1 violates CLIC spec

5.7. Changes to xcause CSRs
(...) The mcause.mpp and mcause.mpie fields mirror the mstatus.mpp and mstatus.mpie fields, and are aliased into mcause to reduce context save/restore code.

mcause
image

mstatus
image

Currently mcause resets to 0x0000_0000 with SMCLIC parameter = 1, this causes a mismatch between the hard-coded 2'b11 value of mstatus.mpp and mcause.mpp after reset. Furthermore, 2'b00 is not a supported value with the WARL-scheme for this register.

Component

Component:RTL: CSR behavior after reset
Component:Doc: User manual CSR description

Steps to Reproduce

Currently only on internal development branch, problem is present as soon as CLIC is enabled in RTL and ISS.

@silabs-hfegran silabs-hfegran added Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files) Component:RTL For issues in the RTL (e.g. for files in the rtl directory) labels May 23, 2022
@Silabs-ArjanB Silabs-ArjanB added the Type:Bug For bugs in any content (RTL, Documentation, etc.) label May 24, 2022
@Silabs-ArjanB
Copy link
Contributor

Hi @silabs-hfegran I think (by luck) the RTL is actually correct, but it is quite confusing and not written in our regular way, which likely caused it to be hooked up wrongly to RVFI (which I guess is what you then observed). I will clean up the RTL and what values RVFI gets to see.

@silabs-hfegran
Copy link
Contributor Author

Great, thanks for looking into this @Silabs-ArjanB

silabs-oysteink added a commit that referenced this issue May 27, 2022
Fix for issue #549. Clean up CS registers syntax. Tie RVFI to RTL ins…
@Silabs-ArjanB Silabs-ArjanB reopened this May 30, 2022
@Silabs-ArjanB Silabs-ArjanB added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label May 30, 2022
@Silabs-ArjanB
Copy link
Contributor

@silabs-hfegran This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc For issues in the Documentation (e.g. for User Manual, README.md files) Component:RTL For issues in the RTL (e.g. for files in the rtl directory) Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in any content (RTL, Documentation, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants