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

24
.gitattributes vendored Normal file
View File

@@ -0,0 +1,24 @@
* text=auto eol=lf
# Binary artifacts
*.bin -text
*.elf -text
*.o -text
*.a -text
*.so -text
*.dll -text
*.exe -text
# Documents and images
*.pdf -text
*.png -text
*.jpg -text
*.jpeg -text
*.gif -text
*.bmp -text
*.ico -text
# FPGA packaged IP/checkpoints can be binary archives.
*.xcix -text
*.dcp -text
*.bit -text

View File

@@ -296,7 +296,7 @@ module snix_axil_cdma_mux #(
// ========================================== // ==========================================
// Round-Robin Arbiter & Engine Driver // 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; state_t state;
logic [CH_BITS-1:0] cur_ch; 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 if (ch_req[check_ch] && !arb_set_done[check_ch]) begin
cur_ch <= check_ch; cur_ch <= check_ch;
rr_ptr <= (check_ch == (PORTS - 1)) ? '0 : (check_ch + 1); rr_ptr <= (check_ch == (PORTS - 1)) ? '0 : (check_ch + 1);
engine_start <= 1'b1; state <= START;
state <= RUN;
break; break;
end end
end end
end end
START: begin
engine_start <= 1'b1;
state <= RUN;
end
RUN: begin RUN: begin
if (engine_done) begin if (engine_done) begin
arb_set_done[cur_ch] <= 1'b1; arb_set_done[cur_ch] <= 1'b1;