Skip to content

set wctl.is_cond_neg to 0 to avoid a x defined tmask in sfu in 4 stat… - #421

Closed
JulessD wants to merge 1 commit into
vortexgpgpu:masterfrom
JulessD:decode_x_op_args
Closed

JulessD wants to merge 1 commit into
vortexgpgpu:masterfrom
JulessD:decode_x_op_args

Conversation

@JulessD

@JulessD JulessD commented Sep 29, 2026

Copy link
Copy Markdown

When running Vortex on questasim, with 4 state simulation, I came accross an issue where the then_mask went x.
Upon investigation, the cause was traced back to the signal is_cond_neg.
While the value of is_cond_neg has no impact on join result it enters into the logic equation for the then_mask.
If it is left at x, in 4-state simulation, the then_mask is assigned x which creates problems.
Assigning is_cond_neg to 0 adds no logic and ensures the then_mask is not x.

After this fix, I was able to run multiple kernels with branches on questa.

@tinebp tinebp closed this in 62ef86d Sep 29, 2026
@tinebp

tinebp commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Verified and merged as 62ef86d, authored to you — thanks for a precise report AND
the right-sized fix. We confirmed the mechanism: the wctl unit folds is_cond_neg into
the join mask as (taken & tmask) | (~taken & tmask), which cancels in 2-state and in
hardware (so no silicon defect and no Verilator symptom) but survives the OR as X in
4-state and drives an all-X tmask into the warp scheduler on every JOIN. Reproduced in
xsim: X before, 0 after, join mask defined; rtlsim cycles bit-identical. Your one-bit
zero at the one leaking arm was exactly right — the remaining wctl fields stay
don't-care on purpose (their consumers qualify them), so we kept your change as-is and
only condensed the comment to house style. Your report also led us to fix one more
declare-before-use straggler (VX_mem_from_axi) that blocked 4-state compilation of the
RTL libs (bcba2ac).

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.

2 participants