From 29349b422c9d90ddebbf6c0e342bba9b2fdde7db Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 24 Aug 2023 11:52:55 +0200 Subject: [PATCH] Use g_beamlet = 137 --- .../tb_lofar2_unb2c_sdp_station_bf.vhd | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd index 1b819a9a7d..074281a7d2 100644 --- a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd +++ b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd @@ -107,10 +107,15 @@ -- * Use g_beamlet_scale = 2**10, for full scale WG and N_ant = 1, see [1] -- * Using g_beamlet = c_sdp_S_sub_bf-1 = 487 puts g_subband = 102 at the last -- beamlet in the beamset, so at index 974,975 of rx_beamlet_list_re/im. +-- * Try g_beamlet somewhere random in range 0:c_sdp_S_sub_bf-1 = 0:487 to +-- verify that the beamlet output reorder works at that position in the +-- beamlets block. E.g. use some prime number, like g_beamlet = 137. -- * Default beamlet 102 also contains g_subband = 102. On HW the BF weights -- are default 0, but in sim the BF weights in node_sdp_beamformer.vhd -- are default unit weights. Therefore also write the BF weight for default --- beamlet 102 to define it value, in case g_beamlet /= 102. +-- beamlet 102 to define it value, in case g_beamlet /= 102. In this tb +-- the BF weigth for beamlet = g_subband = 102 is set to 0, so that the +-- g_subband = 102 will only show up in g_beamlet. -- * A simulation only section in sdp_beamformer_output.vhd disturbs the BSN, -- to cause a merged payload error, so that sdp_source_info_payload_error -- can be verified here. @@ -165,7 +170,7 @@ entity tb_lofar2_unb2c_sdp_station_bf is g_sp_remnant_ampl : real := 0.1; -- WG normalized amplitude for remnant sp g_sp_remnant_phase : real := 15.0; -- WG phase in degrees for remnant sp g_subband : natural := 102; -- select g_subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz - g_beamlet : natural := c_sdp_S_sub_bf - 1; -- map g_subband to g_beamlet index in beamset in range(c_sdp_S_sub_bf = 488) + g_beamlet : natural := 137; -- map g_subband to g_beamlet index in beamset in range(c_sdp_S_sub_bf = 488) g_beamlet_scale : real := 1.0 / 2.0**9; -- g_beamlet output scale factor g_bf_x_gain : real := 0.7; -- g_beamlet X BF weight normalized gain for g_sp g_bf_y_gain : real := 0.6; -- g_beamlet Y BF weight normalized gain for g_sp @@ -1355,8 +1360,8 @@ begin rx_beamlet_valid <= '0'; -- Wait until start of a beamlet packet proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.sop); - -- c_sdp_cep_nof_beamlets_per_longword = 2 dual pol beamlets (= XY, XY) per 64b data word - for I in 0 to (c_sdp_cep_nof_beamlets_per_packet / c_sdp_cep_nof_beamlets_per_longword) - 1 loop + -- c_sdp_nof_beamlets_per_longword = 2 dual pol beamlets (= XY, XY) per 64b data word + for I in 0 to (c_sdp_cep_nof_beamlets_per_packet / c_sdp_nof_beamlets_per_longword) - 1 loop proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.valid); rx_beamlet_valid <= '1'; -- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window @@ -1383,7 +1388,7 @@ begin -- contains no WAIT statement. wait until rising_edge(ext_clk); rx_beamlet_valid <= '0'; - rx_beamlet_cnt <= (rx_beamlet_cnt + c_sdp_cep_nof_beamlets_per_longword) mod c_sdp_cep_nof_beamlets_per_block; -- 4 blocks/packet + rx_beamlet_cnt <= (rx_beamlet_cnt + c_sdp_nof_beamlets_per_longword) mod c_sdp_cep_nof_beamlets_per_block; -- 4 blocks/packet end loop; end process; -- GitLab