Repository navigation
feat(w42): stoch_round + lfsr32 RTL + TB 10/10 (Sacred 0xE9) - #150
Merged
Merged
Conversation
This was referenced May 15, 2026
Closed
gHashTag
added a commit
that referenced
this pull request
Aug 17, 2026
Two source files differing only in BUFR_DIVIDE, built with the stock
toolchain and with the patched one:
stock 05aaa06 patched (PR #151)
BYPASS BUFR_DIVIDE.BYPASS BUFR_DIVIDE.BYPASS
D5 BUFR_DIVIDE.BYPASS BUFR_DIVIDE.D5
If the stock column is identical for two different designs, the bug is
real; if the patched column differs only where it should, the fix is
right and carries no regression. Both are asserted, not eyeballed.
The probe clocks an ODDR from the BUFR output. A fabric flip-flop would
be reached through a BUFG and would never touch the regional clock; the
ODDR is an OLOGIC flop inside the IOI tile, so the clock must arrive
over RCLK and cross the pseudo-pip that carries the configuration --
which is the thing under test.
If no BUFR feature appears at all, the run fails saying the probe is
wrong rather than the claim. A test that cannot distinguish 'refuted'
from 'never ran' is not a test.
Part xc7a35tcsg324-1 and pins from prjxray's own arty-a7 harness, so it
matches the goldens in #150: a Vivado reference build needs no
re-pinning, and the same two files serve the BUFIO half of #149.
On silicon the output pin toggles at BUFR_O/2, so the builds are
distinguishable without a decoder: 50 MHz for BYPASS, 10 MHz for D5.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gHashTag
added a commit
that referenced
this pull request
Aug 19, 2026
…e diff says why Asked to re-measure the benchmark against a toolchain carrying the SDP BRAM fix. Read the fix first: f1c771349 touches one file, xilinx/fasm.cc, +49/-1, entirely inside write_bram_width -- the FASM backend, downstream of everything the harness times. yosys is untouched, so synth_ms cannot move. The placer and router are untouched; the added work is two integer comparisons per BRAM width parameter during FASM write, inside the same nextpnr invocation that already takes tens of seconds. The frame count is fixed by the part, so setting additional bits does not move bit_ms. The wall-clock rows therefore stand as measured, and so does the ratio. The fix changes what the bitstream contains, not how long it takes to produce: it emits READ_WIDTH_B_18 / WRITE_WIDTH_A_18 for SDP ports whose opposite side yosys leaves at 0, which is why the VexRiscv ROM returned garbage in the upper half of every read while the timing looked fine. What a re-run would legitimately establish is functional -- that the design boots -- which is a silicon test on an Arty-S7, not a timing campaign. Also corrects two commit ids to their full unambiguous prefixes after checking all three against the upstream tree: 05aaa06bc is the freeze, f1c771349 the fix, d5b2c610a its merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #149
Hardware stochastic-rounding unit for INT4 unbiased MAC, sacred opcode 0xE9 OP_STOCH_ROUND.
Files
rtl/lfsr32.sv— 32-bit Galois LFSR, taps 0x80200003, max-period 2^32-1, default seed ACE1ACE1rtl/stoch_round.sv— stochastic rounding unit, modes: RNE/STOCH/FLOOR, single-cycle latencytb/stoch_round_tb.sv— testbench 11/11 asserts (≥10 per spec)Verification
Assert inventory
φ²+φ⁻²=3 · DOI 10.5281/zenodo.19227877