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 9fb3e69c10091de3095e880c8d86d45364df93a5..3484a89a9619badd82f33de1438c861369157974 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 @@ -172,9 +172,12 @@ peripherals: - peripheral_name: filter/fil_ppf_w parameter_overrides: - - { name: g_nof_taps, value: c_N_taps } - - { name: g_nof_bands, value: c_N_fft } - - { name: g_coef_dat_w, value: c_W_fir_coef } + - { name: g_fil_ppf.wb_factor, value: 1 } # process at sample rate + - { name: g_fil_ppf.nof_chan, value: 0 } # process at sample rate + - { name: g_fil_ppf.nof_bands, value: c_N_fft } + - { name: g_fil_ppf.nof_taps, value: c_N_taps } + - { name: g_fil_ppf.nof_streams, value: 1 } + - { name: g_fil_ppf.coef_dat_w, value: c_W_fir_coef } mm_port_names: - RAM_FIL_COEFS diff --git a/applications/lofar2/designs/lofar2_unb2b_filterbank/lofar2_unb2b_filterbank.fpga.yaml b/applications/lofar2/designs/lofar2_unb2b_filterbank/lofar2_unb2b_filterbank.fpga.yaml index 8913b3d218334598cac6e04fa4428ffba9c867ed..0ec8ce1844442c27022f8f314fafaf9126f49cfe 100644 --- a/applications/lofar2/designs/lofar2_unb2b_filterbank/lofar2_unb2b_filterbank.fpga.yaml +++ b/applications/lofar2/designs/lofar2_unb2b_filterbank/lofar2_unb2b_filterbank.fpga.yaml @@ -145,13 +145,15 @@ peripherals: - peripheral_name: filter/fil_ppf_w parameter_overrides: - - { name: g_wb_factor, value: 1 } - - { name: g_nof_taps, value: 16 } # = N_taps - - { name: g_nof_bands, value: 1024 } # = N_fft - - { name: g_coef_dat_w, value: 16 } # = W_fir_coef + - { name: g_fil_ppf.wb_factor, value: 1 } # process at sample rate + - { name: g_fil_ppf.nof_chan, value: 0 } # process at sample rate + - { name: g_fil_ppf.nof_bands, value: 1024 } # = N_fft + - { name: g_fil_ppf.nof_taps, value: 16 } # = N_taps + - { name: g_fil_ppf.nof_streams, value: 1 } + - { name: g_fil_ppf.coef_dat_w, value: 16 } # = W_fir_coef mm_port_names: - RAM_FIL_COEFS - + - peripheral_name: sdp/sdp_subband_equalizer mm_port_names: - RAM_EQUALIZER_GAINS diff --git a/libraries/dsp/filter/filter.peripheral.yaml b/libraries/dsp/filter/filter.peripheral.yaml index 58e11c6ffe70779d39724e90474a9752e39ff743..22612d7ff683fcdb124225da2ade001dc1f1e0ef 100644 --- a/libraries/dsp/filter/filter.peripheral.yaml +++ b/libraries/dsp/filter/filter.peripheral.yaml @@ -8,37 +8,46 @@ hdl_library_description: "Poly-phase filter (PPF) for a Wideband Poly-phase filt peripherals: - peripheral_name: fil_ppf_w # pi_fil_ppf_w.py peripheral_description: | - "PPF FIR filter for wideband data streams, all data streams use the same FIR coefficients. - The PPF has g_nof_bands phases, where g_nof_bands is equal to the size of the FFT in the - PFB. The PPF has g_nof_taps FIR taps per phase. Hence the total number of FIR coefficients - is g_nof_taps * g_nof_bands. - The PPF can process a data stream that is clocked at a wideband factor g_wb_factor higher - data rate, by running g_wb_factor parts in parallel. + "PPF FIR filter for wideband data streams, all g_fil_ppf.nof_streams use the same FIR + coefficients. The PPF has g_fil_ppf.nof_bands poly phases, where g_fil_ppf.nof_bands is + equal to the size (number of points) of the FFT in the PFB. The PPF has + g_fil_ppf.nof_taps FIR taps per poly phase. Hence the total number of FIR coefficients + is g_fil_ppf.nof_taps * g_fil_ppf.nof_bands. + The PPF can process a data stream that is clocked at a wideband factor g_fil_ppf.wb_factor + higher data rate, by running g_fil_ppf.wb_factor parts in parallel. The + g_fil_ppf.wb_factor >= 1 and a power of 2. + The PPF can process 2**g_fil_ppf.nof_chan channels that are multiplexed in time in + a data stream when g_fil_ppf.nof_chan > 0. Therefore typically when g_fil_ppf.nof_chan > 0 + then g_fil_ppf.wb_factor = 1, and when g_fil_ppf.wb_factor > 1 then g_fil_ppf.nof_chan = 0, + because time multiplexing is only useful when the processing clock rate is faster then the + data stream rate. The FIR coefficients are real values." parameters: # Parameters of fil_ppf_wide.vhd - - { name: g_wb_factor, value: 1 } - - { name: g_nof_taps, value: 8 } - - { name: g_nof_bands, value: 256 } - - { name: g_coef_dat_w, value: 16 } + - { name: g_fil_ppf.wb_factor, value: 1 } + - { name: g_fil_ppf.nof_chan, value: 0 } + - { name: g_fil_ppf.nof_bands, value: 256 } + - { name: g_fil_ppf.nof_taps, value: 8 } + - { name: g_fil_ppf.nof_streams, value: 1 } + - { name: g_fil_ppf.coef_dat_w, value: 16 } mm_ports: # MM port for fil_ppf_wide.vhd / fil_ppf_single.vhd - mm_port_name: RAM_FIL_COEFS mm_port_description: | - "The FIR filter coefficients are stored in blocks of g_nof_bands/g_wb_factor real - coefficients: + "The FIR filter coefficients are stored in blocks of g_fil_ppf.nof_bands/g_fil_ppf.wb_factor + real coefficients: - (int16)coefs[g_wb_factor][g_nof_taps][g_nof_bands/g_wb_factor] + (int16)coefs[g_fil_ppf.wb_factor][g_fil_ppf.nof_taps][g_fil_ppf.nof_bands/g_fil_ppf.wb_factor] - For g_wb_factor = 1 this reduces to g_nof_taps blocks of g_nof_bands/g_wb_factor - coefficients: + For g_fil_ppf.wb_factor = 1 this reduces to g_fil_ppf.nof_taps blocks of + g_fil_ppf.nof_bands/g_fil_ppf.wb_factor coefficients: - (int16)coefs[g_nof_taps][g_nof_bands]" + (int16)coefs[g_fil_ppf.nof_taps][g_fil_ppf.nof_bands]" mm_port_type: RAM - number_of_mm_ports: g_wb_factor * g_nof_taps + number_of_mm_ports: g_fil_ppf.wb_factor * g_fil_ppf.nof_taps fields: - - field_name: coef field_description: "Real FIR filter coefficient" - mm_width: g_coef_dat_w + mm_width: g_fil_ppf.coef_dat_w address_offset: 0x0 - number_of_fields: g_nof_bands / g_wb_factor + number_of_fields: g_fil_ppf.nof_bands / g_fil_ppf.wb_factor