diff --git a/applications/lofar2/designs/lofar2_unb2b_beamformer/lofar2_unb2b_beamformer.fpga.yaml b/applications/lofar2/designs/lofar2_unb2b_beamformer/lofar2_unb2b_beamformer.fpga.yaml index ac11f10e2334107046099eb3f5fb8dbdd5e3d62d..3264e62e78680a807edda2eae41707b24bf67456 100644 --- a/applications/lofar2/designs/lofar2_unb2b_beamformer/lofar2_unb2b_beamformer.fpga.yaml +++ b/applications/lofar2/designs/lofar2_unb2b_beamformer/lofar2_unb2b_beamformer.fpga.yaml @@ -6,6 +6,7 @@ hdl_library_name: lofar2_unb2b_beamformer fpga_name: lofar2_unb2b_beamformer fpga_description: "FPGA design lofar2_unb2b_beamformer" parameters: + - { name: c_N_pol_bf, value: 2 } # NOTE: define c_N_pol_bf before c_N_pol, to avoid that c_N_pol_bf gets substituted by 2_bf - { name: c_N_pol, value: 2 } - { name: c_N_beamsets, value: 2 } - { name: c_N_sub, value: 512 } @@ -21,6 +22,7 @@ parameters: - { name: c_W_fir_coef, value: 16 } - { name: c_W_subband, value: 18 } - { name: c_P_pfb, value: c_S_pn / c_Q_fft } # = 6 + - { name: c_A_pn, value: c_S_pn / c_N_pol } # = 6 - { name: c_S_sub_bf, value: 488 } - { name: c_f_adc_MHz, value: 200 } - { name: c_W_sub_weight, value: 16 } @@ -197,7 +199,7 @@ peripherals: - REG_SDP_INFO - peripheral_name: reorder/reorder_col_wide - number_of_peripherals: c_N_beamsets + number_of_peripherals: c_N_beamsets # lofar2_unb2b_beamformer.vhd parameter_overrides: - { name: g_wb_factor, value: c_P_pfb } - { name: g_nof_ch_in, value: c_N_sub * c_Q_fft } @@ -205,3 +207,10 @@ peripherals: slave_port_names: - RAM_SS_SS_WIDE + - peripheral_name: sdp/sdp_bf_weights + number_of_peripherals: c_N_beamsets # lofar2_unb2b_beamformer.vhd + parameter_overrides: + - { name: g_nof_instances, value: c_N_pol_bf * c_A_pn } # A_pn = P_pfb = 6 + - { name: g_nof_gains, value: c_N_pol * c_S_sub_bf } # N_pol = Q_fft = 2 + slave_port_names: + - RAM_BF_WEIGHTS diff --git a/applications/lofar2/libraries/sdp/sdp.peripheral.yaml b/applications/lofar2/libraries/sdp/sdp.peripheral.yaml index a7ddc81ca91dcae8845c27f9a4023be784c9320f..8e609ca56ac9e9acc8bb74934afde78604c361cc 100644 --- a/applications/lofar2/libraries/sdp/sdp.peripheral.yaml +++ b/applications/lofar2/libraries/sdp/sdp.peripheral.yaml @@ -41,7 +41,7 @@ peripherals: # MM port for sdp_subband_equalizer.vhd - slave_name: RAM_EQUALIZER_GAINS slave_description: | - "The subband weigths per PN are stored in g_nof_instances = P_pfb = S_pn / Q_fft = 6 blocks of + "The subband weigths are stored in g_nof_instances = P_pfb = S_pn / Q_fft = 6 blocks of Q_fft * N_sub = 2 * 512 = 1024 complex coefficients as: (cint16)subband_weights[S_pn/Q_fft]_[Q_fft][N_sub] @@ -59,4 +59,43 @@ peripherals: number_of_fields: 1024 # = Q_fft * N_sub = 2 signal inputs * 512 subbands radix: complx + - peripheral_name: sdp_bf_weights # pi_sdp_bf_weights.py + peripheral_description: "Beamformer weights (= beamlet weights)." + parameters: + # Parameters of pi_sdp_bf_weights.py, fixed in sdp_bf_weights.vhd / sdp_pkg.vhd + - { name: g_nof_instances, value: 12 } # = N_pol_bf * P_pfb + - { name: g_nof_gains, value: 976 } # = Q_fft * S_sub_bf + slave_ports: + # MM port for sdp_beamformer_local.vhd / sdp_bf_weights.vhd / mms_dp_gain_serial_arr.vhd + - slave_name: RAM_BF_WEIGHTS + slave_description: | + "The beamlet weigths are stored in g_nof_instances = N_pol_bf * P_pfb = 2 * 6 = 12, where + P_pfb = S_pn / Q_fft = 6. Per instance there is a block of Q_fft * S_sub_bf = + 2 * 488 = 976 complex BF weights. The N_pol_bf = 2 represents the two beamformer + polarizations, to distinguish these from the N_pol = 2 antenna polarizations. The pairs + of Q_fft signal inputs that are multiplexed per block are mapped to the N_pol = 2 + polarizations of an antenna. + Therefore A_pn = P_pfb = 6 is the number dual polarization antennas per peripheral. + + (cint16)bf_weights[N_pol_bf][A_pn]_[N_pol][S_sub_bf] + + where N_pol_bf = 2, A_pn = 6 and N_pol = 2 and S_sub_bf = 488, defined in sdp_pkg.vhd. + + The BF weights can implement the full 2x2 Jones matrix for weighting and adding the + signal input polarizations [x, y] per dual polarization antenna. The polarization index + mapping is index 0 = X and index 1 = Y. The co-polarization BF weights (XX, YY) are set + when index of N_pol_bf and index of N_pol are the same. The cross-polarization BF + weights (XY, YX) are set when index of N_pol_bf and index of N_pol are different. If + no cross-polarization weighting is needed, then these weights can be kept 0." + slave_type: RAM + number_of_slaves: g_nof_instances + fields: + - - field_name: coef + field_description: | + "Complex weight per subband. Packed as imaginary in high part, real in low part + of width = N_complex * W_bf_weight = 2 * 16 = 32 bit." + width: 32 # = N_complex * W_bf_weight + address_offset: 0x0 + number_of_fields: g_nof_gains + radix: complx