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

Errata in PMP tests #588

Open
davidharrishmc opened this issue Dec 31, 2024 · 9 comments
Open

Errata in PMP tests #588

davidharrishmc opened this issue Dec 31, 2024 · 9 comments

Comments

@davidharrishmc
Copy link
Contributor

In at least pmp64-NAPOT-RWX.S and pmp64-TOR-RWX.S, I had to add a fence.i before the jal in VERIFICATION_RWX to get the tests working. The store changes the instruction to a NOP, and the fence is necessary to fetch the correct instruction.

I see that pmp64-NA4-RWX.S has the same structure, and so do the pmp32 tests. I suspect there might be something wrong with the signature generation such that no errors are flagged even without fence.i.

VERIFICATION_RWX also has several comments about Load Data that actually should be Store data.

@jordancarlin
Copy link
Contributor

The fence issue seems to be the same as #569

@allenjbaum
Copy link
Collaborator

allenjbaum commented Dec 31, 2024 via email

@davidharrishmc
Copy link
Contributor Author

Confirmed that lockstep simulation of all 3 RWX tests in both pmp32 and pmp64 mismatch lockstep with ImperasDV even though only the two tests listed above cause signature mismatches.

Regarding NOPs, I had a similar issue in testing branch and jump offsets. I ended up putting in enough NOPs to test up to 4k offsets, and assume jumps with an offset of 2^19 still work. Maybe 4k granularity is sufficient for PMP as well?

@UmerShahidengr
Copy link
Collaborator

UmerShahidengr commented Dec 31, 2024

@davidharrishmc I agree with your comments, we are also targetting 4k grain limit while testing. Also on pmp32 and pmp64 mismatch, it is strange to see that rv64 picked this fence.i issue while rv32 failed to pick this one, we will look into it in more detail.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Dec 31, 2024 via email

@jordancarlin
Copy link
Contributor

@allenjbaum The sail model has a flag (--pmp-grain) that configures the pmp granularity.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Dec 31, 2024 via email

@davidharrishmc
Copy link
Contributor Author

davidharrishmc commented Jan 3, 2025 via email

@allenjbaum
Copy link
Collaborator

allenjbaum commented Jan 3, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants