fix(testgen): add frm cross-product support to cp_fs2_edges and cp_fs3_edges#1450
Closed
dev-aditya-hub wants to merge 1 commit intoriscv:act4from
Closed
fix(testgen): add frm cross-product support to cp_fs2_edges and cp_fs3_edges#1450dev-aditya-hub wants to merge 1 commit intoriscv:act4from
dev-aditya-hub wants to merge 1 commit intoriscv:act4from
Conversation
Collaborator
|
This was intentional to not include all cross products. An ideal suite would have cross of fs1, fs2, fs3, and rm, but the runtime explodes.
There is a more systematic treatment of floating-point based on IBM coverpoints in progress that we expect to deploy this summer.
I would suggest only fixing bugs in floating-point tests at this point, but not adding new coverage.
… On May 7, 2026, at 8:09 AM, Aditya Kuchekar ***@***.***> wrote:
Summary
cp_fs2_edges and cp_fs3_edges were missing the frm cross-product logic that cp_fs1_edges already has. When a coverpoint name contains _frm, the generator is expected to iterate over all six rounding modes (dyn, rdn, rmm, rne, rtz, rup) and emit one test bin per edge value per mode.
Without this, any test plan referencing cp_fs2_edges_frm or cp_fs3_edges_frm would silently produce tests with frm=None. The assembler defaults to DYN in that case, and since fcsr.frm is at its reset value of RNE, a DUT that hardwires RNE computes the correct result and passes every bin without being asked to use any other rounding mode.
Fix
Added cross_frm = "_frm" in coverpoint and the inner for frm_mode in frm_modes loop to both cp_fs2_edges and cp_fs3_edges, matching the structure already present in cp_fs1_edges. Bin names and description strings now include the frm suffix when a rounding mode is active, consistent with the existing pattern.
Files Changed
coverpoints/cp_fp_reg_edges.py — add frm cross-product logic to make_fs2_edges and make_fs3_edges
Test plan
Coverpoints containing _frm now produce six bins per edge value from cp_fs2_edges and cp_fs3_edges, matching the output of cp_fs1_edges for the same input
Coverpoints without _frm still produce one bin per edge value with frm=None, identical to the previous behavior
Existing YAML test plans that use cp_fs2_edges without the _frm suffix are unaffected
You can view, comment on, or merge this pull request online at:
#1450
Commit Summary
cb9e81e <cb9e81e> fix(testgen): add frm cross-product support to cp_fs2_edges and cp_fs3_edges
File Changes (1 file <https://github.com/riscv/riscv-arch-test/pull/1450/files>)
M generators/testgen/src/testgen/coverpoints/cp_fp_reg_edges.py <https://github.com/riscv/riscv-arch-test/pull/1450/files#diff-5d5b8aa92bdea8d20ea324c98d9dc94664552d47149e35d924159732fd481ab9> (32)
Patch Links:
https://github.com/riscv/riscv-arch-test/pull/1450.patch
https://github.com/riscv/riscv-arch-test/pull/1450.diff
—
Reply to this email directly, view it on GitHub <#1450>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AR4AA3ZZNJZSJFHVXEG3FRT4ZSRL7AVCNFSM6AAAAACYUXVZ76VHI2DSMVQWIX3LMV43ASLTON2WKOZUGM4TSNZYGE3DCNQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
cp_fs2_edgesandcp_fs3_edgeswere missing the frm cross-product logic thatcp_fs1_edgesalready has. When a coverpoint name contains_frm, the generator is expected to iterate over all six rounding modes (dyn,rdn,rmm,rne,rtz,rup) and emit one test bin per edge value per mode.Without this, any test plan referencing
cp_fs2_edges_frmorcp_fs3_edges_frmwould silently produce tests withfrm=None. The assembler defaults to DYN in that case, and sincefcsr.frmis at its reset value of RNE, a DUT that hardwires RNE computes the correct result and passes every bin without being asked to use any other rounding mode.Fix
Added
cross_frm = "_frm" in coverpointand the innerfor frm_mode in frm_modesloop to bothcp_fs2_edgesandcp_fs3_edges, matching the structure already present incp_fs1_edges. Bin names and description strings now include the frm suffix when a rounding mode is active, consistent with the existing pattern.Files Changed
coverpoints/cp_fp_reg_edges.py— add frm cross-product logic tomake_fs2_edgesandmake_fs3_edgesTest plan
_frmnow produce six bins per edge value fromcp_fs2_edgesandcp_fs3_edges, matching the output ofcp_fs1_edgesfor the same input_frmstill produce one bin per edge value withfrm=None, identical to the previous behaviorcp_fs2_edgeswithout the_frmsuffix are unaffected