Skip to content

Commit

Permalink
axi_xp: Make xbar Cfg parametrizable
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti authored and thommythomaso committed Sep 27, 2022
1 parent 1a681bb commit def4a00
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/axi_xp.sv
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
module axi_xp #(
// Atomic operations settings
parameter bit ATOPs = 1'b1,
// xbar configuration
parameter axi_pkg::xbar_cfg_t Cfg = '0,
/// Number of slave ports.
parameter int unsigned NumSlvPorts = 32'd0,
/// Number of master ports.
Expand Down Expand Up @@ -124,22 +126,8 @@ module axi_xp #(
xbar_req_t [NumMstPorts-1:0] xbar_req;
xbar_resp_t [NumMstPorts-1:0] xbar_resp;

localparam axi_pkg::xbar_cfg_t xbar_cfg = '{
NoSlvPorts: NumSlvPorts,
NoMstPorts: NumMstPorts,
MaxMstTrans: AxiMaxTxnsPerId,
MaxSlvTrans: AxiSlvPortMaxWriteTxns,
FallThrough: 1'b0,
LatencyMode: axi_pkg::CUT_ALL_PORTS,
AxiIdWidthSlvPorts: AxiIdWidth,
AxiIdUsedSlvPorts: AxiIdWidth,
AxiAddrWidth: AxiAddrWidth,
AxiDataWidth: AxiDataWidth,
NoAddrRules: NumAddrRules
};

axi_xbar #(
.Cfg ( xbar_cfg ),
.Cfg ( Cfg ),
.ATOPs ( ATOPs ),
.Connectivity ( Connectivity ),
.slv_aw_chan_t ( aw_t ),
Expand Down

0 comments on commit def4a00

Please sign in to comment.