Skip to content

Commit 6c5afd9

Browse files
LBFFilhocaosjr
authored andcommitted
fix valid_index
Previous code would create issues for lane masks different from ALL_ACTIVE_LANE_MASK, due to a pipelining bug. Although the currently officially supported behavior is only either one lane active or all lanes active, this is a very simple change that helps us prepare in case we want to support other lanes in the future, and removes some extra logic (a comparison and a mux), which can improve timing. Signed-off-by: Laez Barbosa <[email protected]>
1 parent b60e57f commit 6c5afd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/spi_engine/spi_engine_execution/spi_engine_execution_shiftreg_data_assemble.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ module spi_engine_execution_shiftreg_data_assemble #(
159159
lane_index <= 0;
160160
end
161161
lane_index_d <= lane_index;
162-
valid_index <= (lane_mask == ALL_ACTIVE_LANE_MASK) ? lane_index : valid_indices[lane_index_d];
162+
valid_index <= valid_indices[lane_index];
163163
end else if (sdo_toshiftreg) begin
164164
last_handshake_int <= 1'b0;
165165
end

0 commit comments

Comments
 (0)