feat: optimize sram read channel

This commit is contained in:
2026-07-05 17:12:38 +08:00
parent f735f789d6
commit 423ff32b49

View File

@@ -20,7 +20,8 @@
module axi2sram_sp_external #(
parameter AXI_ID_WIDTH = 5,
parameter AXI_ADDR_WIDTH = 32,
parameter AXI_DATA_WIDTH = 32
parameter AXI_DATA_WIDTH = 32,
parameter FAST_READ_BURST = 1
)(
input clk,
input resetn,
@@ -246,10 +247,29 @@ module axi2sram_sp_external #(
// we already got everything
end
else begin
if (FAST_READ_BURST) begin
// Queue the next async-SRAM address for the clock
// edge after the current read data is sampled.
case (ax_req_q_burst)
FIXED, INCR: req_addr_d = cons_addr;
WRAP: begin
if (cons_addr == upper_wrap_boundary) begin
req_addr_d = wrap_boundary;
end else if (cons_addr > upper_wrap_boundary) begin
req_addr_d = ax_req_q_addr + ((cnt_q - ax_req_q_len) << LOG_NR_BYTES);
end else begin
req_addr_d = cons_addr;
end
end
endcase
cnt_d = cnt_q + 1;
state_d = READ;
end else begin
state_d = READ_ADDR;
end
end
end
end
READ_ADDR: begin
// keep request to memory high