[VLSU] Fix: vlsu read ports connection misordered#57
Merged
Conversation
Navaneeth-KunhiPurayil
approved these changes
Jan 12, 2026
Contributor
Navaneeth-KunhiPurayil
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for the fix!
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.
Summary
This PR fixes a misconnection of VLSU VRF read ports in the top-level
spatz.sv.The issue affects indexed load/store instructions, where the vector register used as the index is incorrectly wired.
The fix is limited to top-level wiring changes and does not modify any VLSU internal logic.
Motivation / Reason
In
spatz_vlsu.sv, thevrf_rinterface exposes two read ports to support indexed load/store instructions.Inspecting
spatz_vlsu.sv(around line 784) shows that the MSB bit of the VRF read port selection is used for the index register.However, in the top-level
spatz.sv:vd.rs2(vs2) must be used as the index register for indexed load/store instructions.As a result,
vdandvs2are misconnected when wiring the VLSU VRF read ports at the top level.Fix Strategy
The simplest and safest fix is to swap the VRF read port wiring in
spatz.svso that:vs2(index register)vdFiles Changed
hw/ip/spatz/src/spatz.svDiff Overview
This commit swaps the order of VRF read-related signals (
raddr,re,rdata,rvalid, andid) so thatvs2is correctly mapped as the index register instead ofvd.No functional changes outside of wiring reordering are introduced.