Repository navigation
Fix configuration instructions - #26
Merged
rgiunti merged 5 commits intoOct 26, 2026
Merged
Conversation
rgiunti
marked this pull request as ready for review
October 15, 2026 09:46
rgiunti
force-pushed
the
rgiunti/fix-cfg-instr
branch
from
October 21, 2026 07:33
a9e9848 to
681ab5d
Compare
rgiunti
force-pushed
the
rgiunti/fix-cfg-instr
branch
from
October 23, 2026 14:39
681ab5d to
f0fffc1
Compare
Collaborator
Author
|
Hi @Navaneeth-KunhiPurayil I've just rebased and updated the bender lock in PR #168 could you please run the CI? Thanks! |
Collaborator
|
Thanks, LGTM, i will trigger a CI check |
Navaneeth-KunhiPurayil
approved these changes
Oct 24, 2026
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.
Fix vector configuration instructions and
vtypehandlingThis PR fixes several RVV 1.0 compliance issues in how Spatz handles the configuration-setting instructions (
vsetvli,vsetivli,vsetvl) and the resultingvtypestate.Changes
1. Read
vtype.villat bit XLEN-1csrr vtypereturned the packedvtype_tstruct, sovillappeared at bit 8. RVV requiresvillat bit XLEN-1. The CSR read now returnsvillat bit 31, bits [30:8] as zero, andvma/vta/vsew/vlmulin [7:0].2.
vsetivliwithuimm = 0The
rs1 == x0special cases (AVL = VLMAX whenrd != x0, keepvlwhenrd == x0) were also applied tovsetivli. Forvsetivli, bits [19:15] are a 5-bit immediate AVL, not a register index.vsetivli rd, 0, ...now setsvl = 0as the spec requires.3. Support
LMUL = 1/8and fix the SEW/LMUL legality checkLMUL_F8was always flagged as illegal. It is now accepted, and VLMAX is computed with>> 3.SEW <= LMUL * ELENcheck comparedlog2(LMUL) + log2(ELEN)against thevsewencoding instead oflog2(SEW) = vsew + 3. As a result, illegal combinations such ase64, mf2with ELEN = 64 were accepted. The check now setsvillfor them.4. Check
villforvmv.x.s/vfmv.f.sThese instructions are marked
is_scalar, so the issue stage skipped thevillcheck and executed them with an illegalvtype. VFU instructions that areis_scalarbut readvs2are now rejected as illegal whenvill = 1.5. Reserved
vtypebitsNon-zero reserved bits now produce
vill = 1andvl = 0:vsetvli:zimm[10:8](instr[30:28])vsetivli:zimm[9:8](instr[29:28])vsetvl:rs2[XLEN-1:8], which also covers avillbit already set inrs2The controller treats an incoming
vtypewithvillset as illegal.Testing
This features have been verified with the tests included in the PR 168 of the spatz cluster repo