[ci] Add slang lint#445
Open
micprog wants to merge 6 commits into
Open
Conversation
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
hopang-0221
reviewed
Jun 1, 2026
PR review (hopang-0221): the automatic variables introduced to silence slang's -Winferred-latch are not visible in waveforms, since they do not exist as named signals in the design hierarchy. Restore them as module-scope signals and break the inferred latches with unconditional default assignments at the top of their always_comb blocks instead. No functional change: each of these is always assigned before it is read on the path that uses it, so the defaults only affect the otherwise-unread latch paths. Affected: simd_alu (r), lane_sequencer (extra_stride/vl_tot), masku (vrgat_res/vrgat_buf), vldu (vrf_word_start_byte), vstu (vrf_eff_write_bytes), vmfpu (vfrec7/vfrsqrt7 scratch arrays, narrowing_shuffled_result/narrowing_shuffle_be). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR review (hopang-0221): unlike VSSUBU, the VSSUB saturation flag is not
replicated across all bits of vxsat.w{16,32,64}[b] (only the LSB is set),
so the AND-reduction introduced for the slang -Wint-bool-conv fix is
always 0 and saturation never triggers. Use OR-reduction instead, which
matches the original non-zero test and clears the warning.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR review (hopang-0221): replace the verbose explicit zero-pad
replications (added to avoid an unsized '0 inside a concatenation) with
equivalent implicit zero-extension and a plain literal comparison.
out_pnt_d is wide enough to hold {red_stride_cnt_d, 3'b0}, and the popc
compare is against the value 1 - no functional change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Thanks for the review @hopang-0221! I addressed the issues you raised and rebased on main. The slang action has a small issue as it was constructed without accounting for newer slang versions breaking the API, pulp-platform/pulp-actions#29 should address that. |
hopang-0221
reviewed
Jun 2, 2026
Collaborator
There was a problem hiding this comment.
I think this also changes the functionality:
old: res.w8 [2b + narrowing_select_i] = ($signed(opb.w16[b]) >>> opa.w16[b][3:0]) + rm[b];
new: res.w8 [2b + narrowing_select_i] = $unsigned(($signed(opb.w16[b]) >>> opa.w16[b][3:0]) + $signed(rm[b]));
rm[b] is 1-bit number:
- Without $signed(), rm[b]==0 -> 0; rm[b]==1 -> 1
- With $signed(), rm[b]==0 -> 0; rm[b]==1 -> -1
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.
No description provided.