fix(reg_to_tlul): request a full-word a_mask on Get — partial read mask zeroes unrequested byte lanes#64
Open
siju-felsite wants to merge 1 commit into
Conversation
On a Get the reg-bus write strobe is not a meaningful read mask; a partial a_mask makes mask-honoring TL-UL targets (e.g. tlul_adapter_sram) zero the unrequested byte lanes, silently corrupting sub-word/SRAM-backed reads. Drive a_mask all-ones on reads; keep the strobe on the Put path.
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.
Summary
reg_to_tluldrives the TL-UL A-channel byte mask from the reg-bus write strobe for every request (assign tl_o.a_mask = reg_req_i.wstrb;). On a read (Get) the write strobe is not a meaningful read mask and may be partial. TL-UL targets that honora_maskon reads (e.g.tlul_adapter_sram, which masksrdatabya_mask) then return only the masked byte lanes and zero the rest, silently corrupting sub-word / SRAM-backed reads. CSR targets that ignore the read mask hide the bug.Fix
Request the full word on a read; keep the write strobe only for writes:
assign tl_o.a_mask = reg_req_i.write ? reg_req_i.wstrb : '1;a_sizeis fixed at 2 (4 bytes), so'1is the full mask. +0 area/latency.Notes
Independent, second fix to this module alongside #63 (the A-channel one-outstanding handshake) — different lines, mergeable in any order. Surfaced bringing up a 64-bit-AXI → 32-bit-reg bridge (two Gets per read into an SRAM-backed window). Glad to add a directed TB (partial-mask Get to a mask-honoring SRAM target, assert all lanes return) if preferred.