Skip to content

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
dev-aditya-hub:fix/cp-fs2-fs3-edges-frm-support-clean
Closed

fix(testgen): add frm cross-product support to cp_fs2_edges and cp_fs3_edges#1450
dev-aditya-hub wants to merge 1 commit intoriscv:act4from
dev-aditya-hub:fix/cp-fs2-fs3-edges-frm-support-clean

Conversation

@dev-aditya-hub
Copy link
Copy Markdown
Contributor

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

@davidharrishmc
Copy link
Copy Markdown
Collaborator

davidharrishmc commented May 7, 2026 via email

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