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

Virtual Memory SV-32 Address Translation Scheme Tests and Covergroups #516

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from

Conversation

MuhammadHammad001
Copy link
Contributor

@MuhammadHammad001 MuhammadHammad001 commented Oct 11, 2024

Description

This PR contains the tests and covergroups for Virtual Memory SV32 address translation scheme. The tests and covergroups are written using the following Test Plan

Related Issues

This PR has a dependency on the PR# 563.

Ratified/Unratified Extensions

  • Ratified
  • Unratified

List Extensions

NA

Reference Model Used

  • SAIL
  • Spike
  • Other - < SPECIFY HERE >

Mandatory Checklist:

  • All tests are compliant with the test-format spec present in this repo ?
  • Ran the new tests on RISCOF with SAIL/Spike as reference model successfully ?
  • Ran the new tests on RISCOF in coverage mode
  • Link to Google-Drive folder containing the new coverage reports available here
  • Link to PR in RISCV-ISAC from which the reports were generated : < SPECIFY HERE >
  • Changelog entry created with a minor patch

Optional Checklist:

  • RISCV-V CTG PR link if tests were generated using it : < SPECIFY HERE >
  • Were the tests hand-written/modified ?
  • Have you run these on any hard DUT model ? Please specify name and provide link if possible in the description
  • If you have modified arch_test.h Please provide a detailed description of the changes in the Description section above.

@MuhammadHammad001 MuhammadHammad001 marked this pull request as draft October 25, 2024 06:16
@UmerShahidengr UmerShahidengr marked this pull request as ready for review October 25, 2024 16:44
@UmerShahidengr
Copy link
Collaborator

@allenjbaum CI is passing for these tests too, please review these tests.

@MuhammadHammad001
Copy link
Contributor Author

@allenjbaum @UmerShahidengr Covergroups have been updated and now are written using the translator format.

@MuhammadHammad001
Copy link
Contributor Author

Hi @allenjbaum @UmerShahidengr few more tests and covergroups have been added. Please review this Test Plan as well and please let me know the cases that I have marked as NOT Possible can be achieved or not. Else these tests are complete and need your kind review

#check mstatus has: case1: MPP& U in MPP and case2: MPP& S in MPP
mstatus == {0x00020000, 0x00020800}: 0
val_comb:
'mode == "M" and (mstatus == {0x00020000, 0x00020800}) and get_pte_prop({"ADURWXV", "ADuRWXV"}{[$1]}, dptw1cont) == 1 and dptw0cont == None': 0
Copy link
Collaborator

@allenjbaum allenjbaum Dec 6, 2024

Choose a reason for hiding this comment

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

You shouldn't be using numeric constants. use MSTATUS_MPRV and MSTATUS_MPP_S (you'll need to define that latter). You could define MSTATUS_MPP_U (==0) and MSTATUS_MPP_M (==MSTATUS_MPP) also to make it clearer

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

Successfully merging this pull request may close these issues.

4 participants