fix(sim): fix simulation errors
This commit is contained in:
@@ -305,9 +305,12 @@ module snix_axil_cdma_mux #(
|
||||
case (state)
|
||||
IDLE: begin
|
||||
for (int i = 0; i < PORTS; i++) begin
|
||||
logic [CH_BITS:0] check_ch_ext;
|
||||
logic [CH_BITS-1:0] check_ch;
|
||||
|
||||
// Calculate next channel safely avoiding modulo operators in loop
|
||||
logic [CH_BITS:0] check_ch_ext = {1'b0, rr_ptr} + i[CH_BITS:0];
|
||||
logic [CH_BITS-1:0] check_ch = (check_ch_ext >= PORTS) ? (check_ch_ext - PORTS) : check_ch_ext[CH_BITS-1:0];
|
||||
check_ch_ext = {1'b0, rr_ptr} + i[CH_BITS:0];
|
||||
check_ch = (check_ch_ext >= PORTS) ? (check_ch_ext - PORTS) : check_ch_ext[CH_BITS-1:0];
|
||||
|
||||
if (ch_req[check_ch] && !arb_set_done[check_ch]) begin
|
||||
cur_ch <= check_ch;
|
||||
|
||||
Reference in New Issue
Block a user