Fix CDMA channel start timing

This commit is contained in:
2026-07-01 20:34:33 +08:00
parent 09fc1aeb44
commit d72cda97b9
2 changed files with 31 additions and 3 deletions

View File

@@ -296,7 +296,7 @@ module snix_axil_cdma_mux #(
// ==========================================
// Round-Robin Arbiter & Engine Driver
// ==========================================
typedef enum logic [1:0] {IDLE, RUN} state_t;
typedef enum logic [1:0] {IDLE, START, RUN} state_t;
state_t state;
logic [CH_BITS-1:0] cur_ch;
@@ -465,13 +465,17 @@ module snix_axil_cdma_mux #(
if (ch_req[check_ch] && !arb_set_done[check_ch]) begin
cur_ch <= check_ch;
rr_ptr <= (check_ch == (PORTS - 1)) ? '0 : (check_ch + 1);
engine_start <= 1'b1;
state <= RUN;
state <= START;
break;
end
end
end
START: begin
engine_start <= 1'b1;
state <= RUN;
end
RUN: begin
if (engine_done) begin
arb_set_done[cur_ch] <= 1'b1;