Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicast XBAR #239

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9dc5a41
src: Remove missing pin warnings
colluca Dec 11, 2023
9678051
axi_xbar: Correct signal names in waveform file
colluca Jun 27, 2022
ed24e43
docs: Correct typos
colluca Jun 27, 2022
e10e67e
axi_mcast_xbar: Create copies of original IPs as starting point
colluca Jun 29, 2022
115dff1
axi_synth_bench: Add wrappers for `axi_xbar` and `axi_demux`
colluca Jul 7, 2022
de1fc31
axi_mcast_xbar: Add basic multicast logic
colluca Jun 29, 2022
7131cb3
axi_mcast_xbar: Correct deadlock condition
colluca Nov 25, 2022
02d3910
axi_mcast_mux: Separate unicast and multicast arbitration logic
colluca Dec 6, 2022
cbe3402
axi_mcast_xbar: Cut valid->ready->commit combinational path
colluca Dec 7, 2022
21222e9
axi_mcast_demux: Retrieve AW select index form from the mask
colluca Nov 23, 2022
60542d7
axi_mcast_xbar: Move AW address decoders after spill registers in demux
colluca Dec 12, 2022
7da0430
axi_rand_master: Suppress atop on multicast AWs
colluca Dec 12, 2022
137b19c
axi_mcast_demux: Extend multicast support to UniqueIds=1 case
colluca Dec 12, 2022
1f7191a
axi_mcast_demux: Merge B responses appropriately
colluca Dec 13, 2022
31fcf1f
axi_mcast_xbar: Add to CI
colluca Apr 18, 2023
56396c1
axi_test: Adapt syntax for Questa 2022.3
colluca Apr 18, 2023
d302b39
TODO check this fix is actually necessary
colluca Apr 18, 2023
17cee0a
common_cells: Bump to v1.29.0
colluca Apr 18, 2023
b423b2d
axi_mcast_xbar: Allow both regular and mask-based address rules
colluca Apr 26, 2023
84f60fa
axi_mcast_xbar: Extend testbench to test multiple rules per slave
colluca Apr 26, 2023
fccb294
axi_mcast_xbar: Extend testbench to test mixed addrmap specifications
colluca Apr 26, 2023
6f8a25a
axi_mcast_xbar: Tie signals to 0 when Connectivity matrix is sparse
colluca May 4, 2023
425d140
axi_mcast_xbar: Correct handling of default master port index
colluca May 10, 2023
c303a0d
axi_mcast_xbar: Allow multiple outstanding multicast transactions
colluca Jun 20, 2023
e4862ec
axi_mcast_xbar: Add default port mechanism for multicast transactions
colluca Dec 7, 2023
fed6a2f
axi_mcast_demux: Remove unique case warning when values are X
colluca Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ci/Memora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,23 @@ artifacts:
- src/axi_mux.sv
- src/axi_xbar.sv
- test/tb_axi_xbar.sv
- test/tb_axi_xbar_pkg.sv
outputs:
- build/axi_xbar-%.tested

axi_mcast_xbar-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_mcast_demux.sv
- src/axi_err_slv.sv
- src/axi_mcast_mux.sv
- src/axi_mcast_xbar.sv
- test/tb_axi_mcast_xbar.sv
- test/tb_axi_mcast_xbar_pkg.sv
outputs:
- build/axi_mcast_xbar-%.tested
2 changes: 1 addition & 1 deletion .github/workflows/gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
gitlab-ci:
runs-on: ubuntu-latest
timeout-minutes: 310
timeout-minutes: 360
steps:
- name: Check Gitlab CI
uses: pulp-platform/pulp-actions/gitlab-ci@v2
Expand Down
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,10 @@ axi_xbar:
<<: *run_vsim
variables:
TEST_MODULE: axi_xbar
timeout: 6h 00m

axi_mcast_xbar:
<<: *run_vsim
variables:
TEST_MODULE: axi_mcast_xbar
timeout: 6h 00m
11 changes: 10 additions & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package:
- "Florian Zaruba <[email protected]>"

dependencies:
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.31.1 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", rev: "multicast-xbar" }
common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.3 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.2 }

Expand Down Expand Up @@ -62,6 +62,7 @@ sources:
- src/axi_lite_to_axi.sv
- src/axi_modify_address.sv
- src/axi_mux.sv
- src/axi_mcast_mux.sv
- src/axi_rw_join.sv
- src/axi_rw_split.sv
- src/axi_serializer.sv
Expand All @@ -71,6 +72,7 @@ sources:
# Level 3
- src/axi_cdc.sv
- src/axi_demux.sv
- src/axi_mcast_demux.sv
- src/axi_err_slv.sv
- src/axi_dw_converter.sv
- src/axi_from_mem.sv
Expand All @@ -83,6 +85,7 @@ sources:
- src/axi_iw_converter.sv
- src/axi_lite_xbar.sv
- src/axi_xbar.sv
- src/axi_mcast_xbar.sv
- src/axi_to_mem_banked.sv
- src/axi_to_mem_interleaved.sv
- src/axi_to_mem_split.sv
Expand All @@ -93,6 +96,10 @@ sources:
files:
- test/axi_synth_bench.sv

- target: gf12
files:
- test/axi_synth_bench.sv

- target: simulation
files:
- src/axi_chan_compare.sv
Expand All @@ -105,6 +112,7 @@ sources:
# Level 0
- test/tb_axi_dw_pkg.sv
- test/tb_axi_xbar_pkg.sv
- test/tb_axi_mcast_xbar_pkg.sv
# Level 1
- test/tb_axi_addr_test.sv
- test/tb_axi_atop_filter.sv
Expand All @@ -129,3 +137,4 @@ sources:
- test/tb_axi_to_axi_lite.sv
- test/tb_axi_to_mem_banked.sv
- test/tb_axi_xbar.sv
- test/tb_axi_mcast_xbar.sv
2 changes: 1 addition & 1 deletion doc/axi_demux.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Setting the `UniqueIds` parameter to `1'b1` reduces the area complexity of the d

`2 * 2^AxiLookBits` counters track the number of [in-flight](../doc#in-flight) transactions. That is, for each ID in the (potentially) reduced set of IDs of `AxiLookBits` bits, there is one counter for write transactions and one for read transactions. Each counter can count up to (and including) `MaxTrans`, and there is a register that holds the index of the master port to which a counter is assigned.

When the demultiplexer gets an AW or an AR, it indexes the counters with the AXI ID. If the indexed counter has a value greater than zero and its master port index register is not equal to the index to which the AW or AR is to be sent, a transaction with the same direction and ID is already in flight to another master port. The demultiplexer then stalls the AW or AR. In all other cases, the demultiplexer forwards the AW or AR, increments the value of the indexed counter, and sets the master port index of the counter. A counter is decremented upon a handshake a B respectively last R beat at a slave port.
When the demultiplexer gets an AW or an AR, it indexes the counters with the AXI ID. If the indexed counter has a value greater than zero and its master port index register is not equal to the index to which the AW or AR is to be sent, a transaction with the same direction and ID is already in flight to another master port. The demultiplexer then stalls the AW or AR. In all other cases, the demultiplexer forwards the AW or AR, increments the value of the indexed counter, and sets the master port index of the counter. A counter associated with the AW or AR channel is decremented upon a handshake on the slave port respectively on the B channel or on the R channel in correspondence of the last beat.

W beats are routed to the master port defined by the value of `slv_aw_select_i` for the corresponding AW. As the order of the W bursts is given by the order of the AWs, the select signals are stored in a FIFO queue. This FIFO is pushed upon a handshake on the AW slave channel and popped upon a handshake of the last W beat of a burst on a W master channel.

Expand Down
2 changes: 1 addition & 1 deletion doc/axi_mux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The opposite function to the AXI demultiplexer is performed by the AXI Multiplex

![Block-diagram of the AXI 4 Multiplexer Module.](axi_mux.png "Block-diagram of the AXI 4 Multiplexer Module.")

The Multiplexer module is has a simpler structure than the demultiplexer introduced in the previous section. The requests on the AW and AR channels get merged with the same round robin arbitration used for merging the responses in the demultiplexer. One key difference however is the mechanism how the multiplexer determines from which slave port a request came. It uses for this the higher bits of the `axi_id` field of a request. The number of bits can be calculated with:
The Multiplexer module has a simpler structure than the demultiplexer introduced in the previous section. The requests on the AW and AR channels get merged with the same round robin arbitration used for merging the responses in the demultiplexer. One key difference however is the mechanism how the multiplexer determines from which slave port a request came. It uses for this the higher bits of the `axi_id` field of a request. The number of bits can be calculated with:

```systemverilog
$clog2(NoSlavePorts)
Expand Down
4 changes: 2 additions & 2 deletions doc/axi_xbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Design Overview

`axi_xbar` is a fully-connected crossbar, which means that each master module that is connected to a *slave port* for of the crossbar has direct wires to all slave modules that are connected to the *master ports* of the crossbar.
`axi_xbar` is a fully-connected crossbar, which means that each master module that is connected to a *slave port* of the crossbar has direct wires to all slave modules that are connected to the *master ports* of the crossbar.
A block-diagram of the crossbar is shown below:

![Block-diagram showing the design of the full AXI4 Crossbar.](axi_xbar.png "Block-diagram showing the design of the full AXI4 Crossbar.")
Expand Down Expand Up @@ -49,7 +49,7 @@ The crossbar is configured through the `Cfg` parameter with a `axi_pkg::xbar_cfg
| `LatencyMode` | `enum logic [9:0]` | Latency on the individual channels, defined in detail in section *Pipelining and Latency* below. |
| `AxiIdWidthSlvPorts` | `int unsigned` | The AXI ID width of the slave ports. |
| `AxiIdUsedSlvPorts` | `int unsigned` | The number of slave port ID bits (starting at the least significant) the crossbar uses to determine the uniqueness of an AXI ID (see section *Ordering and Stalls* below). This value has to be less or equal than `AxiIdWidthSlvPorts`. |
| `UniqueIds` | `bit` | If you can guarantee that the ID of each transaction is always unique among all in-flight transactions in the same direction, setting this parameter to `1'b1` simplifies the crossbar. See the [`axi_demux` documentation](axi_demux#ordering-and-stalls) for details. |
| `UniqueIds` | `bit` | If you can guarantee that the ID of each transaction is always unique among all in-flight transactions in the same direction, setting this parameter to `1'b1` simplifies the crossbar. See the [`axi_demux` documentation](axi_demux.md#ordering-and-stalls) for details. |
| `AxiAddrWidth` | `int unsigned` | The AXI address width. |
| `AxiDataWidth` | `int unsigned` | The AXI data width. |
| `NoAddrRules` | `int unsigned` | The number of address map rules. |
Expand Down
43 changes: 27 additions & 16 deletions scripts/run_vsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,6 @@ exec_test() {
done
done
;;
axi_xbar)
for NumMst in 1 6; do
for NumSlv in 1 8; do
for Atop in 0 1; do
for Exclusive in 0 1; do
for UniqueIds in 0 1; do
call_vsim tb_axi_xbar -gTbNumMasters=$NumMst -gTbNumSlaves=$NumSlv \
-gTbEnAtop=$Atop -gTbEnExcl=$Exclusive \
-gTbUniqueIds=$UniqueIds
done
done
done
done
done
;;
axi_to_mem_banked)
for MEM_LAT in 1 2; do
for BANK_FACTOR in 1 2; do
Expand Down Expand Up @@ -211,7 +196,7 @@ exec_test() {
MST_ID=5
for DATA_WIDTH in 64 256; do
for PIPE in 0 1; do
call_vsim tb_axi_xbar -t 1ns -voptargs="+acc" \
call_vsim tb_axi_xbar -t 1ns \
-gTbNumMasters=$NUM_MST \
-gTbNumSlaves=$NUM_SLV \
-gTbAxiIdWidthMasters=$MST_ID \
Expand All @@ -233,6 +218,32 @@ exec_test() {
done
done
;;
axi_mcast_xbar)
for GEN_ATOP in 0 1; do
for NUM_MST in 1 6; do
for NUM_SLV in 2 9; do
for MST_ID_USE in 3 5; do
MST_ID=5
for DATA_WIDTH in 64; do
for PIPE in 0; do
for UNIQUE_IDS in 0 1; do
call_vsim tb_axi_mcast_xbar -t 1ns \
-gTbNumMasters=$NUM_MST \
-gTbNumMcastSlaves=$NUM_SLV \
-gTbAxiIdWidthMasters=$MST_ID \
-gTbAxiIdUsed=$MST_ID_USE \
-gTbAxiDataWidth=$DATA_WIDTH \
-gTbPipeline=$PIPE \
-gTbEnAtop=$GEN_ATOP \
-gTbUniqueIds=$UNIQUE_IDS
done
done
done
done
done
done
done
;;
*)
call_vsim tb_$1 -t 1ns -coverage -voptargs="+acc +cover=bcesfx"
;;
Expand Down
Loading