Skip to content

fix(axi_to_detailed_mem): operator precedence in per-bank read-error mask causes spurious SLVERR on multi-bank reads#426

Merged
imchenwu merged 2 commits into
pulp-platform:masterfrom
siju-felsite:fix/axi_to_detailed_mem-rerror-precedence
Jun 22, 2026
Merged

fix(axi_to_detailed_mem): operator precedence in per-bank read-error mask causes spurious SLVERR on multi-bank reads#426
imchenwu merged 2 commits into
pulp-platform:masterfrom
siju-felsite:fix/axi_to_detailed_mem-rerror-precedence

Conversation

@siju-felsite

Copy link
Copy Markdown
Contributor

Summary

In axi_to_detailed_mem the per-bank read active-byte window uses two expressions that bind incorrectly under SystemVerilog operator precedence:

  • meta_buf.addr % DataWidth/8 parses as (meta_buf.addr % DataWidth) / 8, not the intended byte offset meta_buf.addr % (DataWidth/8).
  • ... + 1<<meta_buf.size parses as (... + 1) << meta_buf.size, not ... + (1<<meta_buf.size).

So meta_buf_size_enable[i] (the per-bank mask that gates read errors) is wrong. A sub-word read can count a bank it does not actually touch and raise a spurious SLVERR (seen as a load-access-fault on the second beat of a multi-bank read into an uninitialised neighbour word).

Fix

Parenthesize both sub-expressions so the window is [off, off + (1<<size)) with off = addr % (DataWidth/8). Read-error masking only; error-free reads are unaffected. +0 area/latency.

Operator precedence made the per-bank active-byte window wrong:
'addr % DataWidth/8' parses as '(addr % DataWidth)/8' and
'... + 1<<size' as '(...+1)<<size'. A sub-word read could then count a
bank it does not touch and raise a spurious SLVERR. Parenthesize both;
error-free reads unaffected.
@niwis niwis requested review from imchenwu and micprog June 19, 2026 16:52
@imchenwu imchenwu merged commit e55ae2a into pulp-platform:master Jun 22, 2026
3 checks passed
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.

3 participants