Skip to content
Snippets Groups Projects
Commit 5f9e632d authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Processed review comments

parent af5abb0d
No related branches found
No related tags found
2 merge requests!100Removed text for XSub that is now written in Confluence Subband correlator...,!83Resolve L2SDP-246
...@@ -107,7 +107,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub IS ...@@ -107,7 +107,6 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub IS
TyPE t_slv_64_subbands_arr IS ARRAY (INTEGER RANGE <>) OF t_slv_64_arr(0 TO c_sdp_N_sub); TyPE t_slv_64_subbands_arr IS ARRAY (INTEGER RANGE <>) OF t_slv_64_arr(0 TO c_sdp_N_sub);
-- MM -- MM
CONSTANT c_mm_file_reg_ppsh : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "PIO_PPS";
CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2"; CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2";
CONSTANT c_mm_file_reg_bsn_scheduler_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SCHEDULER"; CONSTANT c_mm_file_reg_bsn_scheduler_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SCHEDULER";
CONSTANT c_mm_file_reg_diag_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_WG"; CONSTANT c_mm_file_reg_diag_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_WG";
...@@ -250,12 +249,12 @@ BEGIN ...@@ -250,12 +249,12 @@ BEGIN
proc_common_wait_until_hi_lo(ext_clk, ext_pps); proc_common_wait_until_hi_lo(ext_clk, ext_pps);
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- Enable BS -- Enable BSN
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk); mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 0, tb_clk); -- Init BSN = 0 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 0, tb_clk); -- Init BSN = 0
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000003#, tb_clk); -- Enable BS at PPS mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000003#, tb_clk); -- Enable BSN at PPS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- Enable WG -- Enable WG
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
-- --
-- 1) Enable BSN source and enable UDP offload -- 1) Enable BSN source and enable UDP offload
-- --
-- 2) Verify ethernet statistics using eth_statistics -- 2) Verify ethernet statistics using eth_statistics, it checks the number of
-- received packets and the total number of valid data. The content of the packets is not verified.
-- --
-- Usage: -- Usage:
-- > as 7 # default -- > as 7 # default
...@@ -74,22 +75,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS ...@@ -74,22 +75,9 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS
CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync; CONSTANT c_pps_period : NATURAL := c_nof_clk_per_sync;
CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync); CONSTANT c_wpfb_sim : t_wpfb := func_wpfb_set_nof_block_per_sync(c_sdp_wpfb_subbands, c_nof_block_per_sync);
-- WG
CONSTANT c_full_scale_ampl : REAL := REAL(2**(14-1)-1); -- = full scale of WG
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
CONSTANT c_ampl_sp_0 : NATURAL := 2**(c_sdp_W_adc-1)/2; -- in number of lsb
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
CONSTANT c_wg_freq_offset : REAL := 0.0/11.0; -- in freq_unit
CONSTANT c_subband_sp_0 : REAL := 102.0; -- Select subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz
CONSTANT c_wg_ampl_lsb : REAL := c_diag_wg_ampl_unit / c_full_scale_ampl; -- amplitude in number of LSbit resolution steps
-- MM -- MM
CONSTANT c_mm_file_reg_ppsh : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "PIO_PPS";
CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2"; CONSTANT c_mm_file_reg_bsn_source_v2 : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SOURCE_V2";
CONSTANT c_mm_file_reg_bsn_scheduler_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_BSN_SCHEDULER";
CONSTANT c_mm_file_reg_diag_wg : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_WG";
CONSTANT c_mm_file_reg_stat_enable : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_ENABLE"; CONSTANT c_mm_file_reg_stat_enable : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_ENABLE";
CONSTANT c_mm_file_reg_stat_hdr_info : STRING := mmf_unb_file_prefix(c_unb_nr, c_node_nr) & "REG_STAT_HDR_INFO";
-- Tb -- Tb
SIGNAL tb_end : STD_LOGIC := '0'; SIGNAL tb_end : STD_LOGIC := '0';
...@@ -98,13 +86,13 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS ...@@ -98,13 +86,13 @@ ARCHITECTURE tb OF tb_lofar2_unb2b_sdp_station_fsub_sst_offload IS
SIGNAL rd_data : STD_LOGIC_VECTOR(c_32-1 DOWNTO 0) := (OTHERS => '0'); SIGNAL rd_data : STD_LOGIC_VECTOR(c_32-1 DOWNTO 0) := (OTHERS => '0');
SIGNAL eth_done : STD_LOGIC := '0'; SIGNAL eth_done : STD_LOGIC := '0';
-- WG
SIGNAL current_bsn_wg : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0);
-- . 1GbE output -- . 1GbE output
CONSTANT c_eth_check_nof_packets : NATURAL := 12; -- received packets in 1 sync period CONSTANT c_eth_check_nof_packets : NATURAL := c_sdp_S_pn; -- received packets in 1 sync period
CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * 1044; CONSTANT c_eth_header_size : NATURAL := 19; -- words
CONSTANT c_eth_runtime_timeout : TIME := 100 ms; -- factor 2 margin CONSTANT c_eth_crc_size : NATURAL := 1; -- word
CONSTANT c_eth_packet_size : NATURAL := c_eth_header_size + c_eth_crc_size + c_sdp_N_sub * (c_sdp_W_statistic / c_word_w); -- 20 + 512 * 2 = 1044
CONSTANT c_eth_check_nof_valid : NATURAL := c_eth_check_nof_packets * c_eth_packet_size;
CONSTANT c_eth_runtime_timeout : TIME := 2 * c_nof_clk_per_sync * c_ext_clk_period; -- eth statistics should be done at the second sync interval
-- DUT -- DUT
SIGNAL ext_clk : STD_LOGIC := '0'; SIGNAL ext_clk : STD_LOGIC := '0';
...@@ -168,8 +156,7 @@ BEGIN ...@@ -168,8 +156,7 @@ BEGIN
g_sim_unb_nr => c_unb_nr, g_sim_unb_nr => c_unb_nr,
g_sim_node_nr => c_node_nr, g_sim_node_nr => c_node_nr,
g_wpfb => c_wpfb_sim, g_wpfb => c_wpfb_sim,
g_bsn_nof_clk_per_sync => c_nof_clk_per_sync, g_bsn_nof_clk_per_sync => c_nof_clk_per_sync
g_scope_selected_subband => NATURAL(c_subband_sp_0)
) )
PORT MAP ( PORT MAP (
-- GENERAL -- GENERAL
...@@ -220,12 +207,12 @@ BEGIN ...@@ -220,12 +207,12 @@ BEGIN
WAIT FOR 1 us; WAIT FOR 1 us;
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- Enable BS -- Enable BSN
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk); mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 3, 0, tb_clk);
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 0, tb_clk); -- Init BSN = 0 mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 2, 0, tb_clk); -- Init BSN = 0
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 1, c_nof_clk_per_sync, tb_clk); -- nof_block_per_sync
mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000001#, tb_clk); -- Enable BS at PPS mmf_mm_bus_wr(c_mm_file_reg_bsn_source_v2, 0, 16#00000001#, tb_clk); -- Enable BSN immediately
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- Offload enable -- Offload enable
......
...@@ -93,6 +93,7 @@ PACKAGE sdp_pkg is ...@@ -93,6 +93,7 @@ PACKAGE sdp_pkg is
CONSTANT c_sdp_W_bf_weight : NATURAL := 16; CONSTANT c_sdp_W_bf_weight : NATURAL := 16;
CONSTANT c_sdp_W_fir_coef : NATURAL := 16; CONSTANT c_sdp_W_fir_coef : NATURAL := 16;
CONSTANT c_sdp_W_gn_id : NATURAL := 5; CONSTANT c_sdp_W_gn_id : NATURAL := 5;
CONSTANT c_sdp_W_statistic : NATURAL := 64;
CONSTANT c_sdp_W_sub_magnitude : NATURAL := 2; CONSTANT c_sdp_W_sub_magnitude : NATURAL := 2;
CONSTANT c_sdp_W_sub_weight : NATURAL := 16; CONSTANT c_sdp_W_sub_weight : NATURAL := 16;
CONSTANT c_sdp_W_subband : NATURAL := 18; CONSTANT c_sdp_W_subband : NATURAL := 18;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment