Skip to content

Commit

Permalink
Rename parameters with No* to Num* when referring to number
Browse files Browse the repository at this point in the history
  • Loading branch information
micprog committed Apr 10, 2023
1 parent e70cbd0 commit 3629789
Show file tree
Hide file tree
Showing 39 changed files with 590 additions and 590 deletions.
2 changes: 1 addition & 1 deletion doc/axi_demux.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This demultiplexer is configured through the parameters listed in the following
| Name | Type | Definition |
|:---------------------|:-------------------|:-----------|
| `IdWidth` | `int unsigned` | The AXI ID width (of all ports). |
| `NoMstPorts` | `int unsigned` | The number of AXI master ports of the demultiplexer (in other words, how many AXI slave modules can be attached). |
| `NumMstPorts` | `int unsigned` | The number of AXI master ports of the demultiplexer (in other words, how many AXI slave modules can be attached). |
| `MaxTrans` | `int unsigned` | The slave port can have at most this many transactions [in flight](../doc#in-flight). |
| `LookBits` | `int unsigned` | The number of ID bits (starting at the least significant) the demultiplexer uses to determine the uniqueness of an AXI ID (see section *Ordering and Stalls* below). This value has to be less or equal than `IdWidth`. |
| `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 demultiplexer (see section *Ordering and Stalls* below). Defaults to `1'b0`. |
Expand Down
2 changes: 1 addition & 1 deletion doc/axi_lite_demux.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This demultiplexer is configured through the parameters listed in the following

| Name | Type | Definition |
|:---------------------|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `NoMstPorts` | `int unsigned` | The number of AXI4-Lite master ports of the demultiplexer (in other words, how many AXI4-Lite slave modules can be attached). |
| `NumMstPorts` | `int unsigned` | The number of AXI4-Lite master ports of the demultiplexer (in other words, how many AXI4-Lite slave modules can be attached). |
| `MaxTrans` | `int unsigned` | The slave port can have at most this many transactions [in flight](../doc#in-flight). |
| `FallThrough` | `bit` | Routing decisions on the AW channel fall through to the W channel (i.e. don't consume a cycle). Enabling this allows the demultiplexer to accept a W beat in the same cycle as the corresponding AW beat, but it increases the combinatorial path of the W channel with logic from `slv_aw_select_i`. |
| `SpillXX` | `bit` | Inserts one spill register on the respective channel (AW, W, B, AR, and R) before the demultiplexer. |
Expand Down
2 changes: 1 addition & 1 deletion doc/axi_lite_mux.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following table shows the parameters of the module. The module further requi

| Name | Type | Function |
|:--------------|:---------------|:---------------------------------------------------------------------------------------------------------------|
| `NoSlvPorts` | `int unsigned` | How many slave ports the multiplexer features. This many master modules can be connected to the multiplexer. |
| `NumSlvPorts` | `int unsigned` | How many slave ports the multiplexer features. This many master modules can be connected to the multiplexer. |
| `MaxWTrans` | `int unsigned` | The depth of the FIFO holding the highest bits of the ID between the AW and W channel. |
| `FallThrough` | `bit` | Is the FIFO between the AW and W channel in fall-through mode. Enabling will lead to an additional delay cycle |
| `SpillXX` | `bit` | Enables the optional spill-register on the respective channel. |
6 changes: 3 additions & 3 deletions doc/axi_lite_xbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ The crossbar is configured through the `Cfg` parameter with a `axi_pkg::xbar_cfg

| Name | Type | Definition |
|:------------------|:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `NoSlvPorts` | `int unsigned` | The number of AXI4-Lite slave ports of the crossbar (in other words, how many AXI4-Lite master modules can be attached). |
| `NoMstPorts` | `int unsigned` | The number of AXI4-Lite master ports of the crossbar (in other words, how many AXI4-Lite slave modules can be attached). |
| `NumSlvPorts` | `int unsigned` | The number of AXI4-Lite slave ports of the crossbar (in other words, how many AXI4-Lite master modules can be attached). |
| `NumMstPorts` | `int unsigned` | The number of AXI4-Lite master ports of the crossbar (in other words, how many AXI4-Lite slave modules can be attached). |
| `MaxMstTrans` | `int unsigned` | Each slave port can have at most this many transactions [in flight](../doc#in-flight). |
| `MaxSlvTrans` | `int unsigned` | Each master port can have at most this many transactions [in flight](../doc#in-flight). |
| `FallThrough` | `bit` | Routing decisions on the AW channel fall through to the W channel. Enabling this allows the crossbar to accept a W beat in the same cycle as the corresponding AW beat, but it increases the combinatorial path of the W channel with logic from the AW channel. |
Expand All @@ -38,7 +38,7 @@ The crossbar is configured through the `Cfg` parameter with a `axi_pkg::xbar_cfg
| `IdUsedSlvPorts` | `int unsigned` | Not used by the AXI4-Lite crossbar. Set `default: '0`. |
| `AddrWidth` | `int unsigned` | The AXI4-Lite address width. |
| `DataWidth` | `int unsigned` | The AXI4-Lite data width. |
| `NoAddrRules` | `int unsigned` | The number of address map rules. |
| `NumAddrRules` | `int unsigned` | The number of address map rules. |

The other parameters are types to define the ports of the crossbar. The `*_chan_t` and `*_req_t`/`*_rsp_t` types must be bound in accordance to the configuration with the `AXI_TYPEDEF` macros defined in `axi/typedef.svh`. The `rule_t` type must be bound to an address decoding rule with the same address width as in the configuration, and `axi_pkg` contains definitions for 64- and 32-bit addresses.

Expand Down
4 changes: 2 additions & 2 deletions doc/axi_mux.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The opposite function to the AXI demultiplexer is performed by the AXI Multiplex
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:

```systemverilog
$clog2(NoSlavePorts)
$clog2(NumSlavePorts)
```

This restricts the type of ID which can be sent through each slave port of the module. When the higher ID bits do not correspond to the index of the port the following response will be sent back through to the wrong master, leading to a breakdown of the functionality. So for using this module it is recommended to extend each AXI ID by the required amount of bits indicating the index of the respective slave port, before being sent over this module.
Expand All @@ -25,7 +25,7 @@ The following table shows the parameters of the module. The module further requi
| Name | Type | Function |
|:------------ |:-------------- |:----------------------------------------------------------------------------------------------------------- |
| `IdWidth` | `int unsigned` | The width of the AXI transaction ID in bits. |
| `NoSlvPorts` | `int unsigned` | How many slave ports the multiplexer features. This many master modules can be connected to the multiplexer.|
| `NumSlvPorts`| `int unsigned` | How many slave ports the multiplexer features. This many master modules can be connected to the multiplexer.|
| `MaxWTrans` | `int unsigned` | The depth of the FIFO holding the highest bits of the ID between the AW and W channel. |
| `FallThrough`| `bit` | Is the FIFO between the AW and W channel in fall-through mode. Enabling will lead to longer cycle delays. |
| `SpillXX` | `bit` | Enables the optional spill-register on the respective channel. |
Expand Down
8 changes: 4 additions & 4 deletions doc/axi_xbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A block-diagram of the crossbar is shown below:

The crossbar has a configurable number of slave and master ports.

The ID width of the master ports is wider than that of the slave ports. The additional ID bits are used by the internal multiplexers to route responses. The ID width of the master ports must be `IdWidthSlvPorts + $clog_2(NoSlvPorts)`.
The ID width of the master ports is wider than that of the slave ports. The additional ID bits are used by the internal multiplexers to route responses. The ID width of the master ports must be `IdWidthSlvPorts + $clog_2(NumSlvPorts)`.


## Address Map
Expand Down Expand Up @@ -41,8 +41,8 @@ The crossbar is configured through the `Cfg` parameter with a `axi_pkg::xbar_cfg

| Name | Type | Definition |
|:------------------|:-------------------|:-----------|
| `NoSlvPorts` | `int unsigned` | The number of AXI slave ports of the crossbar (in other words, how many AXI master modules can be attached). |
| `NoMstPorts` | `int unsigned` | The number of AXI master ports of the crossbar (in other words, how many AXI slave modules can be attached). |
| `NumSlvPorts` | `int unsigned` | The number of AXI slave ports of the crossbar (in other words, how many AXI master modules can be attached). |
| `NumMstPorts` | `int unsigned` | The number of AXI master ports of the crossbar (in other words, how many AXI slave modules can be attached). |
| `MaxMstTrans` | `int unsigned` | Each slave port can have at most this many transactions [in flight](../doc#in-flight). |
| `MaxSlvTrans` | `int unsigned` | Each master port can have at most this many transactions per ID [in flight](../doc#in-flight). |
| `FallThrough` | `bit` | Routing decisions on the AW channel fall through to the W channel. Enabling this allows the crossbar to accept a W beat in the same cycle as the corresponding AW beat, but it increases the combinatorial path of the W channel with logic from the AW channel. |
Expand All @@ -52,7 +52,7 @@ The crossbar is configured through the `Cfg` parameter with a `axi_pkg::xbar_cfg
| `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. |
| `AddrWidth` | `int unsigned` | The AXI address width. |
| `DataWidth` | `int unsigned` | The AXI data width. |
| `NoAddrRules` | `int unsigned` | The number of address map rules. |
| `NumAddrRules` | `int unsigned` | The number of address map rules. |

The other parameters are types to define the ports of the crossbar. The `*_chan_t` and `*_req_t`/`*_rsp_t` types must be bound in accordance to the configuration with the `AXI_TYPEDEF` macros defined in `axi/typedef.svh`. The `rule_t` type must be bound to an address decoding rule with the same address width as in the configuration, and `axi_pkg` contains definitions for 64- and 32-bit addresses.

Expand Down
12 changes: 6 additions & 6 deletions scripts/axi_intercon_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,22 +329,22 @@ def write(self):
ns = len(self.slaves)

raw += """
localparam int unsigned NoMasters = 32'd{}; // How many Axi Masters there are
localparam int unsigned NoSlaves = 32'd{}; // How many Axi Slaves there are
localparam int unsigned NumMasters = 32'd{}; // How many Axi Masters there are
localparam int unsigned NumSlaves = 32'd{}; // How many Axi Slaves there are
// axi configuration
localparam int unsigned IdWidthMasters = 32'd{};
localparam int unsigned IdUsed = 32'd{}; // Has to be <= IdWidthMasters
localparam int unsigned IdWidthSlaves = IdWidthMasters + $clog2(NoMasters);
localparam int unsigned IdWidthSlaves = IdWidthMasters + $clog2(NumMasters);
localparam int unsigned AddrWidth = 32'd32; // Address Width
localparam int unsigned DataWidth = 32'd64; // Data Width
localparam int unsigned StrbWidth = DataWidth / 8;
localparam int unsigned UserWidth = 1;
""".format(nm, ns, max_idw, max_idw)
raw += " localparam axi_pkg::xbar_cfg_t xbar_cfg = '{\n"
raw += """
NoSlvPorts: NoMasters,
NoMstPorts: NoSlaves,
NumSlvPorts: NumMasters,
NumMstPorts: NumSlaves,
MaxMstTrans: 10,
MaxSlvTrans: 6,
FallThrough: 1'b0,
Expand All @@ -354,7 +354,7 @@ def write(self):
UniqueIds: 1'b0,
AddrWidth: AddrWidth,
DataWidth: DataWidth,
NoAddrRules: NoSlaves
NumAddrRules: NumSlaves
"""
raw += " };\n"
raw += """
Expand Down
2 changes: 1 addition & 1 deletion src/axi_burst_splitter.sv
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module axi_burst_splitter #(
.r_chan_t ( r_chan_t ),
.axi_req_t ( axi_req_t ),
.axi_rsp_t ( axi_rsp_t ),
.NoMstPorts ( 2 ),
.NumMstPorts ( 2 ),
.MaxTrans ( MaxTxns ),
.LookBits ( IdWidth ),
.FallThrough ( 1'b1 ),
Expand Down
Loading

0 comments on commit 3629789

Please sign in to comment.