Skip to content

Mask scalar result based on correct instruction metadata#25

Merged
mattsini1 merged 1 commit intopulp-platform:mainfrom
MaxWipfli:vfu_scalar_writeback
Apr 17, 2025
Merged

Mask scalar result based on correct instruction metadata#25
mattsini1 merged 1 commit intopulp-platform:mainfrom
MaxWipfli:vfu_scalar_writeback

Conversation

@MaxWipfli
Copy link
Copy Markdown
Contributor

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_scalar flag from the instruction currently in the operation queue (i.e., earlier in the pipeline). If this was an instruction with a vector result, it's is_scalar flag 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 wb bit).

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).
@MaxWipfli MaxWipfli force-pushed the vfu_scalar_writeback branch from 7d1240f to 445e8ef Compare April 16, 2025 12:44
Copy link
Copy Markdown
Contributor

@Navaneeth-KunhiPurayil Navaneeth-KunhiPurayil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that all the tests pass

@mattsini1 mattsini1 merged commit 37d44a2 into pulp-platform:main Apr 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants