Skip to content

(ACT4) Hypervisor Interrupts Coverpoints#713

Open
TnnsBeast wants to merge 9 commits intoriscv:act4from
TnnsBeast:InterruptsH_coverpoints
Open

(ACT4) Hypervisor Interrupts Coverpoints#713
TnnsBeast wants to merge 9 commits intoriscv:act4from
TnnsBeast:InterruptsH_coverpoints

Conversation

@TnnsBeast
Copy link

Description

Adding coverpoints for hypervisor interrupts.

Related Issues

NA

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.

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

Optional Checklist:

  • 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.

… restricts mie/mip/hie/hideleg bins to required exact values
@TnnsBeast TnnsBeast marked this pull request as ready for review November 19, 2025 23:06
@davidharrishmc
Copy link
Collaborator

@TnnsBeast did you make changes responding to the reviews? If they are done, click the "resolve conversation" button to show they are no longer pending.

@davidharrishmc
Copy link
Collaborator

What is the mode_virt field? Do these tests compile and run? Are you waiting for a review?

Copy link
Collaborator

@davidharrishmc davidharrishmc left a comment

Choose a reason for hiding this comment

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

This coverage file needs pretty major refactoring to resemble the other coverage files. I gave some high level feedback about expressing cross products in terms of the inputs, not listing outputs in the cross-product, being specific about cross-product inputs so ignore_bins and binsof aren't needed, dividing into covergroups on a per-mode basis, and cross-checking the coverpoints against the testplan. Test that it compiles. It needs a heavy rewrite and then I'll need to proof from the start again.

Copy link
Collaborator

@davidharrishmc davidharrishmc left a comment

Choose a reason for hiding this comment

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

mode_virt isn't considered yet.

@jordancarlin jordancarlin changed the title (CVW) Hypervisor Interrupts Coverpoints (ACT4) Hypervisor Interrupts Coverpoints Dec 14, 2025
Copy link
Contributor

@SadhviNarayanan SadhviNarayanan left a comment

Choose a reason for hiding this comment

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

Left some comments, overall I think it's close!

cp_nohint_m: cross priv_mode_m, mstatus_mie_one, hideleg_vsi_zero, mie_vsi_ones, mip_vsi_ones;
`ifdef GILEN_GT_0
cp_mideleg_gei: cross priv_mode_m, mideleg_sgei_ro;
cp_mie_gilen: cross priv_mode_m, csrr_mie, hie_vsi_ones, hie_sgeie_one, mie_sgeie_one;
Copy link
Contributor

Choose a reason for hiding this comment

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

might be worth checking if you need all the hie_vsi_ones for this test, or if sgeie is sufficient?

`ifdef GILEN_GT_0
cp_hie_gilen: cross priv_mode_hs, csrr_hie, mie_vsi_ones, hie_sgeie_one;
cp_priority_sgei: cross priv_mode_hs, sstatus_sie_one, hvip_vsi_ones, hideleg_vsi_zero, hie_sgeie_one, hgeip_nonzero, hgeie_nonzero;
cp_priority_sgei_s: cross priv_mode_hs, sstatus_sie_one, hideleg_vsi_zero, hvip_vsi_ones, hie_sgeie_one, sie_ones, sip_priority, hgeip_nonzero, hgeie_nonzero;
Copy link
Contributor

Choose a reason for hiding this comment

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

is checking hgeip necessary for this?

cp_hie_gilen: cross priv_mode_hs, csrr_hie, mie_vsi_ones, hie_sgeie_one;
cp_priority_sgei: cross priv_mode_hs, sstatus_sie_one, hvip_vsi_ones, hideleg_vsi_zero, hie_sgeie_one, hgeip_nonzero, hgeie_nonzero;
cp_priority_sgei_s: cross priv_mode_hs, sstatus_sie_one, hideleg_vsi_zero, hvip_vsi_ones, hie_sgeie_one, sie_ones, sip_priority, hgeip_nonzero, hgeie_nonzero;
cp_trigger_sgei: cross priv_mode_hs, sstatus_sie, hgeip_nonzero, hgeie_nonzero, hie_sgeie_one;
Copy link
Contributor

Choose a reason for hiding this comment

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

testplan currently has sgeip/sgeie, so if hgeip/hgeie is what to use then maybe testplan should be updated to reflect this

cp_hideleg_hie_vs: cross priv_mode_vs, hideleg_vsi, hie_vsi, hip_vsi_ones, vsstatus_sie_one;
cp_hip_hie_vs: cross priv_mode_vs, hip_vsi, hie_vsi, hideleg_vsi_ones, vsstatus_sie_one;
cp_sie_vs: cross priv_mode_vs, hideleg_vsi_ones, hip_vsi_ones, hie_vsi_ones, vsstatus_sie;
cp_mideleg_mip_vs: cross priv_mode_vs, mstatus_mie_zero, mideleg_ones_zeros, mip_walking, mie_ones, vsstatus_sie_one;
Copy link
Contributor

Choose a reason for hiding this comment

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

for some of the cp's where you want all 1's, it might be easier to sometimes just use instr.prev to read the value of the csr

option.per_instance = 0;
`include "general/RISCV_coverage_standard_coverpoints.svh"

priv_mode_u_novirt: coverpoint {ins.prev.mode_virt, ins.prev.mode} {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as priv_mode_u in general cp's

@jordancarlin jordancarlin added the ACT4 Issues or PRs applicable to ACT4 label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ACT4 Issues or PRs applicable to ACT4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants