Skip to content

Commit 34bde60

Browse files
committed
[flash_ctrl] Fix read buffer re-allocation for even buffers
Previously, the read buffer re-allocation arbiter erroneously did not factor in the `ack_i` signal coming from the Flash macro. While the open source simulation model never really de-asserts `ack_i`, some real Flash macros may do so. As a result, `req_o` might be high for multiple clock cycles and the read buffer re-allocation may skip even read buffers. This effectively halves the number of usable read buffers which may have a negative impact on performance. The fix is easy and just involves factoring in `ack_i` to take the actual Flash macro request handshake for doing allocations. This resolves #23797. Signed-off-by: Pirmin Vogel <[email protected]>
1 parent 6409aa6 commit 34bde60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hw/ip_templates/flash_ctrl/rtl/flash_phy_rd.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module flash_phy_rd
179179
.idx_o(),
180180
.valid_o(),
181181
.data_o(),
182-
.ready_i(req_o & no_match)
182+
.ready_i(req_o & ack_i & no_match)
183183
);
184184

185185
// which buffer to allocate upon a new transaction

hw/top_earlgrey/ip_autogen/flash_ctrl/rtl/flash_phy_rd.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module flash_phy_rd
179179
.idx_o(),
180180
.valid_o(),
181181
.data_o(),
182-
.ready_i(req_o & no_match)
182+
.ready_i(req_o & ack_i & no_match)
183183
);
184184

185185
// which buffer to allocate upon a new transaction

0 commit comments

Comments
 (0)