Mask scalar result based on correct instruction metadata#25
Merged
mattsini1 merged 1 commit intopulp-platform:mainfrom Apr 17, 2025
Merged
Mask scalar result based on correct instruction metadata#25mattsini1 merged 1 commit intopulp-platform:mainfrom
mattsini1 merged 1 commit intopulp-platform:mainfrom
Conversation
Previously, the scalar result sent back to Spatz's controller was masked based on the instruction currently in the operation queue, which was wrong. This changes it so it considers the correct instruction (i.e., it takes the informations from the result tag).
7d1240f to
445e8ef
Compare
Navaneeth-KunhiPurayil
approved these changes
Apr 16, 2025
Contributor
Navaneeth-KunhiPurayil
left a comment
There was a problem hiding this comment.
Verified that all the tests pass
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.
For VFU instructions with scalar results (e.g., scalar floating point instructions) immediately followed by VFU instructions that commit to the VRF, the first instruction could write back a zero result to the FP register file. (This was maybe similar for the GP register file, but I haven't checked).
This happened because the scalar result was masked based on the
is_scalarflag from the instruction currently in the operation queue (i.e., earlier in the pipeline). If this was an instruction with a vector result, it'sis_scalarflag would be cleared and the scalar result masked.This changes it so it considers the correct instruction (i.e., it takes the information from the result tag's
wbbit).