Skip to content

Commit

Permalink
test/tb_axi_xbar: Test interface variant
Browse files Browse the repository at this point in the history
Prior to this commit, the `axi_xbar_intf` module was not tested.
This commit corrects this by instantiating `axi_xbar_intf` instead of
the `struct` variant `axi_xbar` inside the TB.  The `struct` variant
still gets tested because it is instantiated inside `axi_xbar_intf`.
  • Loading branch information
andreaskurth committed Dec 1, 2021
1 parent 0599685 commit b6117a0
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions test/tb_axi_xbar.sv
Original file line number Diff line number Diff line change
Expand Up @@ -257,33 +257,19 @@ module tb_axi_xbar #(
//-----------------------------------
// DUT
//-----------------------------------
axi_xbar #(
.Cfg ( xbar_cfg ),
.slv_aw_chan_t( aw_chan_mst_t ),
.mst_aw_chan_t( aw_chan_slv_t ),
.w_chan_t ( w_chan_t ),
.slv_b_chan_t ( b_chan_mst_t ),
.mst_b_chan_t ( b_chan_slv_t ),
.slv_ar_chan_t( ar_chan_mst_t ),
.mst_ar_chan_t( ar_chan_slv_t ),
.slv_r_chan_t ( r_chan_mst_t ),
.mst_r_chan_t ( r_chan_slv_t ),
.slv_req_t ( mst_req_t ),
.slv_resp_t ( mst_resp_t ),
.mst_req_t ( slv_req_t ),
.mst_resp_t ( slv_resp_t ),
.rule_t (rule_t )
axi_xbar_intf #(
.AXI_USER_WIDTH ( AxiUserWidth ),
.Cfg ( xbar_cfg ),
.rule_t ( rule_t )
) i_xbar_dut (
.clk_i ( clk ),
.rst_ni ( rst_n ),
.test_i ( 1'b0 ),
.slv_ports_req_i ( masters_req ),
.slv_ports_resp_o ( masters_resp ),
.mst_ports_req_o ( slaves_req ),
.mst_ports_resp_i ( slaves_resp ),
.addr_map_i ( AddrMap ),
.en_default_mst_port_i ( '0 ),
.default_mst_port_i ( '0 )
.clk_i ( clk ),
.rst_ni ( rst_n ),
.test_i ( 1'b0 ),
.slv_ports ( master ),
.mst_ports ( slave ),
.addr_map_i ( AddrMap ),
.en_default_mst_port_i ( '0 ),
.default_mst_port_i ( '0 )
);

// logger for master modules
Expand Down

0 comments on commit b6117a0

Please sign in to comment.