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

ACT test draft for Smcdeleg/Ssccfg #415

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

Conversation

adlr
Copy link

@adlr adlr commented Dec 8, 2023

Description

Provide a detailed description of the changes performed by the PR.

Draft PR for Smcdeleg/Ssccfg support. Tests various ways to attempt to access instret.

Note that currently I'm not sure how to set a trap handler to handle and note illegal instruction cases. I'm open to suggestion on that.

Related Issues

Please list all the issues related to this PR. Use NA if no issues exist

Ratified/Unratified Extensions

  • Ratified
  • Unratified

List Extensions

List the extensions that your PR affects. In case of unratified extensions, please provide a link to the spec draft that was referred to make this PR.

Smcdeleg/Ssccfg

Reference Model Used

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 (See this for more info): < SPECIFY 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.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Dec 8, 2023 via email

RVMODEL_BOOT
RVTEST_CODE_BEGIN

.macro READ_ICOUNT cdeval, irval

Choose a reason for hiding this comment

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

nit, but ICOUNT is the name of an Sdtrig register. Probably best to call this READ_INSTRET?

LI( x2, 0x40000000) /* minstretcfg: inhibit M-mode */
csrw 0x722, x2 /* minstretcfgh */
.elseif (\inhibitmode == Smode)
LI( x2, 0x20000000) /* minstretcfg: inhibit M-mode */

Choose a reason for hiding this comment

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

The comment above is wrong, should be "inhibit S-mode". Same for comments below.

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

Successfully merging this pull request may close these issues.

4 participants