Repository navigation
[hardware] Qualify scalar responses by their return path - #539
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 for MASKU to release MaskB before acknowledging vector-to-scalar moves. Preserve the dedicated VCPOP/VFIRST result path and leave stores to the address-generation response path. Exercise scalar extraction while a comparison is pending, stores sharing the response window, and dedicated mask results in the existing scalar-move tests.
2 of 3 tasks
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 unmasked mask comparison followed by
vmv.x.sorvfmv.f.scan return the old mask operand instead of the requested vector element. The e32 regression computes +3.0 in v8, issuesvmfeq.vv v10, v12, v14, and immediately extracts v8[0]. Main returns0x00000000instead of0x40400000.The sequencer can respond before MASKU releases the shared MaskB operand path. Its
!use_vdcondition also includes stores, allowing a response before address generation acknowledges them.This patch selects the response path by opcode:
VMVXS/VFMVFSwait until MASKU releases MaskB.VCPOP/VFIRSTkeep their dedicated result path. Their valid signal lasts one cycle, so they must not wait for mask-busy to clear.The patch keeps the ready expression, interfaces, and parameters unchanged. The regression extends the existing scalar-move tests. It checks scalar values, comparison masks, stored data, and
VCPOP/VFIRSTresults.Validation
Base:
34bd3bc152421b4601a7bf3d6e8e91ffb545c99e, with unchanged locked dependencies. Configuration: officialara_tb, real CVA6 dispatcher, 2 lanes, VLEN=2048, VCS W-2024.09-SP1, and LLVM 20.1.0.vmvxsvfmvfsA read-only observer recorded two early scalar responses and three store responses before address acknowledgement in each original run. Each patched run exercised 40 cycles with scalar data valid while MASKU was busy. Early scalar responses and incorrect store responses were zero. Both dedicated-result instructions returned while MASKU was busy. No runtime assertions failed.
Only this configuration and these directed tests ran. The tests use fixed scalar registers to avoid #518 and clear mask tail bits. They do not use gather/compress or include #475. No full suite or synthesis ran.
Reproduce with the local VCS and LLVM tools
Build the PR tests once. Use the same ELFs with base and patched RTL, with a fresh simulation directory for each version. Keep the locked dependencies, including CVA6's pinned HPDcache submodule.
LLVM_ROOTnames LLVM 20.1.0 with matching newlib/compiler-rt.SPIKE_ROOTsupplies the ELF loader's fesvr headers. Local runs used host GCC 13.2.0.In these commands,
timeout 600sets the maximum runtime. It does not report elapsed time.VCS returns process status 0 even for the original failures. Check every software result and
Core Test *** SUCCESS *** (tohost = 0). The local measurements also used a read-only observer, which neither drives nor forces DUT signals.Existing vmvxs shift-overflow and non-allocatable
.commentwarnings remain. The regression places e32 scalar moves before stores and e64 stores before scalar moves. This order exercises both response paths.Changelog
Fixed
Checklist
OpenAI Codex assisted with the patch, regression and description. The reported builds and simulations ran. No separate human review was performed.
The affected original tests (
vmvxsandvfmvfs) and HelloWorld now pass through the official Verilator Make entry in all four configurations: 2/4/8/16 lanes. The applications use the locked LLVM 20.1.0/newlib sources, and Verilator is built from the locked commit06263ec7. Each local run has a 10000000-cycle limit and finishes withtohost = 0, process exit 0 and no runtime assertion errors. The Make entry now accepts native simulator arguments so these runs can use that limit. License checks also pass. The RTL and dependency lock are unchanged by this test-entry update.