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

[BUG] PMPCFG : Dead code in pmp module #2665

Open
1 task done
AyoubJalali opened this issue Dec 12, 2024 · 2 comments
Open
1 task done

[BUG] PMPCFG : Dead code in pmp module #2665

AyoubJalali opened this issue Dec 12, 2024 · 2 comments
Labels
Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@AyoubJalali
Copy link
Contributor

AyoubJalali commented Dec 12, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

Hello,

I noticed that the write of the value (2'b10 == NA4) in the pmpcfg.A is ignore for all the CVA6 configuration, That's means we don't support NA4, that's why we don't NA4 code in the pmp module.

We had some code coverage holes :
image

@OlivierBetschi what do you think ?

@AyoubJalali AyoubJalali added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Dec 12, 2024
@AyoubJalali AyoubJalali changed the title [BUG] PMPCFG : ignore writing NA4 in the pmpcfg.A [BUG] PMPCFG : Dead code in pmp module Dec 12, 2024
@OlivierBetschi
Copy link
Contributor

OlivierBetschi commented Dec 12, 2024

According to https://docs.openhwgroup.org/projects/cva6-user-manual/01_cva6_user/PMP.html the NA4 mode is not selectable because of the granularity of the PMP being 1. This is confirmed in the RISC-V privileged ISA (3.7.1 Physical memory protection CSRs) : When G ≥ 1, the NA4 mode is not selectable.

So NA4 not being supported makes sense. Then the question if why the granularity is set to 1, as I don't see anything in the CVA6 requirements ( https://docs.openhwgroup.org/projects/cva6-user-manual/02_cva6_requirements/cva6_requirements_specification.html ) related to the granularity of the PMP. I don't know who could answer that ?

@AyoubJalali
Copy link
Contributor Author

@zchamski we had some discussion on this before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

3 participants