Skip to content

general fixes - #224

Draft
DanielKellerM wants to merge 6 commits into
develfrom
sweep/upstream-findings
Draft

DanielKellerM wants to merge 6 commits into
develfrom
sweep/upstream-findings

Conversation

@DanielKellerM

@DanielKellerM DanielKellerM commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

The legalizer already folds the bursting decision to a literal when a port
carries a single protocol class, but it still emitted a runtime protocol test
to decide whether to decouple. On a port where every protocol forces
decoupling the test is constant, so five of the nine backend variants shipped
dead logic, and rw_obi evaluated a condition that can never be false.

The test also mattered when it should not have. Software that leaves
dst_protocol at its reset value gets AXI, so on an OBI-only write port the
condition read false and the legalizer ran coupled and non-bursting while
every other protocol-dependent decision had already folded to OBI. MAGIA hit
this as a throughput collapse and worked around it in software.

AXI is the only protocol with bursts != not_supported and
legalizer_force_decouple false, so a port folds exactly when AXI is not one of
its protocols. Drop the coupled branch, its page-boundary comparator and the
now unused c_num_bytes_to_pb for those variants.
The distributed midend rebases each slice onto its region by subtracting the
transfer start address, but it subtracted only the low DmaRegionAddressBits of
it. For a transfer whose start lies outside region zero that drops the region
index, so every slice after the first was rebased to the wrong counterpart
address. Only the two address expressions are affected; the length terms
subtract a within-region residue and stay truncated.

MemPool hit this and fixed it downstream in mempool 1b4dc47b on 2024-01-25,
but the fix was never sent back upstream.
The multi-processor midends were pickled and documented but never simulated,
which is why the distributed midend shipped a wrong counterpart address for
two years. Check the split geometry directly: the distributed side must carry
the region-local address and the counterpart side the rebased one, for
transfers that start in a non-zero region, that start in region zero, that are
driven from either side, that fit in one region, and that span every back-end.

The split is combinational, so the testbench never handshakes and the stream
fork stays idle. Expectations derive from the parameters, so the topology
sweeps without a golden table.
IDMA_TYPEDEF_REQ_T has taken a user type since the Snitch multicast work, but
IDMA_TYPEDEF_FULL_REQ_T never forwarded one, so every user of the convenience
macro got the logic default and a one bit user field no matter how wide the
request was meant to be. That covers nearly all of the testbenches, which is
why the field has never been driven or checked anywhere.

Forward an optional user type. All existing call sites omit it and keep the
one bit field, so nothing changes for them. The distributed midend testbench
opts in with a 36 bit tag and checks it survives onto every slice.
NumDim was a localparam fixed at two, so the ND midend behind the inst64
frontend could never be given more dimensions. idma_transpose_midend asserts
NumDim >= 4, which put it out of reach of this frontend entirely.

Promote it to a parameter and keep the default at two, so existing
instantiations are unaffected and a system that wants the transpose midend or
a rank three transfer can ask for it.
An interconnect that resolves collectives in the network joins flits by
destination and mask, so participants that decompose a transfer differently
never join and the network stalls. The legalizer splits on the page boundary
and the source offset, so matching lengths alone do not guarantee matching
burst counts. Say so where DMUSER is documented, and record the new NumDim
parameter in the same table.
@DanielKellerM DanielKellerM changed the title sweep: Land the cross-project findings from the September 2026 sweep general fixes Sep 3, 2026
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.

1 participant