[hw] Pop a scalar FP result from FPU0 only - #125
Open
emiliengnr wants to merge 1 commit into
Open
Conversation
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.
Hello, here is a pull request for a bug I found.
Problem
A scalar FP instruction followed by a vector FP instruction wedges the VFU, and before it wedges it
drops one VRF word of the vector result.
Scalar instructions go to fpnew lane 0 only (
spatz_vfu.sv:1576):The output handshake has no matching term (
spatz_vfu.sv:1630),out_ready_iis the sharedresult_ready. It is computed from lane 0's tag, and for a scalar resultpending_resultscoversthe low
ELEN/8bytes, so the gate closes on lane 0 alone and every lane pops. Lanes 1 to N-1 holdthe first word of the vector instruction that followed, and that word is lost. Lane 0 then trails by
one result. When the vector op reaches its last word only lane 0 holds it, the all-lane gate
&(result_valid | ~pending_results)can no longer close, and the write-back, the drain and theresponse emit all stop. fpnew holds
busy_ohigh on the unpopped result, so the FSM cannot leaveVFU_RunningFPUand the core hangs on the next dependent instruction.A lane probe on a default build (
n_fpu=4,ELEN=64), scalarVFADDatvl=1then vectorVFMINMAXatvsew=EW_64vl=8,otidthe tag id at each lane output, LSB lane first:Fix
Give the output handshake the lane term the input already has:
wired to
.out_ready_i. Lane 0 drains its scalar result on its own and presents the vector word onecycle later, then all lanes pop it together. Vector instructions are unaffected, their
result_tag.wbis 0.