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

mnxti reads return incorrect value when CLIC_ID_WIDTH = 1 #884

Closed
silabs-mateilga opened this issue Jul 4, 2023 · 3 comments
Closed

mnxti reads return incorrect value when CLIC_ID_WIDTH = 1 #884

silabs-mateilga opened this issue Jul 4, 2023 · 3 comments
Labels
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-mateilga
Copy link

Component:RTL

Reads of csr mnxti, that should return the value of csr mtvt + XLEN/8 * clic_id, does not return correct value when the id width is 1. Debugging with @silabs-oysteink indicates that this applies for all widths < 4.

Reproduce by formally proving ...core_i.clic_assert_i.gen_clic_assertions.a_mnxti_case_1_irq_req_unchanged
with branch: https://github.com/silabs-mateilga/core-v-verif/tree/clic_assert_mtvt_fields
on the cv32e40s core

@silabs-oysteink silabs-oysteink added the Type:Bug For bugs in any content (RTL, Documentation, etc.) label Jul 4, 2023
@silabs-mateilga
Copy link
Author

The fix to core-v-verif is now merged, reproduction can be accomplished in the cv32e40s/dev-branch of core-v-verif.

silabs-oysteink added a commit to silabs-oysteink/cv32e40x that referenced this issue Jul 6, 2023
The pointer address returned by accessing mnxti would be wrong if CLIC_ID_BITS was less than 4. Fix was to pad the interrupt ID used by mnxti with zeroes to reach the desired alignment.

Signed-off-by: Oystein Knauserud <[email protected]>
@silabs-oysteink silabs-oysteink added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Jul 6, 2023
@silabs-oysteink
Copy link
Contributor

Fixed with PR #478 (merge from CV32E40X)

@silabs-mateilga
Copy link
Author

Fix verified in formal

silabs-oysteink added a commit to silabs-oysteink/cv32e40x that referenced this issue Jul 6, 2023
…s lint in a different tool than what was originally used.

Signed-off-by: Oystein Knauserud <[email protected]>
silabs-oysteink added a commit that referenced this issue Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

2 participants