diff --git a/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd b/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd index 1ad750a5058bbd5e75e62cfbb4cde79ee958dc41..664b53aaf524e7b19a61793afacd73d1b1b1853f 100644 --- a/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd +++ b/libraries/io/eth/tb/vhdl/tb_eth_tester.vhd @@ -49,7 +49,6 @@ USE diag_lib.diag_pkg.ALL; USE work.eth_pkg.ALL; USE work.eth_tester_pkg.ALL; USE work.tb_eth_tester_pkg.ALL; ---USE technology_lib.technology_pkg.ALL; USE technology_lib.technology_select_pkg.ALL; USE tech_tse_lib.tech_tse_pkg.ALL; USE tech_tse_lib.tb_tech_tse_pkg.ALL; @@ -57,10 +56,11 @@ USE tech_tse_lib.tb_tech_tse_pkg.ALL; ENTITY tb_eth_tester IS GENERIC ( g_tb_index : NATURAL := 0; -- use to incremental delay logging from tb instances in tb_tb - g_nof_sync : NATURAL := 3; -- number of BG sync intervals to set c_run_time + g_nof_sync : NATURAL := 2; -- number of BG sync intervals to set c_run_time g_nof_streams : NATURAL := 1; -- <= c_eth_nof_udp_ports = 4 when g_loopback_tx_rx = 1 - g_loopback_eth : BOOLEAN := TRUE; -- FALSE = sosi loopback, TRUE = eth loopback + g_loopback_eth : BOOLEAN := TRUE; -- FALSE = sosi loopback, TRUE = eth loopback (using sim_tse or tech_tse) g_eth_sim_level : NATURAL := 0; -- when g_loopback_eth = TRUE, then 0 = use tech_tse IP; 1 = use fast sim_tse model + g_corrupted_en : BOOLEAN := FALSE; -- when TRUE cause a corrupted Rx packet, when tech_tse is used -- t_diag_block_gen_integer = -- sl: enable @@ -71,10 +71,10 @@ ENTITY tb_eth_tester IS -- nat: mem_low_adrs -- nat: mem_high_adrs -- nat: bsn_init - --g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, 8, 100, 0, c_diag_bg_mem_max_adr, 0); -- for first stream - --g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, 8, 10, 0, c_diag_bg_mem_max_adr, 0) -- for other streams - g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, 8, 200, 0, c_diag_bg_mem_max_adr, 0); -- for first stream - g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, 8, 10, 0, c_diag_bg_mem_max_adr, 0) -- for other streams + --g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, 3, 100, 0, c_diag_bg_mem_max_adr, 0); -- for first stream + --g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, 3, 10, 0, c_diag_bg_mem_max_adr, 0) -- for other streams + g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, 3, 200, 0, c_diag_bg_mem_max_adr, 0); -- for first stream + g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, 3, 10, 0, c_diag_bg_mem_max_adr, 0) -- for other streams ); PORT ( tb_end : OUT STD_LOGIC @@ -121,10 +121,11 @@ ARCHITECTURE tb OF tb_eth_tester IS CONSTANT c_rx_exp_latency_sim_tse : NATURAL := 165; CONSTANT c_rx_exp_latency_tech_tse : NATURAL := 375; - -- CRC is added by ETH IP. Therefore Tx packet has no CRC yet and Rx - -- packet length depends on g_loopback_eth = TRUE - CONSTANT c_nof_valid_per_packet_first : NATURAL := c_bg_block_len_first + sel_a_b(g_loopback_eth, 4, 0); - CONSTANT c_nof_valid_per_packet_others : NATURAL := c_bg_block_len_others + sel_a_b(g_loopback_eth, 4, 0); + -- CRC is added by Tx TSE IP and removed by dp_offload_rx when g_remove_crc = + -- g_loopback_eth = TRUE. Therefore internally only application payload + -- (= block_len) octets are counted. + CONSTANT c_nof_valid_per_packet_first : NATURAL := c_bg_block_len_first; + CONSTANT c_nof_valid_per_packet_others : NATURAL := c_bg_block_len_others; CONSTANT c_total_count_nof_valid_per_sync_first : NATURAL := g_bg_ctrl_first.blocks_per_sync * c_nof_valid_per_packet_first; CONSTANT c_total_count_nof_valid_per_sync_others : NATURAL := g_bg_ctrl_others.blocks_per_sync * c_nof_valid_per_packet_others; @@ -154,6 +155,7 @@ ARCHITECTURE tb OF tb_eth_tester IS SIGNAL eth_clk : STD_LOGIC := '1'; SIGNAL eth_txp : STD_LOGIC; SIGNAL eth_rxp : STD_LOGIC; + SIGNAL eth_corrupt : STD_LOGIC := '0'; -- Use same bg_ctrl for all streams, this provides sufficient test coverage SIGNAL bg_ctrl_arr : t_diag_block_gen_integer_arr(g_nof_streams-1 DOWNTO 0); @@ -252,6 +254,9 @@ BEGIN rx_exp_total_count_nof_valid_arr(0) <= c_nof_sync_first * c_total_count_nof_valid_per_sync_first; rx_exp_total_count_nof_corrupted_arr <= (OTHERS => 0); -- default no Rx errors + IF g_corrupted_en = TRUE THEN + rx_exp_total_count_nof_corrupted_arr(0) <= 1; + END IF; WAIT; END PROCESS; @@ -352,7 +357,7 @@ BEGIN "ETH bit rate total :" & " c_eth_nof_bps_total = " & REAL'IMAGE(c_eth_nof_bps_total) & " bps"); END IF; - ASSERT c_eth_nof_bps_total < 10.0**9 REPORT "Total ETH bitrate must be < 1Gbps." SEVERITY WARNING; + ASSERT c_eth_nof_bps_total < 10.0**9 REPORT "Tx flow control will keep ETH bitrate < 1Gbps." SEVERITY WARNING; ------------------------------------------------------------------------- -- Verification: Total counts @@ -389,40 +394,49 @@ BEGIN ", nof_valid = " & NATURAL'IMAGE(rx_total_count_nof_valid_arr(I)) & ", nof_corrupted = " & NATURAL'IMAGE(rx_total_count_nof_corrupted_arr(I))); - IF c_eth_nof_bps_total < 10.0**9 THEN - -- Verify, only log when wrong - ASSERT tx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str & - "Wrong Tx total nof packets count(" & NATURAL'IMAGE(I) & - "), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) & - " /= " & NATURAL'IMAGE(exp_total_count_nof_packet_arr(I)) & - " = Expected count" SEVERITY ERROR; - - ASSERT rx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str & - "Wrong Rx total nof packets count(" & NATURAL'IMAGE(I) & - "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_packet_arr(I)) & - " /= " & NATURAL'IMAGE(exp_total_count_nof_packet_arr(I)) & - " = Expected count" SEVERITY ERROR; - - ASSERT rx_total_count_nof_valid_arr(I) = rx_exp_total_count_nof_valid_arr(I) REPORT c_tb_str & - "Wrong Rx total nof valids count(" & NATURAL'IMAGE(I) & - "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_valid_arr(I)) & - " /= " & NATURAL'IMAGE(rx_exp_total_count_nof_valid_arr(I)) & - " = Expected count" SEVERITY ERROR; - - ASSERT rx_total_count_nof_corrupted_arr(I) = rx_exp_total_count_nof_corrupted_arr(I) REPORT c_tb_str & - "Wrong Rx total nof corrupted count(" & NATURAL'IMAGE(I) & - "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_corrupted_arr(I)) & - " /= " & NATURAL'IMAGE(rx_exp_total_count_nof_corrupted_arr(I)) & - " = Expected count" SEVERITY ERROR; - ELSE - -- Verify that Tx total nof packets = Rx total nof packets, also when - -- BG experiences siso.xon block level flow control, to stay below - -- 1 Gbps of the 1GbE link rate. - ASSERT tx_total_count_nof_packet_arr(I) = rx_total_count_nof_packet_arr(I) REPORT c_tb_str & - "Wrong Tx-Rx total nof packets count(" & NATURAL'IMAGE(I) & - "), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) & - " /= " & NATURAL'IMAGE(rx_total_count_nof_packet_arr(I)) & - " = Rx count" SEVERITY ERROR; + -- Verify, only log when wrong + IF g_corrupted_en = FALSE THEN + IF c_eth_nof_bps_total < 10.0**9 THEN + ASSERT tx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str & + "Wrong Tx total nof packets count(" & NATURAL'IMAGE(I) & + "), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) & + " /= " & NATURAL'IMAGE(exp_total_count_nof_packet_arr(I)) & + " = Expected count" SEVERITY ERROR; + + ASSERT rx_total_count_nof_packet_arr(I) = exp_total_count_nof_packet_arr(I) REPORT c_tb_str & + "Wrong Rx total nof packets count(" & NATURAL'IMAGE(I) & + "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_packet_arr(I)) & + " /= " & NATURAL'IMAGE(exp_total_count_nof_packet_arr(I)) & + " = Expected count" SEVERITY ERROR; + + ASSERT rx_total_count_nof_valid_arr(I) = rx_exp_total_count_nof_valid_arr(I) REPORT c_tb_str & + "Wrong Rx total nof valids count(" & NATURAL'IMAGE(I) & + "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_valid_arr(I)) & + " /= " & NATURAL'IMAGE(rx_exp_total_count_nof_valid_arr(I)) & + " = Expected count" SEVERITY ERROR; + + ASSERT rx_total_count_nof_corrupted_arr(I) = rx_exp_total_count_nof_corrupted_arr(I) REPORT c_tb_str & + "Wrong Rx total nof corrupted count(" & NATURAL'IMAGE(I) & + "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_corrupted_arr(I)) & + " /= " & NATURAL'IMAGE(rx_exp_total_count_nof_corrupted_arr(I)) & + " = Expected count" SEVERITY ERROR; + ELSE + -- Verify that Tx total nof packets = Rx total nof packets, also when + -- BG experiences siso.xon block level flow control, to stay below + -- 1 Gbps of the 1GbE link rate. + ASSERT tx_total_count_nof_packet_arr(I) = rx_total_count_nof_packet_arr(I) REPORT c_tb_str & + "Wrong Tx-Rx total nof packets count(" & NATURAL'IMAGE(I) & + "), Tx count = " & NATURAL'IMAGE(tx_total_count_nof_packet_arr(I)) & + " /= " & NATURAL'IMAGE(rx_total_count_nof_packet_arr(I)) & + " = Rx count" SEVERITY ERROR; + END IF; + ELSE + -- g_corrupted_en = TRUE + ASSERT rx_total_count_nof_corrupted_arr(I) = rx_exp_total_count_nof_corrupted_arr(I) REPORT c_tb_str & + "Wrong Rx total nof corrupted count(" & NATURAL'IMAGE(I) & + "), Rx count = " & NATURAL'IMAGE(rx_total_count_nof_corrupted_arr(I)) & + " /= " & NATURAL'IMAGE(rx_exp_total_count_nof_corrupted_arr(I)) & + " = Expected count" SEVERITY ERROR; END IF; END LOOP; @@ -524,7 +538,8 @@ BEGIN dut : ENTITY work.eth_tester GENERIC MAP ( - g_nof_streams => g_nof_streams + g_nof_streams => g_nof_streams, + g_remove_crc => g_loopback_eth -- remove CRC inserted by TSE (sim or tech) ) PORT MAP ( -- Clocks and reset @@ -587,7 +602,23 @@ BEGIN tse_init <= '0'; END GENERATE; use_tech_tse : IF g_eth_sim_level = 0 GENERATE - eth_rxp <= TRANSPORT eth_txp AFTER 12 ns; -- apply cable delay + p_link : PROCESS(eth_txp) + BEGIN + eth_rxp <= TRANSPORT eth_txp AFTER 12 ns; -- apply cable delay + eth_corrupt <= '0'; + + -- Optionally force eth_rxp low to cause a CRC error + IF g_corrupted_en = TRUE THEN + -- Use long BG block_len to easy timing of eth_corrupt during a + -- payload. Not during header to avoid lost packet and not + -- during idle to have no effect. E.g. g_bg_ctrl_first = + -- ('1', '1', 1000, 1, 200, 0, c_diag_bg_mem_max_adr, 0) + IF (NOW > 30000 ns) AND (NOW <= 30000 ns + eth_clk_period * 2) THEN + eth_corrupt <= '1'; + eth_rxp <= '0'; + END IF; + END IF; + END PROCESS; p_tech_tse_setup : PROCESS -- When c_promis_en = FALSE then only accept broadcast and packets with diff --git a/libraries/io/eth/tb/vhdl/tb_tb_eth_tester.vhd b/libraries/io/eth/tb/vhdl/tb_tb_eth_tester.vhd index daecca1384d940c8261150f3127d6ca0503208d3..69eaa79d6a50281e3b6a41902c133f0111ba021c 100644 --- a/libraries/io/eth/tb/vhdl/tb_tb_eth_tester.vhd +++ b/libraries/io/eth/tb/vhdl/tb_tb_eth_tester.vhd @@ -49,9 +49,10 @@ ARCHITECTURE tb OF tb_tb_eth_tester IS -- Tb CONSTANT c_eth_clk_MHz : NATURAL := 125; CONSTANT c_st_clk_MHz : NATURAL := 200; - CONSTANT c_nof_sync : NATURAL := 3; + CONSTANT c_nof_sync : NATURAL := 2; CONSTANT c_nof_sync_many : NATURAL := 50; -- sufficient to achieve Tx FIFO fill level CONSTANT c_nof_streams : NATURAL := 3; + CONSTANT c_nof_blk : NATURAL := 3; -- nof_blk per sync -- Tx packet size and gap size in octets CONSTANT c_block_len : NATURAL := 50; -- BG block length of first stream [0] @@ -77,18 +78,22 @@ ARCHITECTURE tb OF tb_tb_eth_tester IS -- BG ctrl CONSTANT c_high : NATURAL := c_diag_bg_mem_max_adr; -- = 2**24 - CONSTANT c_bg_ctrl_rst : t_diag_block_gen_integer := ('0', '0', 1, 8, c_gap_len, 0, c_high, 0); -- place holder for unused stream + CONSTANT c_bg_ctrl_rst : t_diag_block_gen_integer := ('0', '0', 1, c_nof_blk, c_gap_len, 0, c_high, 0); -- place holder for unused stream - CONSTANT c_bg_ctrl_one : t_diag_block_gen_integer := ('1', '1', c_block_len, 8, c_gap_len, 0, c_high, 0); -- for first stream - CONSTANT c_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', c_others_len, 8, c_gap_len, 0, c_high, 0); -- for other streams + CONSTANT c_bg_ctrl_one : t_diag_block_gen_integer := ('1', '1', c_block_len, c_nof_blk, c_gap_len, 0, c_high, 0); -- for first stream + CONSTANT c_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', c_others_len, c_nof_blk, c_gap_len, 0, c_high, 0); -- for other streams - CONSTANT c_bg_ctrl_len_0 : t_diag_block_gen_integer := ('1', '1', c_block_len+0, 8, c_gap_len, 0, c_high, 0); -- nof octets - CONSTANT c_bg_ctrl_len_1 : t_diag_block_gen_integer := ('1', '1', c_block_len+1, 8, c_gap_len, 0, c_high, 0); -- nof octets - CONSTANT c_bg_ctrl_len_2 : t_diag_block_gen_integer := ('1', '1', c_block_len+2, 8, c_gap_len, 0, c_high, 0); -- nof octets - CONSTANT c_bg_ctrl_len_3 : t_diag_block_gen_integer := ('1', '1', c_block_len+3, 8, c_gap_len, 0, c_high, 0); -- nof octets + -- . BG with different block lengths and other payload values + -- The payload values are only verified manually using the Wave Window + CONSTANT c_bg_ctrl_len_0 : t_diag_block_gen_integer := ('1', '1', c_block_len+0, c_nof_blk, c_gap_len, 0, 0, 0); -- nof octets + CONSTANT c_bg_ctrl_len_1 : t_diag_block_gen_integer := ('1', '1', c_block_len+1, c_nof_blk, c_gap_len, 1, 1, 0); -- nof octets + CONSTANT c_bg_ctrl_len_2 : t_diag_block_gen_integer := ('1', '1', c_block_len+2, c_nof_blk, c_gap_len, 1, 7, 0); -- nof octets + CONSTANT c_bg_ctrl_len_3 : t_diag_block_gen_integer := ('1', '1', c_block_len+3, c_nof_blk, c_gap_len, c_high-1, c_high-1, 0); -- nof octets - CONSTANT c_bg_ctrl_multiple_first : t_diag_block_gen_integer := ('1', '1', c_block_len, 8, c_nof_streams * c_gap_len, 0, c_high, 0); -- for first stream - CONSTANT c_bg_ctrl_multiple_others : t_diag_block_gen_integer := ('1', '1', c_others_len, 8, c_nof_streams * c_gap_len, 0, c_high, 0); -- for other streams + CONSTANT c_bg_ctrl_corrupted : t_diag_block_gen_integer := ('1', '1', 1000, 1, 200, 0, c_high, 0); + + CONSTANT c_bg_ctrl_multiple_first : t_diag_block_gen_integer := ('1', '1', c_block_len, c_nof_blk, c_nof_streams * c_gap_len, 0, c_high, 0); -- for first stream + CONSTANT c_bg_ctrl_multiple_others : t_diag_block_gen_integer := ('1', '1', c_others_len, c_nof_blk, c_nof_streams * c_gap_len, 0, c_high, 0); -- for other streams BEGIN @@ -97,6 +102,7 @@ BEGIN -- g_nof_streams : NATURAL := 2; -- g_loopback_eth : BOOLEAN := FALSE; -- FALSE = sosi loopback, TRUE = eth loopback -- g_eth_sim_level : NATURAL := 0; -- when g_loopback_eth = TRUE, then 0 = use IP; 1 = use fast serdes model +-- g_corrupted_en : BOOLEAN := FALSE; -- when TRUE cause a corrupted Rx packet -- -- -- t_diag_block_gen_integer = -- -- sl: enable @@ -107,8 +113,8 @@ BEGIN -- -- nat: mem_low_adrs -- -- nat: mem_high_adrs -- -- nat: bsn_init --- g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, 8, 100, 0, 30, 0); -- for first stream --- g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, 8, 10, 0, 30, 0) -- for other streams +-- g_bg_ctrl_first : t_diag_block_gen_integer := ('1', '1', 50, c_nof_blk, 100, 0, 30, 0); -- for first stream +-- g_bg_ctrl_others : t_diag_block_gen_integer := ('1', '1', 30, c_nof_blk, 10, 0, 30, 0) -- for other streams -- Tb instance prefix: -- . u_st : uses streaming Tx-Rx interface @@ -119,28 +125,28 @@ BEGIN -- Single stream ----------------------------------------------------------------------------- -- Try different loopback interfaces - u_st : ENTITY work.tb_eth_tester GENERIC MAP (0, c_nof_sync, 1, FALSE, 1, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(0)); - u_sim_tse : ENTITY work.tb_eth_tester GENERIC MAP (1, c_nof_sync, 1, TRUE, 1, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(1)); - u_tech_tse : ENTITY work.tb_eth_tester GENERIC MAP (2, c_nof_sync, 1, TRUE, 0, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(2)); + u_st : ENTITY work.tb_eth_tester GENERIC MAP (0, c_nof_sync, 1, FALSE, 1, FALSE, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(0)); + u_sim_tse : ENTITY work.tb_eth_tester GENERIC MAP (1, c_nof_sync, 1, TRUE, 1, FALSE, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(1)); + u_tech_tse : ENTITY work.tb_eth_tester GENERIC MAP (2, c_nof_sync, 1, TRUE, 0, FALSE, c_bg_ctrl_one, c_bg_ctrl_rst) PORT MAP (tb_end_vec(2)); -- Try large block size and nof blocks_per_sync = 1 - u_st_jumbo1 : ENTITY work.tb_eth_tester GENERIC MAP (10, c_nof_sync, 1, FALSE, 1, + u_st_jumbo1 : ENTITY work.tb_eth_tester GENERIC MAP (10, c_nof_sync, 1, FALSE, 1, FALSE, ('1', '1', c_block_len_jumbo, 1, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(10)); -- Try large block sizes - u_st_jumbo2 : ENTITY work.tb_eth_tester GENERIC MAP (11, c_nof_sync, 1, FALSE, 1, + u_st_jumbo2 : ENTITY work.tb_eth_tester GENERIC MAP (11, c_nof_sync, 1, FALSE, 1, FALSE, ('1', '1', c_block_len_jumbo, 2, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(11)); - u_sim_tse_jumbo : ENTITY work.tb_eth_tester GENERIC MAP (12, c_nof_sync, 1, TRUE, 1, + u_sim_tse_jumbo : ENTITY work.tb_eth_tester GENERIC MAP (12, c_nof_sync, 1, TRUE, 1, FALSE, ('1', '1', c_block_len_jumbo, 2, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(12)); - u_tech_tse_jumbo : ENTITY work.tb_eth_tester GENERIC MAP (13, c_nof_sync, 1, TRUE, 0, + u_tech_tse_jumbo : ENTITY work.tb_eth_tester GENERIC MAP (13, c_nof_sync, 1, TRUE, 0, FALSE, ('1', '1', c_block_len_jumbo, 2, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(13)); @@ -150,24 +156,24 @@ BEGIN -- . ETH MAC pads samples_per_packet <= 6 to 6, to have minimum packet length of 64 octets, -- because hdr = 14 + 20 + 8 + 12 and crc = 4 have 58 octets. - u_st_len2 : ENTITY work.tb_eth_tester GENERIC MAP (20, c_nof_sync, 1, FALSE, 1, - ('1', '1', 2, 8, c_gap_len, 0, c_high, 0), + u_st_len2 : ENTITY work.tb_eth_tester GENERIC MAP (20, c_nof_sync, 1, FALSE, 1, FALSE, + ('1', '1', 2, c_nof_blk, c_gap_len, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(20)); - u_sim_tse_len2 : ENTITY work.tb_eth_tester GENERIC MAP (21, c_nof_sync, 1, TRUE, 1, - ('1', '1', 2, 8, c_gap_len, 0, c_high, 0), + u_sim_tse_len2 : ENTITY work.tb_eth_tester GENERIC MAP (21, c_nof_sync, 1, TRUE, 1, FALSE, + ('1', '1', 2, c_nof_blk, c_gap_len, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(21)); - u_tech_tse_len6 : ENTITY work.tb_eth_tester GENERIC MAP (22, c_nof_sync, 1, TRUE, 0, - ('1', '1', 6, 8, c_gap_len, 0, c_high, 0), + u_tech_tse_len6 : ENTITY work.tb_eth_tester GENERIC MAP (22, c_nof_sync, 1, TRUE, 0, FALSE, + ('1', '1', 6, c_nof_blk, c_gap_len, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(22)); -- Try different BG block lengths to verify sosi.empty nof octets in last word - u_st_bg_len_0 : ENTITY work.tb_eth_tester GENERIC MAP (30, c_nof_sync, 1, FALSE, 1, c_bg_ctrl_len_0, c_bg_ctrl_rst) PORT MAP (tb_end_vec(30)); - u_st_bg_len_1 : ENTITY work.tb_eth_tester GENERIC MAP (31, c_nof_sync, 1, FALSE, 1, c_bg_ctrl_len_1, c_bg_ctrl_rst) PORT MAP (tb_end_vec(31)); - u_st_bg_len_2 : ENTITY work.tb_eth_tester GENERIC MAP (32, c_nof_sync, 1, FALSE, 1, c_bg_ctrl_len_2, c_bg_ctrl_rst) PORT MAP (tb_end_vec(32)); - u_st_bg_len_3 : ENTITY work.tb_eth_tester GENERIC MAP (33, c_nof_sync, 1, FALSE, 1, c_bg_ctrl_len_3, c_bg_ctrl_rst) PORT MAP (tb_end_vec(33)); + u_st_bg_len_0 : ENTITY work.tb_eth_tester GENERIC MAP (30, c_nof_sync, 1, FALSE, 1, FALSE, c_bg_ctrl_len_0, c_bg_ctrl_rst) PORT MAP (tb_end_vec(30)); + u_st_bg_len_1 : ENTITY work.tb_eth_tester GENERIC MAP (31, c_nof_sync, 1, FALSE, 1, FALSE, c_bg_ctrl_len_1, c_bg_ctrl_rst) PORT MAP (tb_end_vec(31)); + u_st_bg_len_2 : ENTITY work.tb_eth_tester GENERIC MAP (32, c_nof_sync, 1, FALSE, 1, FALSE, c_bg_ctrl_len_2, c_bg_ctrl_rst) PORT MAP (tb_end_vec(32)); + u_st_bg_len_3 : ENTITY work.tb_eth_tester GENERIC MAP (33, c_nof_sync, 1, FALSE, 1, FALSE, c_bg_ctrl_len_3, c_bg_ctrl_rst) PORT MAP (tb_end_vec(33)); -- Try BG xon/xoff block flow control by using smaller gapsize that would -- exceed 1 Gbps. Use c_nof_sync_many to fill Tx FIFO. Use tse because @@ -176,37 +182,40 @@ BEGIN -- sosi.empy /= 0 and use zero gapsize to have BG blocks directly after -- each other. u_sim_tse_bg_flow_control : ENTITY work.tb_eth_tester - GENERIC MAP (40, c_nof_sync_many, 1, TRUE, 1, - ('1', '1', c_block_len_odd, 8, c_zero_gap, 0, c_high, 0), + GENERIC MAP (40, c_nof_sync_many, 1, TRUE, 1, FALSE, + ('1', '1', c_block_len_odd, c_nof_blk, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(40)); u_tech_tse_bg_flow_control : ENTITY work.tb_eth_tester - GENERIC MAP (41, c_nof_sync_many, 1, TRUE, 0, - ('1', '1', c_block_len_odd, 8, c_zero_gap, 0, c_high, 0), + GENERIC MAP (41, c_nof_sync_many, 1, TRUE, 0, FALSE, + ('1', '1', c_block_len_odd, c_nof_blk, c_zero_gap, 0, c_high, 0), c_bg_ctrl_rst) PORT MAP (tb_end_vec(41)); + -- Try corrupted packet + u_tech_tse_corrupted : ENTITY work.tb_eth_tester GENERIC MAP (50, c_nof_sync, 1, TRUE, 0, TRUE, c_bg_ctrl_corrupted, c_bg_ctrl_rst) PORT MAP (tb_end_vec(50)); + ----------------------------------------------------------------------------- -- Multiple streams ----------------------------------------------------------------------------- u_st_multiple_streams : ENTITY work.tb_eth_tester - GENERIC MAP (80, c_nof_sync, c_nof_streams, FALSE, 1, + GENERIC MAP (80, c_nof_sync, c_nof_streams, FALSE, 1, FALSE, c_bg_ctrl_multiple_first, c_bg_ctrl_multiple_others) PORT MAP (tb_end_vec(80)); -- Use tse to verify dp_mux and dp_demux in ETH module [1] u_sim_tse_multiple_streams : ENTITY work.tb_eth_tester - GENERIC MAP (81, c_nof_sync, c_nof_streams, TRUE, 1, + GENERIC MAP (81, c_nof_sync, c_nof_streams, TRUE, 1, FALSE, c_bg_ctrl_multiple_first, c_bg_ctrl_multiple_others) PORT MAP (tb_end_vec(81)); u_sim_tse_multiple_bg_flow_control : ENTITY work.tb_eth_tester - GENERIC MAP (82, c_nof_sync_many, c_nof_streams, TRUE, 1, - ('1', '1', c_block_len, 8, c_short_gap, 0, c_high, 0), - ('1', '1', c_others_len, 8, c_short_gap, 0, c_high, 0)) + GENERIC MAP (82, c_nof_sync_many, c_nof_streams, TRUE, 1, FALSE, + ('1', '1', c_block_len, c_nof_blk, c_short_gap, 0, c_high, 0), + ('1', '1', c_others_len, c_nof_blk, c_short_gap, 0, c_high, 0)) PORT MAP (tb_end_vec(82)); tb_end <= '1' WHEN tb_end_vec = c_tb_end_vec ELSE '0';