diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd index 9260356e07c5ae4dc0ae0cb67188bfc601653dc5..30926a34d18088538bf898dd3cdca7eb570475b6 100644 --- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd +++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd @@ -46,6 +46,7 @@ ENTITY sdp_station IS g_sim_sdp : t_sdp_sim := c_sdp_sim; -- Used when g_sim = TRUE, otherwise use HW defaults g_sim_sync_timeout : NATURAL := 1024; g_wpfb : t_wpfb := c_sdp_wpfb_subbands; + g_wpfb_complex : t_wpfb := c_sdp_wpfb_complex_subbands; g_bsn_nof_clk_per_sync : NATURAL := c_sdp_N_clk_per_sync; -- Default 200M, overide for short simulation g_scope_selected_subband : NATURAL := 0; g_no_jesd : BOOLEAN := FALSE; @@ -421,6 +422,8 @@ ARCHITECTURE str OF sdp_station IS CONSTANT c_ring_1_if_offset : NATURAL := 2; -- RING_1 signals are indexed at c_nof_if * I + 2. CONSTANT c_ring_nof_mac : NATURAL := 12; -- Using 9 out of 12 (this is NOT optimized away during synthesis), must match one of the MAC IP variations, e.g. 1, 3, 4, 12, 24, 48 + TYPE t_dp_sosi_2arr_pfb IS ARRAY (INTEGER RANGE <>) OF t_dp_sosi_arr(c_sdp_P_pfb - 1 DOWNTO 0); + SIGNAL gn_index : NATURAL := 0; -- range 0:31 (c_sdp_W_gn_id = 5) SIGNAL this_rn : STD_LOGIC_VECTOR(c_byte_w-1 DOWNTO 0); @@ -506,8 +509,9 @@ ARCHITECTURE str OF sdp_station IS ---------------------------------------------- SIGNAL ait_sosi_arr : t_dp_sosi_arr(c_sdp_S_pn-1 DOWNTO 0); - SIGNAL pfb_sosi_arr : t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0); -- raw subbands SIGNAL fsub_sosi_arr : t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0); -- weighted subbands + SIGNAL fsub_oversampled_sosi_arr : t_dp_sosi_arr(c_sdp_V_oversample * c_sdp_P_pfb-1 DOWNTO 0); + SIGNAL bf_sosi_2arr : t_dp_sosi_2arr_pfb(c_sdp_N_beamsets-1 DOWNTO 0); SIGNAL bs_sosi : t_dp_sosi; SIGNAL xst_from_ri_sosi : t_dp_sosi := c_dp_sosi_rst; @@ -676,53 +680,116 @@ BEGIN -- node_sdp_filterbank (FSUB) ----------------------------------------------------------------------------- gen_use_fsub : IF g_use_fsub GENERATE - u_fsub : ENTITY work.node_sdp_filterbank - GENERIC MAP( - g_sim => g_sim, - g_sim_sdp => g_sim_sdp, - g_wpfb => g_wpfb, - g_scope_selected_subband => g_scope_selected_subband - ) - PORT MAP( - dp_clk => dp_clk, - dp_rst => dp_rst, - - in_sosi_arr => ait_sosi_arr, - pfb_sosi_arr => pfb_sosi_arr, - fsub_sosi_arr => fsub_sosi_arr, - dp_bsn_source_restart => dp_bsn_source_restart, - - sst_udp_sosi => udp_tx_sosi_arr(0), - sst_udp_siso => udp_tx_siso_arr(0), - - mm_rst => mm_rst, - mm_clk => mm_clk, - - reg_si_mosi => reg_si_copi, - reg_si_miso => reg_si_cipo, - ram_st_sst_mosi => ram_st_sst_copi, - ram_st_sst_miso => ram_st_sst_cipo, - ram_fil_coefs_mosi => ram_fil_coefs_copi, - ram_fil_coefs_miso => ram_fil_coefs_cipo, - ram_gains_mosi => ram_equalizer_gains_copi, - ram_gains_miso => ram_equalizer_gains_cipo, - reg_selector_mosi => reg_dp_selector_copi, - reg_selector_miso => reg_dp_selector_cipo, - - reg_enable_mosi => reg_stat_enable_sst_copi, - reg_enable_miso => reg_stat_enable_sst_cipo, - reg_hdr_dat_mosi => reg_stat_hdr_dat_sst_copi, - reg_hdr_dat_miso => reg_stat_hdr_dat_sst_cipo, + gen_use_no_oversample : IF NOT g_use_oversample GENERATE + u_fsub : ENTITY work.node_sdp_filterbank + GENERIC MAP( + g_sim => g_sim, + g_sim_sdp => g_sim_sdp, + g_wpfb => g_wpfb, + g_scope_selected_subband => g_scope_selected_subband + ) + PORT MAP( + dp_clk => dp_clk, + dp_rst => dp_rst, + + in_sosi_arr => ait_sosi_arr, + fsub_sosi_arr => fsub_sosi_arr, + dp_bsn_source_restart => dp_bsn_source_restart, + + sst_udp_sosi => udp_tx_sosi_arr(0), + sst_udp_siso => udp_tx_siso_arr(0), + + mm_rst => mm_rst, + mm_clk => mm_clk, + + reg_si_mosi => reg_si_copi, + reg_si_miso => reg_si_cipo, + ram_st_sst_mosi => ram_st_sst_copi, + ram_st_sst_miso => ram_st_sst_cipo, + ram_fil_coefs_mosi => ram_fil_coefs_copi, + ram_fil_coefs_miso => ram_fil_coefs_cipo, + ram_gains_mosi => ram_equalizer_gains_copi, + ram_gains_miso => ram_equalizer_gains_cipo, + reg_selector_mosi => reg_dp_selector_copi, + reg_selector_miso => reg_dp_selector_cipo, + + reg_enable_mosi => reg_stat_enable_sst_copi, + reg_enable_miso => reg_stat_enable_sst_cipo, + reg_hdr_dat_mosi => reg_stat_hdr_dat_sst_copi, + reg_hdr_dat_miso => reg_stat_hdr_dat_sst_cipo, + + reg_bsn_monitor_v2_sst_offload_copi => reg_bsn_monitor_v2_sst_offload_copi, + reg_bsn_monitor_v2_sst_offload_cipo => reg_bsn_monitor_v2_sst_offload_cipo, + + sdp_info => sdp_info, + gn_id => gn_id, + eth_src_mac => stat_eth_src_mac, + ip_src_addr => stat_ip_src_addr, + udp_src_port => sst_udp_src_port + ); + + gen_bf_sosi : FOR I IN 0 TO c_sdp_N_beamsets-1 GENERATE + bf_sosi_2arr(I) <= fsub_sosi_arr; + END GENERATE; + END GENERATE; + + ----------------------------------------------------------------------------- + -- node_sdp_oversampled_filterbank + ----------------------------------------------------------------------------- + gen_use_oversample : IF g_use_oversample GENERATE + u_fsub : ENTITY work.node_sdp_oversampled_filterbank + GENERIC MAP( + g_sim => g_sim, + g_sim_sdp => g_sim_sdp, + g_wpfb => g_wpfb, + g_wpfb_complex => g_wpfb_complex, + g_scope_selected_subband => g_scope_selected_subband + ) + PORT MAP( + dp_clk => dp_clk, + dp_rst => dp_rst, + + in_sosi_arr => ait_sosi_arr, + fsub_sosi_arr => fsub_oversampled_sosi_arr, + dp_bsn_source_restart => dp_bsn_source_restart, + + sst_udp_sosi => udp_tx_sosi_arr(0), + sst_udp_siso => udp_tx_siso_arr(0), + + mm_rst => mm_rst, + mm_clk => mm_clk, + + reg_si_mosi => reg_si_copi, + reg_si_miso => reg_si_cipo, + ram_st_sst_mosi => ram_st_sst_copi, + ram_st_sst_miso => ram_st_sst_cipo, + ram_fil_coefs_mosi => ram_fil_coefs_copi, + ram_fil_coefs_miso => ram_fil_coefs_cipo, + ram_gains_mosi => ram_equalizer_gains_copi, + ram_gains_miso => ram_equalizer_gains_cipo, + reg_selector_mosi => reg_dp_selector_copi, + reg_selector_miso => reg_dp_selector_cipo, + + reg_enable_mosi => reg_stat_enable_sst_copi, + reg_enable_miso => reg_stat_enable_sst_cipo, + reg_hdr_dat_mosi => reg_stat_hdr_dat_sst_copi, + reg_hdr_dat_miso => reg_stat_hdr_dat_sst_cipo, - reg_bsn_monitor_v2_sst_offload_copi => reg_bsn_monitor_v2_sst_offload_copi, - reg_bsn_monitor_v2_sst_offload_cipo => reg_bsn_monitor_v2_sst_offload_cipo, + reg_bsn_monitor_v2_sst_offload_copi => reg_bsn_monitor_v2_sst_offload_copi, + reg_bsn_monitor_v2_sst_offload_cipo => reg_bsn_monitor_v2_sst_offload_cipo, - sdp_info => sdp_info, - gn_id => gn_id, - eth_src_mac => stat_eth_src_mac, - ip_src_addr => stat_ip_src_addr, - udp_src_port => sst_udp_src_port - ); + sdp_info => sdp_info, + gn_id => gn_id, + eth_src_mac => stat_eth_src_mac, + ip_src_addr => stat_ip_src_addr, + udp_src_port => sst_udp_src_port + ); + + fsub_sosi_arr <= fsub_oversampled_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0); -- Lower part contains normal subbands, higher part contains shifted subbands. + + bf_sosi_2arr(0) <= fsub_sosi_arr; + bf_sosi_2arr(1) <= fsub_oversampled_sosi_arr(2 * c_sdp_P_pfb-1 DOWNTO c_sdp_P_pfb); -- Use second beamset for oversampled subbands + END GENERATE; END GENERATE; @@ -803,7 +870,7 @@ BEGIN dp_clk => dp_clk, dp_rst => dp_rst, - in_sosi_arr => fsub_sosi_arr, + in_sosi_arr => bf_sosi_2arr(beamset_id), from_ri_sosi => bf_from_ri_sosi_arr(beamset_id), to_ri_sosi => bf_to_ri_sosi_arr(beamset_id), bf_udp_sosi => bf_udp_sosi_arr(beamset_id),