Repository navigation
[rtl,pre_dv,doc] Fix access handling with byte 0 disabled or error - #21
Open
martin-velay wants to merge 1 commit into
Open
martin-velay wants to merge 1 commit into
martin-velay wants to merge 1 commit into
Conversation
raylau1
force-pushed
the
fix-zero-mask-write
branch
from
December 4, 2026 15:35
f249d3f to
70f8e5e
Compare
Contributor
|
@martin-velay Please let me know if the changes look good. |
This was referenced Dec 4, 2026
raylau1
force-pushed
the
fix-zero-mask-write
branch
3 times, most recently
from
December 4, 2026 16:58
8e3d6ad to
117db16
Compare
Every register sits in byte 0 and a TL-UL request with a_mask[0] clear should have no effect. This change is needed for Mocha because mem_downsizer can generate requests with a_mask clear, which are intended to be ignored. This commit also fixes d_opcode from request errors. Co-authored-by: Martin Velay <mvelay@lowrisc.org> Signed-off-by: Ray Lau <ray.lau@lowrisc.org>
raylau1
force-pushed
the
fix-zero-mask-write
branch
from
December 4, 2026 17:32
117db16 to
4f2183a
Compare
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.
Every register sits in byte 0 of its word, so a write with
a_mask[0]clear now gets anAccessAckand changes nothing. TL-UL leaves the data of a disabled byte undefined, and the translator used to write the register from it.Mocha's
mem_downsizerturns each 64-bit beat into two 32-bit accesses, so every 32-bit store also writes the other word of its 8-byte pair witha_mask0. EachTHRwrite clearedIERand eachIERwrite sent a stray character, which breaks the PLIC interrupt test in lowRISC/mocha#853.The pre_dv bench now writes
IERandSCRwith byte 0 disabled and checks that they keep their value. Both checks fail without the RTL change. With the change vendored into Mocha, the UART and PLIC chip tests pass on Xcelium and Verilator.