Skip to content
Snippets Groups Projects
Commit f3c96dc0 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Support verification of g_bsn_latency_first_node.

parent 81276833
No related branches found
No related tags found
1 merge request!389Resolve L2SDP-1013
This commit is part of merge request !389. Comments created here will be created in the context of that merge request.
...@@ -106,7 +106,8 @@ entity tb_dp_bsn_align_v2 is ...@@ -106,7 +106,8 @@ entity tb_dp_bsn_align_v2 is
g_tb_diff_delay : integer := 0; -- 0 = aligned inputs, -1 = max input delay for no loss, g_tb_diff_delay : integer := 0; -- 0 = aligned inputs, -1 = max input delay for no loss,
-- >~ g_bsn_latency_max * g_block_period will give loss -- >~ g_bsn_latency_max * g_block_period will give loss
g_tb_nof_restart : natural := 2; -- number of times to restart the input stimuli g_tb_nof_restart : natural := 2; -- number of times to restart the input stimuli
g_tb_nof_blocks : natural := 20 -- number of input blocks per restart g_tb_nof_blocks : natural := 20 -- number of input blocks per restart, choose > circular buffer size, so
-- > c_align_latency_nof_blocks
); );
end tb_dp_bsn_align_v2; end tb_dp_bsn_align_v2;
...@@ -140,7 +141,8 @@ architecture tb of tb_dp_bsn_align_v2 is ...@@ -140,7 +141,8 @@ architecture tb of tb_dp_bsn_align_v2 is
constant c_gap_size : natural := g_block_period - g_block_size; constant c_gap_size : natural := g_block_period - g_block_size;
constant c_lost_bsn_stream_id : natural := sel_a_b(g_nof_streams > 1, 1, 0); -- fixed use stream 1 to verify g_lost_bsn_id. Use 0 for g_nof_streams = 1. -- Fixed use stream 1 to verify g_lost_bsn_id. Use 0 for g_nof_streams = 1.
constant c_lost_bsn_stream_id : natural := sel_a_b(g_nof_streams > 1, 1, 0);
-- In tb no support (yet) for immediate aligned output at first node, when c_nof_aligners_max > 1 -- In tb no support (yet) for immediate aligned output at first node, when c_nof_aligners_max > 1
constant c_use_aligner_at_first_node : boolean := true; constant c_use_aligner_at_first_node : boolean := true;
...@@ -155,9 +157,11 @@ architecture tb of tb_dp_bsn_align_v2 is ...@@ -155,9 +157,11 @@ architecture tb of tb_dp_bsn_align_v2 is
constant c_dut_latency : natural := g_pipeline_input + g_rd_latency + c_mm_to_dp_latency + g_pipeline_output; constant c_dut_latency : natural := g_pipeline_input + g_rd_latency + c_mm_to_dp_latency + g_pipeline_output;
-- DUT buffer latency for chain of DUTs -- DUT buffer latency for chain of DUTs
constant c_align_latency_nof_blocks : natural := g_bsn_latency_max * c_nof_aligners_max; -- in number blocks constant c_align_latency_nof_blocks : natural := sel_a_b(c_nof_aligners_max = 1,
constant c_align_latency_nof_valid : natural := g_bsn_latency_max * c_nof_aligners_max * g_block_size; -- in number of data samples g_bsn_latency_max,
constant c_align_latency_nof_clk : natural := g_bsn_latency_max * c_nof_aligners_max * g_block_period; -- in number clk cycles g_bsn_latency_max * (c_nof_aligners_max - 1) + g_bsn_latency_first_node); -- number blocks
constant c_align_latency_nof_valid : natural := c_align_latency_nof_blocks * g_block_size; -- number of data samples
constant c_align_latency_nof_clk : natural := c_align_latency_nof_blocks * g_block_period; -- number clk cycles
-- Total DUT chain latency -- Total DUT chain latency
constant c_total_latency : natural := c_dut_latency + c_align_latency_nof_clk; constant c_total_latency : natural := c_dut_latency + c_align_latency_nof_clk;
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
-- > as 3 -- > as 3
-- > run -all -- > run -all
library IEEE; library IEEE, common_lib;
use IEEE.std_logic_1164.all; use IEEE.std_logic_1164.all;
use common_lib.common_pkg.all;
use work.tb_dp_pkg.all; use work.tb_dp_pkg.all;
entity tb_tb_dp_bsn_align_v2 is entity tb_tb_dp_bsn_align_v2 is
...@@ -33,7 +34,7 @@ end tb_tb_dp_bsn_align_v2; ...@@ -33,7 +34,7 @@ end tb_tb_dp_bsn_align_v2;
architecture tb of tb_tb_dp_bsn_align_v2 is architecture tb of tb_tb_dp_bsn_align_v2 is
constant c_block : natural := 11; constant c_block : natural := 11;
constant c_period : natural := 20; constant c_period : natural := 20;
constant c_nof_blk : natural := 30; constant c_nof_blk : natural := 20; -- choose > circular buffer size
signal tb_end : std_logic := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end' signal tb_end : std_logic := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
begin begin
...@@ -62,25 +63,34 @@ begin ...@@ -62,25 +63,34 @@ begin
-- g_tb_nof_restart : NATURAL := 1; -- number of times to restart the input stimuli -- g_tb_nof_restart : NATURAL := 1; -- number of times to restart the input stimuli
-- g_tb_nof_blocks : NATURAL := 10 -- number of input blocks per restart -- g_tb_nof_blocks : NATURAL := 10 -- number of input blocks per restart
u_mm_output : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk); u_mm_output : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk);
u_mm_output_pow2 : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk); -- g_block_size = 2**4 = 16 u_mm_output_single : entity work.tb_dp_bsn_align_v2 generic map (1, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk);
u_mm_output_large_bsn : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, true, 0, 0, 1, 0, 2, c_nof_blk); -- test where bsn * g_block_size > 2^10 to test address resizing u_output : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_mm_output_single : entity work.tb_dp_bsn_align_v2 generic map (1, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk); u_output_single : entity work.tb_dp_bsn_align_v2 generic map (1, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_dp_output : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_output_pipe1 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 1, 1, 1, 0, 2, c_nof_blk);
u_dp_output_pow2 : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); -- g_block_size = 2**4 = 16 u_pipe1_rdlat2 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 1, 0, 2, 0, 2, c_nof_blk);
u_dp_output_large_bsn : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, false, 0, 0, 1, 0, 2, c_nof_blk); -- test where bsn * g_block_size > 2^10 to test address resizing u_zero_gap : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_block, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_dp_output_single : entity work.tb_dp_bsn_align_v2 generic map (1, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_zero_gap_pipe1_rdlat2 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_block, 32, 16, 17, 0, 0, 0, 3, false, 1, 1, 2, 0, 2, c_nof_blk);
u_dp_output_p1 : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 1, 1, 1, 0, 2, c_nof_blk); u_stream_disable : entity work.tb_dp_bsn_align_v2 generic map (3, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 2, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_bsn_lat_max_2 : entity work.tb_dp_bsn_align_v2 generic map (2, 2, 2, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_stream_lost : entity work.tb_dp_bsn_align_v2 generic map (3, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 2, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_bsn_lat_max_3 : entity work.tb_dp_bsn_align_v2 generic map (2, 3, 3, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_stream_disable_lost : entity work.tb_dp_bsn_align_v2 generic map (4, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 1, 2, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_p1_rd2 : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 1, 0, 2, 0, 2, c_nof_blk); u_bsn_lost : entity work.tb_dp_bsn_align_v2 generic map (3, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 10, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_zero_gap : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_block, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_diff_delay : entity work.tb_dp_bsn_align_v2 generic map (3, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, -1, 2, c_nof_blk);
u_zero_gap_p1_rd2 : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 1, c_block, c_block, 32, 16, 17, 0, 0, 0, 3, false, 1, 1, 2, 0, 2, c_nof_blk);
u_stream_disable : entity work.tb_dp_bsn_align_v2 generic map (3, 1, 1, 1, c_block, c_period, 32, 16, 17, 2, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); -- g_block_size = 2**4 = 16
u_stream_lost : entity work.tb_dp_bsn_align_v2 generic map (3, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 2, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_mm_block_pow2 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, true, 0, 0, 1, 0, 2, c_nof_blk);
u_stream_disable_lost : entity work.tb_dp_bsn_align_v2 generic map (4, 1, 1, 1, c_block, c_period, 32, 16, 17, 1, 2, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_block_pow2 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_bsn_lost : entity work.tb_dp_bsn_align_v2 generic map (3, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 10, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_diff_delay : entity work.tb_dp_bsn_align_v2 generic map (3, 1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, -1, 2, c_nof_blk); -- test where bsn * g_block_size > 2^10 to test address resizing
u_nof_aligners : entity work.tb_dp_bsn_align_v2 generic map (2, 1, 1, 8, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk); u_mm_large_bsn : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, true, 0, 0, 1, 0, 2, c_nof_blk);
u_nof_aligners_diff_delay : entity work.tb_dp_bsn_align_v2 generic map (4, 1, 1, 3, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, -1, 2, c_nof_blk); u_large_bsn : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, false, 0, 0, 1, 0, 2, c_nof_blk);
-- BSN latency
u_bsn_lat_max_2 : entity work.tb_dp_bsn_align_v2 generic map (2, 2, 2, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
u_bsn_lat_max_3 : entity work.tb_dp_bsn_align_v2 generic map (2, 3, 3, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, c_nof_blk);
-- chain of aligners
u_nof_aligners_16 : entity work.tb_dp_bsn_align_v2 generic map (2, 2, c_1, 16, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, 100);
u_nof_aligners_8 : entity work.tb_dp_bsn_align_v2 generic map (2, c_1, c_1, 8, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, 0, 2, 50);
u_nof_aligners_diff_delay : entity work.tb_dp_bsn_align_v2 generic map (4, c_1, c_1, 3, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, false, 0, 0, 1, -1, 2, 50);
end tb; end tb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment