From ee8603a7e7c651cafd6cb6368e6976e31d49f172 Mon Sep 17 00:00:00 2001 From: Reinier van der Walle <walle@astron.nl> Date: Wed, 15 Mar 2023 10:59:20 +0100 Subject: [PATCH] Added dp_requantizewq --- .../vhdl/node_sdp_oversampled_filterbank.vhd | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_oversampled_filterbank.vhd b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_oversampled_filterbank.vhd index 7a7406d1ca..a19b0e20e7 100644 --- a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_oversampled_filterbank.vhd +++ b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_oversampled_filterbank.vhd @@ -118,6 +118,7 @@ ARCHITECTURE str OF node_sdp_oversampled_filterbank IS CONSTANT c_si_pipeline : NATURAL := 1; CONSTANT c_complex_mult_pipeline : NATURAL := 3; CONSTANT c_complex_pfb_pipeline : NATURAL := 2; + CONSTANT c_pipeline_remove_lsb : NATURAL := 1; -- to easy timing closure -- Use WG as local oscillator, buf contains 16b sin and 16b cos -- . c_sdp_W_local_oscillator = 16b @@ -195,6 +196,7 @@ ARCHITECTURE str OF node_sdp_oversampled_filterbank IS SIGNAL subband_equalizer_quant_sosi_arr : t_dp_sosi_arr(c_sdp_R_os * c_sdp_P_pfb-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL subband_equalizer_raw_sosi_arr : t_dp_sosi_arr(c_sdp_R_os * c_sdp_P_pfb-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL dp_selector_out_sosi_arr : t_dp_sosi_arr(c_sdp_R_os * c_sdp_P_pfb-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); + SIGNAL dp_selector_pipe_sosi_arr : t_dp_sosi_arr(c_sdp_R_os * c_sdp_P_pfb-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL scope_equalizer_in_sosi_arr : t_dp_sosi_integer_arr(c_sdp_R_os * c_sdp_S_pn-1 DOWNTO 0); SIGNAL scope_equalizer_out_sosi_arr : t_dp_sosi_integer_arr(c_sdp_R_os * c_sdp_S_pn-1 DOWNTO 0); @@ -578,13 +580,36 @@ BEGIN fsub_quant_sosi_arr <= subband_equalizer_quant_sosi_arr; fsub_raw_sosi_arr <= subband_equalizer_raw_sosi_arr; + + --------------------------------------------------------------- + -- DP REQUANTIZE for SST + --------------------------------------------------------------- + gen_dp_requantize : FOR I IN 0 TO c_sdp_R_os * c_sdp_P_pfb-1 GENERATE + u_dp_requantize : ENTITY dp_lib.dp_requantize + GENERIC MAP ( + g_complex => TRUE, + g_lsb_w => c_subband_raw_fraction_w, + g_msb_clip => FALSE, + g_pipeline_remove_lsb => c_pipeline_remove_lsb, + g_in_dat_w => c_subband_raw_dat_w, + g_out_dat_w => c_sdp_W_subband + ) + PORT MAP ( + rst => dp_rst, + clk => dp_clk, + + snk_in => subband_equalizer_in_sosi_arr(I), + src_out => dp_selector_pipe_sosi_arr(I) + ); + END GENERATE; + --------------------------------------------------------------- -- DP SELECTOR for SST input --------------------------------------------------------------- u_dp_selector_arr : ENTITY dp_lib.dp_selector_arr GENERIC MAP ( g_nof_arr => c_sdp_R_os * c_sdp_P_pfb, - g_pipeline => c_sdp_subband_equalizer_latency + g_pipeline => c_sdp_subband_equalizer_latency - c_pipeline_remove_lsb ) PORT MAP ( mm_rst => mm_rst, @@ -595,7 +620,7 @@ BEGIN reg_selector_mosi => reg_selector_mosi, reg_selector_miso => reg_selector_miso, - pipe_sosi_arr => subband_equalizer_in_sosi_arr, -- Should be quantized? + pipe_sosi_arr => dp_selector_pipe_sosi_arr, ref_sosi_arr => subband_equalizer_quant_sosi_arr, out_sosi_arr => dp_selector_out_sosi_arr, -- GitLab