Skip to content

Commit

Permalink
[flash_ctrl] Fix read buffer re-allocation for even buffers
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vogelpi committed Jul 1, 2024
1 parent 6409aa6 commit 34bde60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hw/ip_templates/flash_ctrl/rtl/flash_phy_rd.sv
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ module flash_phy_rd
.idx_o(),
.valid_o(),
.data_o(),
.ready_i(req_o & no_match)
.ready_i(req_o & ack_i & no_match)
);

// which buffer to allocate upon a new transaction
Expand Down
2 changes: 1 addition & 1 deletion hw/top_earlgrey/ip_autogen/flash_ctrl/rtl/flash_phy_rd.sv
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ module flash_phy_rd
.idx_o(),
.valid_o(),
.data_o(),
.ready_i(req_o & no_match)
.ready_i(req_o & ack_i & no_match)
);

// which buffer to allocate upon a new transaction
Expand Down

0 comments on commit 34bde60

Please sign in to comment.