-
Notifications
You must be signed in to change notification settings - Fork 301
Added RVA23 coverage and test generators #1305
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
82587cd
Add RVA23 coverage and test generators
66fcf07
[autofix.ci] apply automated fixes
autofix-ci[bot] 078953b
Merge branch 'act4' into RVA23-clean
Ammarahwakeel ab035c5
Required changes in Ssuu64xl
4c6713b
Merge branch 'RVA23-clean' of https://github.com/Ammarahwakeel/riscv-…
b898ef9
Required changes in zic64bzicboz
fe9b349
Added required changs in za64rs
b362c9a
Merge branch 'act4' into RVA23-clean
Ammarahwakeel ebacd87
Required changes in S
98760dd
Merge branch 'RVA23-clean' of https://github.com/Ammarahwakeel/riscv-…
7ed0f52
Added Sm1p13 coverage and tests
17a22fe
Excluded Za64rs for spike and qemu metrices
9c2ac8d
Removed trailing space
17bc6b3
Excluded Za64rs from runnning on cvw matrix
3c01518
Added indentation in S coverage
2e951b1
Fixed indentations and seperated out misa_b and misa_v bits
6b70bbf
Added interrupt latency macro for Sm1p13
d94b75d
Added macro
de95c39
Merge branch 'act4' into RVA23-clean
Ammarahwakeel f22523d
Required changes for ss1p13
87af4c9
Required changes in sm1p13
dac2692
Required changes in Ssu64xl
eff5af0
Applied range for coveing offsets
ba16006
Fixed coverage init file
74e06c8
Added the read back scenerio of uxl bits in ss1p13
ce80f5c
Added documentation
77dc469
Added requested changes in coverage of ss1p13, sm1p13
7d36395
fixed minor typos in python generators
d2064ed
Merge branch 'act4' into RVA23-clean
Ammarahwakeel 4e66927
Aded RVMODEL_MSIP_ADDRESS macro in config files
f71c313
Merge branch 'act4' into RVA23-clean
Ammarahwakeel 8b04dcf
Merge branch 'act4' into RVA23-clean
Ammarahwakeel d34f7b9
Merge branch 'act4' into RVA23-clean
davidharrishmc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups | ||
| // | ||
| // Written: Ammarah Wakeel email:ammarahwakeel9@gmail.com (UET, April 2026) | ||
| // | ||
| // Copyright (C) : 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| // Description: Coverage for RVA23 profile - Ssu64xl extension | ||
| // | ||
| /////////////////////////////////////////////// | ||
|
|
||
| `define COVER_SSU64XL | ||
|
|
||
| covergroup Ssu64xl_cg with function sample(ins_t ins); | ||
| option.per_instance = 0; | ||
|
|
||
|
Ammarahwakeel marked this conversation as resolved.
|
||
| `include "general/RISCV_coverage_standard_coverpoints.svh" | ||
|
|
||
| `ifdef XLEN64 | ||
|
|
||
| sstatus_uxl_after: coverpoint get_csr_val(ins.hart, ins.issue, `SAMPLE_AFTER, "sstatus", "uxl") { | ||
| bins uxl_is_10 = {2'b10}; | ||
| } | ||
| gpr_bit63: coverpoint ins.current.rd_val[63] { | ||
| bins bit63_set = {1'b1}; | ||
| } | ||
|
|
||
| cp_ssu64xl: cross priv_mode_u, sstatus_uxl_after, gpr_bit63; | ||
|
|
||
| `endif | ||
|
|
||
| endgroup | ||
|
|
||
| function void ssu64xl_sample(int hart, int issue, ins_t ins); | ||
| Ssu64xl_cg.sample(ins); | ||
| endfunction | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups Initialization File | ||
| // | ||
| // Copyright (C) 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| /////////////////////////////////////////////// | ||
|
|
||
| Ssu64xl_cg = new(); | ||
| Ssu64xl_cg.set_inst_name("obj_Ssu64xl"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups | ||
| // | ||
| // Written: Ammarah Wakeel email:ammarahwakeel9@gmail.com (UET, April 2026) | ||
| // | ||
| // Copyright (C) : 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| // Description: Coverage for Za64rs extension (Reservation sets are contiguous, naturally aligned, and a maximum of 64 bytes) | ||
| /////////////////////////////////////////////// | ||
|
|
||
|
|
||
| `define COVER_ZA64RS | ||
|
|
||
| covergroup Za64rs_cg with function sample(ins_t ins); | ||
| option.per_instance = 0; | ||
| `include "general/RISCV_coverage_standard_coverpoints.svh" | ||
|
|
||
| lr_w_instr: coverpoint ins.prev.insn { | ||
| wildcard bins lr_w = {LR_W}; | ||
| } | ||
| sc_w_instr: coverpoint ins.current.insn { | ||
| wildcard bins sc_w = {SC_W}; | ||
| } | ||
| lr_w_base_aligned: coverpoint ins.prev.rs1_val[5:0] { | ||
| bins aligned_64 = {6'd0}; | ||
| } | ||
| sc_offset: coverpoint ins.current.rs1_val[6:0] { | ||
|
Ammarahwakeel marked this conversation as resolved.
|
||
| bins offset_aligned[] = {[7'd0 : 7'd64]} with (item % 4 == 0); | ||
| } | ||
|
|
||
| cp_za64rs: cross sc_w_instr, sc_offset, lr_w_instr, lr_w_base_aligned ; | ||
|
|
||
| endgroup | ||
|
|
||
| function void za64rs_sample(int hart, int issue, ins_t ins); | ||
| Za64rs_cg.sample(ins); | ||
| endfunction | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups Initialization File | ||
| // | ||
| // Copyright (C) 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| /////////////////////////////////////////////// | ||
|
|
||
| Za64rs_cg = new(); | ||
| Za64rs_cg.set_inst_name("obj_Za64rs"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups | ||
| // | ||
| // Written: Ammarah Wakeel email:ammarahwakeel9@gmail.com (UET, April 2026) | ||
| // | ||
| // Copyright (C) : 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| // Description: Coverage for RVA23U64 profile - Zic64bzicboz extension | ||
| /////////////////////////////////////////////// | ||
|
|
||
| `define COVER_ZIC64BZICBOZ | ||
|
|
||
| covergroup Zic64bzicboz_cg with function sample(ins_t ins); | ||
| option.per_instance = 0; | ||
| `include "general/RISCV_coverage_standard_coverpoints.svh" | ||
|
|
||
| cbo_zero: coverpoint ins.current.insn { | ||
| wildcard bins cbo_zero = {CBO_ZERO}; | ||
| } | ||
| cbo_zero_offset: coverpoint ins.current.rs1_val[6:0] { | ||
|
Ammarahwakeel marked this conversation as resolved.
|
||
| bins offset_aligned[] = {[7'd0 : 7'd64]} with (item % 4 == 0); | ||
| } | ||
|
|
||
| cp_zi64cb: cross cbo_zero, cbo_zero_offset ; | ||
|
|
||
| endgroup | ||
|
|
||
| function void zic64bzicboz_sample(int hart, int issue, ins_t ins); | ||
| Zic64bzicboz_cg.sample(ins); | ||
| endfunction | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /////////////////////////////////////////////// | ||
| // RISC-V Architectural Functional Coverage Covergroups Initialization File | ||
| // | ||
| // Copyright (C) 2026 Harvey Mudd College, 10x Engineers, UET Lahore, Habib University | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
| /////////////////////////////////////////////// | ||
|
|
||
| Zic64bzicboz_cg = new(); | ||
| Zic64bzicboz_cg.set_inst_name("obj_Zic64bzicboz"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.