diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ee453f..8e3c30f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased +### Fixed +- `mem_to_banks_detailed`: Ensure no spurious response after full dead write + ## 1.36.0 - 2024-07-08 ### Fixed - `registers`: Fix else statement in FFARNC macro. diff --git a/src/mem_to_banks_detailed.sv b/src/mem_to_banks_detailed.sv index 1dac044b..29e928cd 100644 --- a/src/mem_to_banks_detailed.sv +++ b/src/mem_to_banks_detailed.sv @@ -109,8 +109,13 @@ module mem_to_banks_detailed #( resp_valid, resp_ready; req_t [NumBanks-1:0] bank_req, bank_oup; - logic [NumBanks-1:0] bank_req_internal, bank_gnt_internal, zero_strobe, dead_response; - logic dead_write_fifo_full; + logic [NumBanks-1:0] bank_req_internal, + bank_gnt_internal, + zero_strobe, + dead_response, + dead_response_unmasked; + logic dead_write_fifo_full, + dead_write_fifo_empty; function automatic addr_t align_addr(input addr_t addr); return (addr >> $clog2(DataBytes)) << $clog2(DataBytes); @@ -173,16 +178,19 @@ module mem_to_banks_detailed #( .flush_i ( 1'b0 ), .testmode_i ( 1'b0 ), .full_o ( dead_write_fifo_full ), - .empty_o (), + .empty_o ( dead_write_fifo_empty ), .usage_o (), .data_i ( bank_we_o & zero_strobe ), .push_i ( req_i & gnt_o ), - .data_o ( dead_response ), + .data_o ( dead_response_unmasked ), .pop_i ( rvalid_o ) ); + assign dead_response = dead_response_unmasked & {NumBanks{~dead_write_fifo_empty}}; end else begin : gen_no_dead_write_fifo + assign dead_response_unmasked = '0; assign dead_response = '0; assign dead_write_fifo_full = 1'b0; + assign dead_write_fifo_empty = 1'b1; end // Handle responses.