Skip to content

Added RVA23 coverage and test generators#1305

Merged
davidharrishmc merged 33 commits intoriscv:act4from
Ammarahwakeel:RVA23-clean
Apr 26, 2026
Merged

Added RVA23 coverage and test generators#1305
davidharrishmc merged 33 commits intoriscv:act4from
Ammarahwakeel:RVA23-clean

Conversation

@Ammarahwakeel
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

@jordancarlin jordancarlin left a comment

Choose a reason for hiding this comment

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

I haven't reviewed it in detail yet, but here are a few initial comments. Also, if we are adding Ss1p13 tests, it might make sense to add Sm1p13 tests at the same time.

Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Za64rs.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
@Ammarahwakeel
Copy link
Copy Markdown
Contributor Author

Ammarahwakeel commented Apr 19, 2026

I haven't reviewed it in detail yet, but here are a few initial comments. Also, if we are adding Ss1p13 tests, it might make sense to add Sm1p13 tests at the same time.

Yes, I have worked on Sm1p13 too, I just have not pushed it here yet.

Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread coverpoints/priv/Za64rs_coverage.svh Outdated
Comment thread coverpoints/priv/Za64rs_coverage.svh Outdated
Comment thread coverpoints/priv/Za64rs_coverage.svh Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py Outdated
Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread config/cores/cvw/ci.yaml
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Sm.py Outdated
Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
Comment thread coverpoints/priv/Za64rs_coverage.svh
Comment thread coverpoints/priv/Zic64bzicboz_coverage.svh
Comment thread generators/testgen/src/testgen/priv/extensions/S.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Sm.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Sm.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new privileged-extension test generators and corresponding functional coverage plumbing for RVA23-related extensions, plus extends existing Sm/S coverage for 1.13-specific behaviors.

Changes:

  • Added new priv test generators for Zic64bzicboz, Za64rs, and Ssu64xl.
  • Added new SystemVerilog covergroups + init/sample/config wiring for those extensions.
  • Extended existing Sm and S generators/coverpoints with SS1P13/SM1P13-related scenarios.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py New test generator for cbo.zero offsets + signature checks.
generators/testgen/src/testgen/priv/extensions/Za64rs.py New test generator for LR/SC reservation-set sizing behavior.
generators/testgen/src/testgen/priv/extensions/Ssu64xl.py New test generator for sstatus.UXL=2 / U-mode 64-bit behavior.
generators/testgen/src/testgen/priv/extensions/Sm.py Adds SM1P13-gated tests for misa.B/V, msip, and medelegh.
generators/testgen/src/testgen/priv/extensions/S.py Adds SS1P13-gated tests for attempted sstatus.UXL writes.
coverpoints/priv/Zic64bzicboz_coverage_init.svh Initializes the Zic64bzicboz covergroup instance.
coverpoints/priv/Zic64bzicboz_coverage.svh New covergroup for cbo.zero and address-bit offset bins.
coverpoints/priv/Za64rs_coverage_init.svh Initializes the Za64rs covergroup instance.
coverpoints/priv/Za64rs_coverage.svh New covergroup for LR/SC + offset/alignment cross coverage.
coverpoints/priv/Ssu64xl_coverage_init.svh Initializes the Ssu64xl covergroup instance.
coverpoints/priv/Ssu64xl_coverage.svh New covergroup for U-mode + UXL=2 + GPR[63] cross.
coverpoints/priv/Sm_coverage.svh Adds SM1P13 coverpoints/crosses for misa bits, msip→mip propagation, medelegh.
coverpoints/priv/S_coverage.svh Adds SS1P13 coverpoints/crosses for attempted UXL writes.
coverpoints/coverage/RISCV_coverage_config.svh Adds conditional includes for new covergroups.
coverpoints/coverage/RISCV_coverage_base_sample.svh Adds sampling calls for new covergroups.
coverpoints/coverage/RISCV_coverage_base_init.svh Adds init includes for new covergroups.
config/spike/ci.yaml Adds Za64rs to excluded extensions list for CI.
config/qemu/ci.yaml Adds Za64rs to excluded extensions list for CI.
config/cores/cvw/ci.yaml Adds Za64rs to excluded extensions list for CI.

Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/S.py Outdated
Comment thread coverpoints/priv/Zic64bzicboz_coverage_init.svh Outdated
Comment thread coverpoints/priv/S_coverage.svh Outdated
@davidharrishmc
Copy link
Copy Markdown
Collaborator

@Ammarahwakeel : @jordancarlin pointed out that the sail.json has a "reservation_set_size_exp" item. We just need to change that to match the DUT so we can pass the Za64rs tests. We don't need the clever exploration of the size - no need to change your tests, just the config file.

@Ammarahwakeel
Copy link
Copy Markdown
Contributor Author

@Ammarahwakeel : @jordancarlin pointed out that the sail.json has a "reservation_set_size_exp" item. We just need to change that to match the DUT so we can pass the Za64rs tests. We don't need the clever exploration of the size - no need to change your tests, just the config file.

yes, This is the same item, i was referring to earlier in my message. So, it has value of 3, making reservation set size=2^3=8, and that is why sail is saying to expect a success for sc.w when we have base address+ 4 (offset), while other metrices have reservation set size=4, as they are only passing for offset+0.

But based on this comment (riscv-software-src/riscv-isa-sim#2256 (review)), SC can fail regardless of reservation set size. So would changing the "reservation_set_size_exp" =2 be good to go?

@pmundkur
Copy link
Copy Markdown
Contributor

See riscv/sail-riscv#1675

Comment thread config/cores/cvw/ci.yaml
Comment thread coverpoints/priv/S_coverage.svh Outdated
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread coverpoints/priv/Sm_coverage.svh Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Sm.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 19 changed files in this pull request and generated 6 comments.

Comment thread generators/testgen/src/testgen/priv/extensions/S.py
Comment thread generators/testgen/src/testgen/priv/extensions/Za64rs.py
Comment thread generators/testgen/src/testgen/priv/extensions/Zic64bzicboz.py
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Ssu64xl.py Outdated
Comment thread generators/testgen/src/testgen/priv/extensions/Sm.py Outdated
@Ammarahwakeel
Copy link
Copy Markdown
Contributor Author

Ammarahwakeel commented Apr 24, 2026

Prof. @davidharrishmc , just added RVMODEL_MSIP_ADDRESS macro across all config files, could you please review and let me know if the implementation is correct or if any changes are needed?

@davidharrishmc davidharrishmc dismissed jordancarlin’s stale review April 26, 2026 11:49

Verified changes made

@davidharrishmc davidharrishmc added this pull request to the merge queue Apr 26, 2026
Merged via the queue into riscv:act4 with commit babd883 Apr 26, 2026
35 checks passed
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.

5 participants