forked from pulp-platform/axi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
axi_demux: Add parameter
AtopSupport
Adapted from `0009-Remove-atomics-from-DMA-path.patch` of the Snitch repository. Co-authored-by: Florian Zaruba <[email protected]>
- Loading branch information
1 parent
d715a90
commit e8fa729
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
// - Wolfgang Roenninger <[email protected]> | ||
// - Andreas Kurth <[email protected]> | ||
|
||
`include "common_cells/assertions.svh" | ||
`include "common_cells/registers.svh" | ||
|
||
`ifdef QUESTA | ||
|
@@ -24,6 +25,7 @@ | |
// See `doc/axi_demux.md` for the documentation, including the definition of parameters and ports. | ||
module axi_demux #( | ||
parameter int unsigned AxiIdWidth = 32'd0, | ||
parameter bit AtopSupport = 1'b1, | ||
parameter type aw_chan_t = logic, | ||
parameter type w_chan_t = logic, | ||
parameter type b_chan_t = logic, | ||
|
@@ -205,12 +207,14 @@ module axi_demux #( | |
slv_aw_ready = 1'b1; | ||
lock_aw_valid_d = 1'b0; | ||
load_aw_lock = 1'b1; | ||
atop_inject = slv_aw_chan_select.aw_chan.atop[5]; // inject the ATOP if necessary | ||
// inject the ATOP if necessary | ||
atop_inject = slv_aw_chan_select.aw_chan.atop[5] & 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. | ||
if (!aw_id_cnt_full && !w_fifo_full && !ar_id_cnt_full) begin | ||
// 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 | ||
// 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 | ||
|
@@ -221,7 +225,7 @@ module axi_demux #( | |
// on AW transaction | ||
if (aw_ready) begin | ||
slv_aw_ready = 1'b1; | ||
atop_inject = slv_aw_chan_select.aw_chan.atop[5]; | ||
atop_inject = slv_aw_chan_select.aw_chan.atop[5] & AtopSupport; | ||
// no AW transaction this cycle, lock the decision | ||
end else begin | ||
lock_aw_valid_d = 1'b1; | ||
|
@@ -574,6 +578,7 @@ module axi_demux #( | |
internal_aw_select: assert property( @(posedge clk_i) | ||
(aw_valid |-> slv_aw_chan_select.aw_select < NoMstPorts)) | ||
else $fatal(1, "slv_aw_chan_select.aw_select illegal while aw_valid."); | ||
`ASSUME(NoAtopAllowed, !AtopSupport && slv_req_i.aw_valid |-> slv_req_i.aw.atop == '0) | ||
`endif | ||
`endif | ||
// pragma translate_on | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters