Repository navigation
[hardware] Fix inactive values for legal integer-extension overlap - #545
Open
lionelZhaowy wants to merge 2 commits into
Open
lionelZhaowy wants to merge 2 commits into
lionelZhaowy wants to merge 2 commits into
Conversation
Carry the internal fill flag under the original instruction ID. Drain older work and wait for the real handshake and final writes. Keep source-group scan and generic whole-store mask issues separate. Same official two-lane ELF: 98 errors before, zero after in 1842 checks. Seven official regressions, unchanged lint diagnostics, and real-module generic DC structure checks pass. Add the public test and passive observer. The patch adaptation, tests, and text used AI assistance. An independent AI review checked the source, input bindings, raw results, and structure.
This branch has not been deployed
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.
Legal integer-extension overlap can corrupt inactive destination elements when VL is below VLMAX. The smaller-EEW source occupies the high part of the destination register group. Main changes the destination EEW without rewriting those inactive elements.
This patch detects that overlap for the six integer-extension selectors, drains older work, and sends the original request with an internal fill flag. The VALU writes inactive and tail elements as all ones under the same instruction ID. Operand and mask lengths stay unchanged. The dispatcher waits for the request handshake and final completion. VL=0 and vstart>=VL create no fill or reshuffle work.
Related: #421 and #531 discuss reshuffling and retained elements. This patch handles different-EEW overlap with VL below VLMAX. It does not include #421's full source-group scan or #531's full-VL shortcut.
The official 2024-04-11 RVV 1.0 text makes different-EEW overlap mask- and tail-agnostic.
Its Vector Operands section defines legal high-part overlap. Section 3.4.3 permits old-value or all-ones agnostic elements.
The older repository v1.0 tag lacks this explicit overlap clarification. This test follows the published 2024 rule.
The test still requires exact active elements and complete old values for no-body controls.
The same six-case ELF improves from 98 errors to zero across 1842 checks. The seven listed unmodified official tests also pass.
Validation, reproduction and scope
Validation on official main
34bd3bc152421b4601a7bf3d6e8e91ffb545c99e, two lanes, VLEN=2048:ara_tb, CVA6, locked dependencies, LLVM 20.1.0, VCS W-2024.09-SP1.The source, passive observer, exact commands, ELF SHA256, expected values, and limitations are in
apps/extension_tail/README.md.The test fixes the scalar export base to x5 to isolate a separate whole-store register-name collision.
It preserves the independent golden values. That separate export defect is outside this patch.
This test does not establish all extension selectors, every overlap placement, nonzero-vstart restart, or other lane counts.
Original RTL authors and licenses remain. New test and observer files use Apache-2.0.
AI assistance was used for the patch adaptation, tests, and text.
An independent AI review checks the diff and actual results. It is not represented as human review.
extension_tailnow runs in the existing CI matrix at 2 lanes / VLEN2048, with a native 10000000-cycle limit. The fixed-size application is not added to the larger-VLEN simulation entries. It compiles in all four configurations. Local verification uses the locked LLVM 20.1.0/newlib sources and Verilator commit06263ec7: the new application passes at 2 lanes, and HelloWorld plus the affected original instruction tests pass at 2/4/8/16 lanes. All 13 local runs finish withtohost = 0, exit 0 and no runtime assertion errors. License checks pass. This update leaves the RTL and dependency lock unchanged.