feat: optimize sram read channel
This commit is contained in:
@@ -20,7 +20,8 @@
|
|||||||
module axi2sram_sp_external #(
|
module axi2sram_sp_external #(
|
||||||
parameter AXI_ID_WIDTH = 5,
|
parameter AXI_ID_WIDTH = 5,
|
||||||
parameter AXI_ADDR_WIDTH = 32,
|
parameter AXI_ADDR_WIDTH = 32,
|
||||||
parameter AXI_DATA_WIDTH = 32
|
parameter AXI_DATA_WIDTH = 32,
|
||||||
|
parameter FAST_READ_BURST = 1
|
||||||
)(
|
)(
|
||||||
input clk,
|
input clk,
|
||||||
input resetn,
|
input resetn,
|
||||||
@@ -246,10 +247,29 @@ module axi2sram_sp_external #(
|
|||||||
// we already got everything
|
// we already got everything
|
||||||
end
|
end
|
||||||
else begin
|
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;
|
state_d = READ_ADDR;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
READ_ADDR: begin
|
READ_ADDR: begin
|
||||||
// keep request to memory high
|
// keep request to memory high
|
||||||
|
|||||||
Reference in New Issue
Block a user