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] ACTs and coverage points for machine mode software and timer interrupts #567

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

Conversation

Ali-Faraz-10xe
Copy link

Description

This pull request introduces tests and covergroups to verify machine mode software and timer interrupts. The tests and covergroups were developed following the guidelines outlined in the Test Plan

Related Issues

This pull request relies on the changes in the following PRs for full functionality and compatibility:

  1. Interrupt Coverage Support
  2. Print MTI value upon hart update for machine timer interrupt visibility

Ratified/Unratified Extensions

  • Ratified
  • Unratified

List Extensions

N/A

Reference Model Used

  • SAIL
  • Spike
  • Other - < SPECIFY HERE >

DUT 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 available here

Optional Checklist:

  • Were the tests hand-written/modified ?

@jamesbeyond jamesbeyond changed the title ACTs and coverage points for machine mode software and timer interrupts [ACT] ACTs and coverage points for machine mode software and timer interrupts Dec 2, 2024
…test.h to mitigate the issue of spurious interrupt
Copy link
Collaborator

@allenjbaum allenjbaum left a comment

Choose a reason for hiding this comment

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

In general, equations with constants (e.g. mip>>3 & 0x1!= 0x1) are not satisfactory. What would be satisfactory would be ((mip & MIP_MSIP)==0), where MIP_MSIP is #defined - and you don't even have to define it yourself because it is already defined in encoding.h which is #included. Note that this applies of almost CSR fields . The comments are quite appreciated, on the other hand.

MSIP_BASE: 0x02000000
MTIMECMP_BASE: 0x02004000
MTIME_BASE: 0x0200bff8
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where did these default values come from? There is a model defined variables, which should be named RVMODEL_MSIP_BASE, etc to be consistent with all other model defined variables.

Copy link
Author

Choose a reason for hiding this comment

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

These are standard RISC-V CLINT (Core-Local Interrupt) base addresses, which also used in the Sail model. MSIP_BASE and others are now replaced with the RVMODEL_MSIP_BASE etc in all ACTs.

#define RVMODEL_SET_MSW_INT
#define RVMODEL_SET_MSW_INT ;\
li t1, 1 ;\
li t2, 0x2000000 ;\
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. using constants is prohibited; use the value you defined above: MSIP_MBASE
  2. use of li is prohibited in tests; use LI(rd, mnemonic_value) instead.
    These apply to ALL li ops in all tests, not just this one

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it is replaced in all plugins and proper macro is used now.

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

Successfully merging this pull request may close these issues.

2 participants