Repository navigation
[hardware] Wait for VF4/VF8 extension hazards - #543
Open
lionelZhaowy wants to merge 2 commits into
Open
lionelZhaowy wants to merge 2 commits into
lionelZhaowy wants to merge 2 commits into
Conversation
Wait until existing hazards clear before VF4/VF8 widening reads. The original two-write throttle permits older destination loads to overwrite new extension results. Keep other request types unchanged. Add an official-runtime regression with independent byte expectations. The same ELF reports 688 errors on main and zero with this change. Three official vector regressions, VCS lint, and real-module 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.
An older whole-register load can overwrite a correct VF4 or VF8
vsext/vzextresult. At e32/m4 and VL=256,vl4re8.v v24, (...)followed byvzext.vf4 v24, v8produces 224 wrong elements on main.The requester's widening-hazard throttle allows two writes per source read, but VF4/VF8 can produce four or eight. This patch waits for the existing dependency bits to clear for those four conversions. Their RAW/WAR dependencies also wait conservatively. Other request types keep their current behavior. Related hazard work: #203.
The same ELF passes all 1037 checks with the fix. The four original zero/sign VF4/VF8 cases report 224/224/120/120 errors.
Validation, reproduction and scope
The new
apps/ext_hazardstest uses disjoint aligned register groups andchecks every result, guards, VL, and vstart. On main
34bd3bc152421b4601a7bf3d6e8e91ffb545c99e, the four zero/sign VF4/VF8cases report 224/224/120/120 errors. With this patch, the same ELF passes
all 1037 checks. Both versions finish normally. The unmodified official
vsext,vzext, andvwmultests pass with the patch.Validation uses the official
ara_tb, real CVA6, locked dependencies,2 lanes/VLEN2048, LLVM 20.1.0, and VCS W-2024.09-SP1. VCS elaboration and
lint pass without added diagnostics. Real requester DC generic synthesis
has zero latches and adds nine flip-flops. There is no technology mapping
or timing result. Other lane counts and broader performance effects were
not measured.
See
apps/ext_hazards/README.mdfor the trigger, result table, and publicbuild/run commands. Existing RTL authors and licenses remain unchanged.
The patch adaptation, regression, and explanation were prepared with AI
assistance.
ext_hazardsnow 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.