Repository navigation
[hardware] Reject unsupported active arithmetic vstart - #544
Open
lionelZhaowy wants to merge 2 commits into
Open
lionelZhaowy wants to merge 2 commits into
lionelZhaowy wants to merge 2 commits into
Conversation
Reject active nonzero vstart for VADD and integer extensions under RVV 1.0 section 3.7. Preserve the existing empty-body path. Do not add restart execution capability. Add a public official-runtime regression. The same ELF shows two prestart errors on main and passes with precise rejection. Four official regressions, VCS lint, and real dispatcher generic synthesis pass for two lanes and VLEN2048. The patch, test, and explanation were prepared with AI assistance. Preserve the existing RTL authors and license.
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.
With VL=4 and vstart=1, main executes
vadd.vvandvsext.vf4but overwrites destination element zero. That prestart element must remain unchanged. The regression accepts either correct resumed execution or a precise illegal-instruction exception. Main produces neither.RVV 1.0 section 3.7 permits rejecting a vstart value that the implementation cannot produce for that instruction. This patch applies that policy to active nonzero vstart for VADD.vv/vx/vi and the six integer extensions. It preserves the vstart>=VL no-write path, memory interfaces and CSR interfaces. It does not add arithmetic restart support.
The same six-case ELF reports two prestart errors on main and passes with the patch. The active-start cases trap without writing the destination.
Validation, reproduction and scope
On official main
34bd3bc152421b4601a7bf3d6e8e91ffb545c99e, six casesproduce two prestart errors. The same ELF passes with the patch. The two
active-start cases report cause 2, the original instruction in mtval, and
the original vstart, with no destination write. Normal-start and empty-body
controls pass. Both versions finish normally. Patched RTL also passes the
unmodified official vadd, vsext, vzext, and vwmul tests.
Validation uses the official ara_tb and real CVA6, locked dependencies,
2 lanes/VLEN2048, LLVM 20.1.0, and VCS W-2024.09-SP1. VCS elaboration and
lint add no diagnostics. Real dispatcher generic DC synthesis has 738
flip-flops and zero latches in both versions. There is no technology mapping
or timing result. Direct nonzero-start probes cover the two stated forms.
Related reports: #237 covers an older vstart>=VL boundary. #494 concerns
the separate mandatory-illegal instruction list. This patch covers neither
that list nor successful arithmetic restart.
See
apps/active_vstart/README.mdfor complete public commands and checks.The RTL retains its authors and license. The patch, regression, and
explanation were prepared with AI assistance.
active_vstartnow 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.