Skip to content

Commit

Permalink
Merge pull request #231 from pulp-platform/demux_ar_full_fix
Browse files Browse the repository at this point in the history
axi_demux: Eliminate unnecessary AW channel stalls
  • Loading branch information
andreaskurth authored May 3, 2022
2 parents b5a6a68 + ce12d3d commit cfc2bbe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

### Fixed
- `axi_demux`: Eliminate unnecessary stalls of AW channel when the AR channel has reached its
maximum number of transactions. Prior to this fix, `axi_demux` would always stall AWs while read
transactions were at their maximum (that is, while `MaxTrans` read transactions were outstanding).
However, this stall is only required when the AW that is being handled by `axi_demux` is an atomic
operation (ATOP) that entails an R response. This fix therefore removes unnecessary stalls as
well as an unnecessary dependency between reads and writes. The integrity of data or transactions
was not affected by this problem.


## 0.35.2 - 2022-04-14
Expand Down
10 changes: 6 additions & 4 deletions src/axi_demux.sv
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@ module axi_demux #(
atop_inject = slv_aw_chan_select.aw_chan.atop[axi_pkg::ATOP_R_RESP] & AtopSupport;
end
end else begin
// Process can start handling a transaction if its `i_aw_id_counter` and `w_fifo` have
// space in them. Further check if we could inject something on the AR channel (only if
// ATOPs are supported).
if (!aw_id_cnt_full && !w_fifo_full && (!ar_id_cnt_full || !AtopSupport)) begin
// An AW can be handled if `i_aw_id_counter` and `i_w_fifo` are not full. An ATOP that
// requires an R response can be handled if additionally `i_ar_id_counter` is not full (this
// only applies if ATOPs are supported at all).
if (!aw_id_cnt_full && !w_fifo_full &&
(!(ar_id_cnt_full && slv_aw_chan_select.aw_chan.atop[axi_pkg::ATOP_R_RESP]) ||
!AtopSupport)) begin
// there is a valid AW vector make the id lookup and go further, if it passes
if (slv_aw_valid && (!aw_select_occupied ||
(slv_aw_chan_select.aw_select == lookup_aw_select))) begin
Expand Down

0 comments on commit cfc2bbe

Please sign in to comment.