1//
2// Copyright 2018 Ettus Research, A National Instruments Company
3//
4// SPDX-License-Identifier: LGPL-3.0-or-later
5//
6
7module axis_ctrl_crossbar_nxn_top(
8  input clk,
9  input rst
10);
11  // Router global config
12  localparam IMPL        = "{top}";
13  localparam NPORTS      = {ports};
14  localparam DWIDTH      = {dataw};
15  localparam MTU         = {mtu};
16  localparam ROUTING     = "{ralloc}";
17
18  (* dont_touch = "true"*) wire [(DWIDTH*NPORTS)-1:0] s_axis_tdata , m_axis_tdata ;
19  (* dont_touch = "true"*) wire [NPORTS-1:0]          s_axis_tlast , m_axis_tlast ;
20  (* dont_touch = "true"*) wire [NPORTS-1:0]          s_axis_tvalid, m_axis_tvalid;
21  (* dont_touch = "true"*) wire [NPORTS-1:0]          s_axis_tready, m_axis_tready;
22  (* dont_touch = "true"*) wire                       deadlock_detected;
23
24  axis_ctrl_crossbar_nxn #(
25    .WIDTH            (DWIDTH),
26    .NPORTS           (NPORTS),
27    .TOPOLOGY         (IMPL),
28    .INGRESS_BUFF_SIZE(MTU),
29    .ROUTER_BUFF_SIZE (MTU),
30    .ROUTING_ALLOC    (ROUTING),
31    .SWITCH_ALLOC     ("ROUND-ROBIN")
32  ) router_dut_i (
33    .clk              (clk),
34    .reset            (rst),
35    .s_axis_tdata     (s_axis_tdata ),
36    .s_axis_tlast     (s_axis_tlast ),
37    .s_axis_tvalid    (s_axis_tvalid),
38    .s_axis_tready    (s_axis_tready),
39    .m_axis_tdata     (m_axis_tdata ),
40    .m_axis_tlast     (m_axis_tlast ),
41    .m_axis_tvalid    (m_axis_tvalid),
42    .m_axis_tready    (m_axis_tready),
43    .deadlock_detected(deadlock_detected)
44  );
45
46endmodule
47
48