Skip to content

Commit

Permalink
test/tb_axi_xbar: Test unique ID configuration
Browse files Browse the repository at this point in the history
This configuration is tested in addition to the configuration without
unqiue IDs.  To keep the overall TB runtime comparable even though we
have doubled the number of tested configurations, the number of
transactions per master module is halved.
  • Loading branch information
andreaskurth committed Apr 22, 2021
1 parent f0cc142 commit 4516a9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 4 additions & 1 deletion scripts/run_vsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ exec_test() {
axi_xbar)
for Atop in 0 1; do
for Exclusive in 0 1; do
call_vsim tb_axi_xbar -gTbEnAtop=$Atop -gTbEnExcl=$Exclusive
for UniqueIds in 0 1; do
call_vsim tb_axi_xbar -gTbEnAtop=$Atop -gTbEnExcl=$Exclusive \
-gTbUniqueIds=$UniqueIds
done
done
done
;;
Expand Down
14 changes: 8 additions & 6 deletions test/tb_axi_xbar.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
`include "axi/assign.svh"

module tb_axi_xbar #(
parameter bit TbEnAtop = 1'b1, // enable atomic operations (ATOPs)
parameter bit TbEnExcl = 1'b0 // enable exclusive accesses
parameter bit TbEnAtop = 1'b1, // enable atomic operations (ATOPs)
parameter bit TbEnExcl = 1'b0, // enable exclusive accesses
parameter bit TbUniqueIds = 1'b0 // restrict to only unique IDs
);
// Dut parameters
localparam int unsigned NoMasters = 6; // How many Axi Masters there are
localparam int unsigned NoSlaves = 8; // How many Axi Slaves there are
// Random master no Transactions
localparam int unsigned NoWrites = 250; // How many writes per master
localparam int unsigned NoReads = 250; // How many reads per master
localparam int unsigned NoWrites = 125; // How many writes per master
localparam int unsigned NoReads = 125; // How many reads per master
// timing parameters
localparam time CyclTime = 10ns;
localparam time ApplTime = 2ns;
Expand All @@ -55,7 +56,7 @@ module tb_axi_xbar #(
LatencyMode: axi_pkg::CUT_ALL_AX,
AxiIdWidthSlvPorts: AxiIdWidthMasters,
AxiIdUsedSlvPorts: AxiIdUsed,
UniqueIds: 1'b0,
UniqueIds: TbUniqueIds,
AxiAddrWidth: AxiAddrWidth,
AxiDataWidth: AxiDataWidth,
NoAddrRules: 8
Expand Down Expand Up @@ -108,7 +109,8 @@ module tb_axi_xbar #(
.MAX_READ_TXNS ( 20 ),
.MAX_WRITE_TXNS ( 20 ),
.AXI_EXCLS ( TbEnExcl ),
.AXI_ATOPS ( TbEnAtop )
.AXI_ATOPS ( TbEnAtop ),
.UNIQUE_IDS ( TbUniqueIds )
) axi_rand_master_t;
typedef axi_test::axi_rand_slave #(
// AXI interface parameters
Expand Down

0 comments on commit 4516a9b

Please sign in to comment.