Skip to content

Commit 76c805e

Browse files
committed
Fix more indexing bugs
1 parent 8179a32 commit 76c805e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rtl/axis_switch.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ generate
225225

226226
// forwarding
227227
assign int_axis_tvalid[m*M_COUNT +: M_COUNT] = (int_s_axis_tvalid[m] && select_valid_reg && !drop_reg) << select_reg;
228-
assign int_s_axis_tready[m] = int_axis_tready[select_reg*M_COUNT+m] || drop_reg;
228+
assign int_s_axis_tready[m] = int_axis_tready[select_reg*S_COUNT+m] || drop_reg;
229229

230230
// S side register
231231
axis_register #(
@@ -293,7 +293,7 @@ generate
293293
// mux
294294
wire [DATA_WIDTH-1:0] s_axis_tdata_mux = int_s_axis_tdata[grant_encoded*DATA_WIDTH +: DATA_WIDTH];
295295
wire [KEEP_WIDTH-1:0] s_axis_tkeep_mux = int_s_axis_tkeep[grant_encoded*KEEP_WIDTH +: KEEP_WIDTH];
296-
wire s_axis_tvalid_mux = int_axis_tvalid[grant_encoded*S_COUNT+n] && grant_valid;
296+
wire s_axis_tvalid_mux = int_axis_tvalid[grant_encoded*M_COUNT+n] && grant_valid;
297297
wire s_axis_tready_mux;
298298
wire s_axis_tlast_mux = int_s_axis_tlast[grant_encoded];
299299
wire [ID_WIDTH-1:0] s_axis_tid_mux = int_s_axis_tid[grant_encoded*ID_WIDTH +: ID_WIDTH];

0 commit comments

Comments
 (0)