Skip to content

Zacas follow-up: fix amocas.q store and gate Zacas-only logic - #1915

Merged
rosethompson merged 2 commits into
openhwfoundation:rva23from
davidharrishmc:dh/zacas-followup
Oct 6, 2026
Merged

rosethompson merged 2 commits into
openhwfoundation:rva23from
davidharrishmc:dh/zacas-followup

Conversation

@davidharrishmc

Copy link
Copy Markdown
Contributor

#1880 merged before two changes landed. On RV64, amoalu treated amocas.q (funct3 100) as a narrow access and sign-extended bit 31 across the low doubleword it stores, which ImperasDV lockstep caught on the read-back. The second commit gates the Zacas logic that other modules keep without Zacas, since default synthesis does no boundary optimization, as discussed on #1880. With both, all 72 Zacas, ZacasZabha, Zabha, and Zaamo ACT tests pass on rv64gc and rv32gc and amocas.q is lockstep-clean; those tests need the ACT cvw sail.json main-memory atomic_support raised to AMOCASQ (rv64gc) or AMOCASD (rv32gc), or Sail traps every amocas.

🤖 Generated with Claude Code

davidharrishmc and others added 2 commits September 29, 2026 20:05
Default synthesis does no boundary optimization, so Zacas control signals
that cross module boundaries leave their logic behind even when Zacas is
not supported.  Gate the amocas select in the AMO ALU, the LSU's use of
AMOCASPairM, and the datapath's rs2-port borrow and compare/swap registers
with P.ZACAS_SUPPORTED.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: David Harris <David_Harris@hmc.edu>
w64 treated any funct3 whose low bits were not 11 as narrower than 64
bits, so amocas.q (funct3 100) sign-extended bit 31 across the low
doubleword it stores after a successful compare.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: David Harris <David_Harris@hmc.edu>
@rosethompson
rosethompson merged commit 69d2fb9 into openhwfoundation:rva23 Oct 6, 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.

2 participants