Merge, saturated add and sub, integer comparison instructions added, bugs with masks fixed - #132
Draft
igor-sachok wants to merge 1 commit into
Draft
Merge, saturated add and sub, integer comparison instructions added, bugs with masks fixed#132igor-sachok wants to merge 1 commit into
igor-sachok wants to merge 1 commit into
Conversation
…bugs with masks fixed
igor-sachok
force-pushed
the
spatz-masks
branch
from
August 3, 2026 15:20
63b6d6b to
8edfa2f
Compare
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.
Add support for the MERGE instruction (vmerge).
Add support for integer comparison instructions from RVV (vmseq, vmsne, vmslt[u], vmsle[u], vmsgt[u]).
Add the corresponding fields to the VFU instruction tag (is_cmp, vl, vm, merge).
Add support for saturating integer instructions from RVV: vsadd, vsaddu, vssub, vssubu.
Mask-logical instructions (vmand, vmor, vmxor, vmnand, vmnor, vmxnor, vmandnot, vmornot): vl is recomputed so the datapath processes exactly ceil(vl_elements / 8) bytes of mask - one bit per element - instead of a full SEW-width element per mask bit.
Fix several places where the result must be computed from result_tag rather than from spatz_req. Because the request can relate to a new instruction already. Using spatz_req there could apply the wrong instruction's attributes to an earlier result.
v0_t_read_done signal now goes low after reading the last input. Dependence of vfu_rsp_valid_o triggered a bug in case of sequential masked instructions; the second instruction could not start to read v0 because it was still high.
TODO: fix writing the result mask for FP and INT comparison instructions. (Now it is writing one word, which doesn't allow writing the full max for vector in case of m8)