修正python生成包的顺序错误,导致硬件发包错误

This commit is contained in:
2026-02-03 16:14:11 +08:00
parent 4cbd223786
commit 78810c5a5e
3 changed files with 18 additions and 13 deletions

View File

@@ -690,7 +690,11 @@ task spi_trans( input [15:0] saddress, input [7:0] scmd, input [12:0] slength, i
`else
txBuf[2] <= (scmd | slength[12:8]);
txBuf[3] <= slength[7:0];
length <= slength + 4 + 1;
if (sidx >=(`ALL_DEV_NUM * 3)) begin
length <= slength + 4 + 1;
end else begin
length <= slength + 4;
end
`endif
idx <= sidx;