Repository navigation
test(bitnet): harden MAC coverage (overflow boundary + randomized reference sweep) - #1735
Merged
Merged
Conversation
… sweep Follow-up to the adder_tree_27 overflow fix (#1733). Add to the functional MAC testbench: (1) level-2 boundary vectors summing to exactly +/-8 (the value the old signed [3:0] wrapped), and (2) a 200-vector randomized sweep checked against an independent in-testbench reference dot product. All pass; no further MAC arithmetic bug in the searched space. Test-only; no reseal. Closes #1734 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
Follow-up to the ternary MAC overflow fix (#1733). The functional testbench found that bug with 6 golden vectors; this hardens it so the bug class is provably dry and future arithmetic regressions are caught.
Closes #1734
Added to
tests/bitnet_compute_mac.rssigned [3:0]wrapped (it holds only +7), so this pins the fix at its boundary.ref_dot(decode + multiply-accumulate, not using the DUT reduction tree). Any discrepancy would mean a real DUT bug.Result
All golden + boundary + 200 random vectors pass → no further MAC arithmetic bug in the searched space. Test-only; no compiler/emitter change, no reseal. Skips gracefully without iverilog/vvp.
🤖 Generated with Claude Code