Resolve L2SDP-246
Closes L2SDP-246
Merge request reports
Activity
6 -- 7 -- Licensed under the Apache License, Version 2.0 (the "License"); 8 -- you may not use this file except in compliance with the License. 9 -- You may obtain a copy of the License at 10 -- 11 -- http://www.apache.org/licenses/LICENSE-2.0 12 -- 13 -- Unless required by applicable law or agreed to in writing, software 14 -- distributed under the License is distributed on an "AS IS" BASIS, 15 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 -- See the License for the specific language governing permissions and 17 -- limitations under the License. 18 -- 19 ------------------------------------------------------------------------------- 20 -- Test statistics offload with "ethernet packet statistics" in wave window only 21 -- Usage: Svp wat preciezer aangeven, ik denk dat de tb dit doet (?):
Purpose: Test statistics offload Description: The eth_statistics is used to verify that the correct number of packets is received. The contents and size of the packets is not verified.
Edited by Eric Kooistrachanged this line in version 5 of the diff
60 61 CONSTANT c_nof_block_per_sync : NATURAL := 16; 62 CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); 63 64 -- WG 65 CONSTANT c_full_scale_ampl : REAL := REAL(2**(18-1) - 1); -- = full scale of WG 66 CONSTANT c_bsn_start_wg : NATURAL := 2; -- start WG at this BSN to instead of some BSN, to avoid mismatches in exact expected data values 67 CONSTANT c_ampl_sp_0 : NATURAL := 2**(c_sdp_W_adc-1) / 2; -- in number of lsb 68 CONSTANT c_wg_subband_freq_unit : REAL := c_diag_wg_freq_unit / REAL(c_sdp_N_fft); -- subband freq = Fs/1024 = 200 MSps/1024 = 195312.5 Hz sinus 69 CONSTANT c_wg_freq_offset : REAL := 0.0 / 11.0; -- in freq_unit 70 CONSTANT c_subband_sp_0 : REAL := 102.0; -- Select subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz 71 CONSTANT c_wg_ampl_lsb : REAL := c_diag_wg_ampl_unit / c_full_scale_ampl; -- amplitude in number of LSbit resolution steps 72 73 -- . 1GbE output 74 CONSTANT c_eth_check_nof_packets : NATURAL := 4512; -- received packets in 2 sync periods 75 CONSTANT c_eth_runtime_timeout : TIME := 100 ms; -- factor 2 margin 100 ms lijkt mij veel te lang voor simulatie, c_nof_block_per_sync = 16 dus een sync interval duur 1024 * 16 * 5 ns = 81.92 us, dus een timeout van 100 us zou al genoeg moeten zijn om de simulatie af te latren breken door eth_statistics. Svp in comment aangeven waarom je de timeout op een bepaalde waarde zet.
changed this line in version 5 of the diff
237 mmf_mm_bus_wr(c_mm_file_reg_stat_enable, 0, 1, tb_clk); 238 239 -- End Simulation 240 proc_common_wait_until_high(ext_clk, eth_done); 241 proc_common_wait_some_cycles(ext_clk, 100); 242 proc_common_stop_simulation(TRUE, ext_clk, eth_done, tb_end); 243 WAIT; 244 END PROCESS; 245 246 -- >> Verify proper DUT output using Ethernet packet statistics << 247 u_eth_statistics : ENTITY eth_lib.eth_statistics 248 GENERIC MAP ( 249 g_runtime_nof_packets => c_eth_check_nof_packets, 250 g_runtime_timeout => c_eth_runtime_timeout, 251 g_check_nof_valid => TRUE, 252 g_check_nof_valid_ref => c_eth_check_nof_packets changed this line in version 5 of the diff
added 78 commits
-
675a68ae...a1c07e76 - 76 commits from branch
master
- 6720ba72 - Merge branch 'master' into L2SDP-246
- 9658d4f0 - Added udp_offload testbench for fsub revision
-
675a68ae...a1c07e76 - 76 commits from branch
added 1 commit
- d0d0ac18 - Moved sst_offload tb to sdp_station fsub_revision
72 CONSTANT c_nof_block_per_sync : NATURAL := 80; -- long enough to stream out udp data 73 CONSTANT c_nof_clk_per_sync : NATURAL := c_nof_block_per_sync*c_sdp_N_fft; 74 CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync; 75 CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); 76 77 -- WG 78 CONSTANT c_full_scale_ampl : REAL := REAL(2**(14-1)-1); -- = full scale of WG 79 CONSTANT c_bsn_start_wg : NATURAL := 2; -- start WG at this BSN to instead of some BSN, to avoid mismatches in exact expected data values 80 CONSTANT c_ampl_sp_0 : NATURAL := 2**(c_sdp_W_adc-1)/2; -- in number of lsb 81 CONSTANT c_wg_subband_freq_unit : REAL := c_diag_wg_freq_unit/REAL(c_sdp_N_fft); -- subband freq = Fs/1024 = 200 MSps/1024 = 195312.5 Hz sinus 82 CONSTANT c_wg_freq_offset : REAL := 0.0/11.0; -- in freq_unit 83 CONSTANT c_subband_sp_0 : REAL := 102.0; -- Select subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz 84 CONSTANT c_wg_ampl_lsb : REAL := c_diag_wg_ampl_unit / c_full_scale_ampl; -- amplitude in number of LSbit resolution steps 85 86 -- MM 87 CONSTANT c_mm_file_reg_ppsh : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "PIO_PPS"; changed this line in version 7 of the diff
107 107 TyPE t_slv_64_subbands_arr IS ARRAY (INTEGER RANGE <>) OF t_slv_64_arr(0 TO c_sdp_N_sub); 108 108 109 109 -- MM 110 110 CONSTANT c_mm_file_reg_ppsh : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "PIO_PPS"; changed this line in version 7 of the diff
90 CONSTANT c_mm_file_reg_diag_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_WG"; 91 CONSTANT c_mm_file_reg_stat_enable : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_ENABLE"; 92 CONSTANT c_mm_file_reg_stat_hdr_info : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_HDR_INFO"; 93 94 -- Tb 95 SIGNAL tb_end : STD_LOGIC := '0'; 96 SIGNAL sim_done : STD_LOGIC := '0'; 97 SIGNAL tb_clk : STD_LOGIC := '0'; 98 SIGNAL rd_data : STD_LOGIC_VECTOR(c_32-1 DOWNTO 0) := (OTHERS => '0'); 99 SIGNAL eth_done : STD_LOGIC := '0'; 100 101 -- WG 102 SIGNAL current_bsn_wg : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0); 103 104 -- . 1GbE output 105 CONSTANT c_eth_check_nof_packets : NATURAL := 12; -- received packets in 1 sync period changed this line in version 7 of the diff
92 CONSTANT c_mm_file_reg_stat_hdr_info : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_HDR_INFO"; 93 94 -- Tb 95 SIGNAL tb_end : STD_LOGIC := '0'; 96 SIGNAL sim_done : STD_LOGIC := '0'; 97 SIGNAL tb_clk : STD_LOGIC := '0'; 98 SIGNAL rd_data : STD_LOGIC_VECTOR(c_32-1 DOWNTO 0) := (OTHERS => '0'); 99 SIGNAL eth_done : STD_LOGIC := '0'; 100 101 -- WG 102 SIGNAL current_bsn_wg : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0); 103 104 -- . 1GbE output 105 CONSTANT c_eth_check_nof_packets : NATURAL := 12; -- received packets in 1 sync period 106 CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * 1044; 107 CONSTANT c_eth_runtime_timeout : TIME := 100 ms; -- factor 2 margin changed this line in version 7 of the diff
91 CONSTANT c_mm_file_reg_stat_enable : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_ENABLE"; 92 CONSTANT c_mm_file_reg_stat_hdr_info : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_HDR_INFO"; 93 94 -- Tb 95 SIGNAL tb_end : STD_LOGIC := '0'; 96 SIGNAL sim_done : STD_LOGIC := '0'; 97 SIGNAL tb_clk : STD_LOGIC := '0'; 98 SIGNAL rd_data : STD_LOGIC_VECTOR(c_32-1 DOWNTO 0) := (OTHERS => '0'); 99 SIGNAL eth_done : STD_LOGIC := '0'; 100 101 -- WG 102 SIGNAL current_bsn_wg : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0); 103 104 -- . 1GbE output 105 CONSTANT c_eth_check_nof_packets : NATURAL := 12; -- received packets in 1 sync period 106 CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * 1044; changed this line in version 7 of the diff
213 -- MM slave accesses via file IO 214 ------------------------------------------------------------------------------ 215 tb_clk <= NOT tb_clk AFTER c_tb_clk_period/2; -- Testbench MM clock 216 217 p_mm_stimuli : PROCESS 218 BEGIN 219 -- Wait for DUT power up after reset 220 WAIT FOR 1 us; 221 222 ---------------------------------------------------------------------------- 223 -- Enable BS 224 ---------------------------------------------------------------------------- 225 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk); 226 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 0, tb_clk); -- Init BSN = 0 227 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync 228 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000001#, tb_clk); -- Enable BS at PPS changed this line in version 7 of the diff
203 204 -- Enable BS 204 205 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk); 205 206 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 1, tb_clk); -- Init BSN = 0 206 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_block_per_pps, tb_clk); -- nof_block_per_sync 207 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync 207 208 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000003#, tb_clk); -- Enable BS at PPS mentioned in commit 724a4f48