cp_fp_reg_edges: honor _frm suffix on fs2 and fs3 generators#1554
cp_fp_reg_edges: honor _frm suffix on fs2 and fs3 generators#1554Aditya Amol Kuchekar (dev-aditya-hub) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a gap in the floating-point coverpoint generators where cp_fs2_edges* and cp_fs3_edges* variants containing _frm were not actually crossing edge-value tests with all rounding modes, despite the coverpoint name implying that behavior. It aligns make_fs2_edges/make_fs3_edges behavior with the already-correct make_fs1_edges implementation.
Changes:
- Add
_frmdetection tomake_fs2_edgesandmake_fs3_edgesand iterate edge values across("dyn", "rdn", "rmm", "rne", "rtz", "rup")when requested. - Make bin names and descriptions frm-specific so per-frm generated cases remain distinct and accurately labeled.
|
Heads-up on landing order for this one. I have two other PRs touching the same file/concept:
Happy to sequence however you prefer. My read is #1469 first (pure refactor, no behavior change), then #1554, then #1467 on top of the deduped helper. But I'll defer to whatever order makes the review easier. |
|
I am concerned this change skips the tests entirely for cp_fs2_edges (without _frm) because frm_modes is set to None, and then the for loop doesn't iterate over any modes and doesn't print anything. Could be mistaken, but hard to be certain without looking at the emitted code. The floating-point tests are placeholders and will be superseded this summer by more comprehensive tests based on the IBM coverpoints. Not sure that it's worth investing more time in tweaking and reviewing the placeholders. |
|
On (1): On (2): fair point. #1469 (the refactor) already merged, so the shared helper is in tree. This PR is just the small follow-up that lets fs2/fs3 actually honor the |
|
As far as I can tell, this was fully done in #1469. Please update this PR if there is anything else that actually needs to change. For now, I’m going to close it. |
Summary
make_fs1_edgesincp_fp_reg_edges.pyhonors a_frmsuffix on the coverpoint name and crosses each edge value with all six rounding modes.make_fs2_edgesandmake_fs3_edgesignore the suffix and emit one frm-unspecified test per edge value.Problem
Because the registry uses longest-prefix matching, a coverpoint named
cp_fs2_edges_frmroutes tomake_fs2_edges, which silently drops the rounding-mode cross. The label says the suite covered the cross-product; the generated assembly did not. A DUT with a rounding-path bug that only triggers for specificfs2orfs3edge values (e.g., subnormalfs2with RTZ onfmadd.s) is never exercised, while the symmetricfs1case is.Fix
Mirror the
cross_frm/frm_modeshandling frommake_fs1_edgesintomake_fs2_edgesandmake_fs3_edges, including the bin-name and description suffixes so the generated labels stay distinct per frm mode.Risk
Low. When the coverpoint does not end in
_frm,frm_modes = [None]and the new loop runs exactly once per edge value withfrm=None, producing the same output as before. Only coverpoint names containing_frmare affected.