diff --git a/libraries/dsp/fft/src/vhdl/fft_r2_par.vhd b/libraries/dsp/fft/src/vhdl/fft_r2_par.vhd index c9089c8de041e6d5786deecbbceaa535d8516041..02bf10f3cdc378575e093c4651fad58d5891f3ff 100644 --- a/libraries/dsp/fft/src/vhdl/fft_r2_par.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_r2_par.vhd @@ -125,30 +125,37 @@ architecture str of fft_r2_par is constant c_pipeline_add_sub : natural := 1; constant c_pipeline_remove_lsb : natural := 1; - constant c_sepa_round : boolean := true; -- must be true, because separate should round the 1 bit growth - + constant c_nof_stages : natural := ceil_log2(g_fft.nof_points); constant c_nof_bf_per_stage : natural := g_fft.nof_points/2; constant c_in_scale_w_tester : integer := g_fft.stage_dat_w - g_fft.in_dat_w - sel_a_b(g_fft.guard_enable, g_fft.guard_w, 0); constant c_in_scale_w : natural := sel_a_b(c_in_scale_w_tester > 0, c_in_scale_w_tester, 0); -- Only scale when in_dat_w is not too big. constant c_out_scale_w : integer := g_fft.stage_dat_w - g_fft.out_dat_w - g_fft.out_gain_w; -- Estimate number of LSBs to throw away when > 0 or insert when < 0 + + constant c_sepa_growth_w : natural := sel_a_b(g_fft.use_separate, 1, 0); -- add one bit for add sub growth in separate + constant c_raw_dat_w : natural := g_fft.stage_dat_w + c_sepa_growth_w; type t_stage_dat_arr is array (integer range <>) of std_logic_vector(g_fft.stage_dat_w-1 downto 0); - type t_stage_sum_arr is array (integer range <>) of std_logic_vector(g_fft.stage_dat_w downto 0); + type t_stage_raw_arr is array (integer range <>) of std_logic_vector(c_raw_dat_w-1 downto 0); type t_data_arr2 is array(c_nof_stages downto 0) of t_stage_dat_arr(g_fft.nof_points-1 downto 0); type t_val_arr is array(c_nof_stages downto 0) of std_logic_vector( g_fft.nof_points-1 downto 0); signal data_re : t_data_arr2; signal data_im : t_data_arr2; signal data_val : t_val_arr; + signal int_re_arr : t_stage_dat_arr(g_fft.nof_points-1 downto 0); signal int_im_arr : t_stage_dat_arr(g_fft.nof_points-1 downto 0); - signal fft_re_arr : t_stage_dat_arr(g_fft.nof_points-1 downto 0); - signal fft_im_arr : t_stage_dat_arr(g_fft.nof_points-1 downto 0); - signal add_arr : t_stage_sum_arr(g_fft.nof_points-1 downto 0); - signal sub_arr : t_stage_sum_arr(g_fft.nof_points-1 downto 0); signal int_val : std_logic; + signal int_a_dc : std_logic_vector(g_fft.stage_dat_w-1 downto 0); + signal int_b_dc : std_logic_vector(g_fft.stage_dat_w-1 downto 0); + + signal add_arr : t_stage_raw_arr(g_fft.nof_points-1 downto 0); + signal sub_arr : t_stage_raw_arr(g_fft.nof_points-1 downto 0); + + signal fft_re_arr : t_stage_raw_arr(g_fft.nof_points-1 downto 0); + signal fft_im_arr : t_stage_raw_arr(g_fft.nof_points-1 downto 0); signal fft_val : std_logic; begin @@ -235,7 +242,7 @@ begin g_pipeline_input => 0, g_pipeline_output => c_pipeline_add_sub, g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w+1 + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -251,7 +258,7 @@ begin g_pipeline_input => 0, g_pipeline_output => c_pipeline_add_sub, g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w+1 + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -267,7 +274,7 @@ begin g_pipeline_input => 0, g_pipeline_output => c_pipeline_add_sub, g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w+1 + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -283,7 +290,7 @@ begin g_pipeline_input => 0, g_pipeline_output => c_pipeline_add_sub, g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w+1 + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -292,84 +299,14 @@ begin result => sub_arr(2*I+1) ); - gen_sepa_truncate : IF c_sepa_round=false GENERATE - -- truncate the one LSbit - fft_re_arr(2*I ) <= add_arr(2*I )(g_fft.stage_dat_w DOWNTO 1); -- A real - fft_re_arr(2*I+1) <= add_arr(2*I+1)(g_fft.stage_dat_w DOWNTO 1); -- B real - fft_im_arr(2*I ) <= sub_arr(2*I )(g_fft.stage_dat_w DOWNTO 1); -- A imag - fft_im_arr(2*I+1) <= sub_arr(2*I+1)(g_fft.stage_dat_w DOWNTO 1); -- B imag - end generate; - - gen_sepa_round : IF c_sepa_round=true GENERATE - -- round the one LSbit - round_re_a : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => g_fft.stage_dat_w+1, - g_out_dat_w => g_fft.stage_dat_w - ) - PORT MAP ( - clk => clk, - in_dat => add_arr(2*I), - out_dat => fft_re_arr(2*I) - ); - - round_re_b : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => g_fft.stage_dat_w+1, - g_out_dat_w => g_fft.stage_dat_w - ) - PORT MAP ( - clk => clk, - in_dat => add_arr(2*I+1), - out_dat => fft_re_arr(2*I+1) - ); - - round_im_a : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => g_fft.stage_dat_w+1, - g_out_dat_w => g_fft.stage_dat_w - ) - PORT MAP ( - clk => clk, - in_dat => sub_arr(2*I), - out_dat => fft_im_arr(2*I) - ); - - round_im_b : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => g_fft.stage_dat_w+1, - g_out_dat_w => g_fft.stage_dat_w - ) - PORT MAP ( - clk => clk, - in_dat => sub_arr(2*I+1), - out_dat => fft_im_arr(2*I+1) - ); - end generate; + fft_re_arr(2*I ) <= add_arr(2*I )(c_raw_dat_w-1 DOWNTO 0); -- A real + fft_re_arr(2*I+1) <= add_arr(2*I+1)(c_raw_dat_w-1 DOWNTO 0); -- B real + fft_im_arr(2*I ) <= sub_arr(2*I )(c_raw_dat_w-1 DOWNTO 0); -- A imag + fft_im_arr(2*I+1) <= sub_arr(2*I+1)(c_raw_dat_w-1 DOWNTO 0); -- B imag end generate; --------------------------------------------------------------------------- - -- Generate bin 0 directly + -- Generate bin 0 = DC directly --------------------------------------------------------------------------- -- Index N=g_fft.nof_points wraps to index 0: -- . fft_re_arr(0) = (int_re_arr(0) + int_re_arr(N)) / 2 = int_re_arr(0) @@ -379,28 +316,34 @@ begin u_pipeline_a_re_0 : entity common_lib.common_pipeline generic map ( - g_pipeline => c_pipeline_add_sub, - g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w + g_representation => "SIGNED", + g_pipeline => c_pipeline_add_sub, + g_in_dat_w => g_fft.stage_dat_w, + g_out_dat_w => g_fft.stage_dat_w ) port map ( clk => clk, in_dat => int_re_arr(0), - out_dat => fft_re_arr(0) + out_dat => int_a_dc ); u_pipeline_b_re_0 : entity common_lib.common_pipeline generic map ( - g_pipeline => c_pipeline_add_sub, - g_in_dat_w => g_fft.stage_dat_w, - g_out_dat_w => g_fft.stage_dat_w + g_representation => "SIGNED", + g_pipeline => c_pipeline_add_sub, + g_in_dat_w => g_fft.stage_dat_w, + g_out_dat_w => g_fft.stage_dat_w ) port map ( clk => clk, in_dat => int_im_arr(0), - out_dat => fft_re_arr(1) + out_dat => int_b_dc ); + -- The real outputs of A(0) and B(0) are scaled by shift left is * 2 for separate add + fft_re_arr(0) <= int_a_dc & '0'; + fft_re_arr(1) <= int_b_dc & '0'; + -- The imaginary outputs of A(0) and B(0) are always zero in case two real inputs are provided fft_im_arr(0) <= (others=>'0'); fft_im_arr(1) <= (others=>'0'); @@ -421,6 +364,7 @@ begin no_separate : if g_fft.use_separate=false generate assign_outputs : for I in 0 to g_fft.nof_points-1 generate + -- c_raw_dat_w = g_fft.stage_dat_w, because g_fft.use_separate=false fft_re_arr(I) <= int_re_arr(I); fft_im_arr(I) <= int_im_arr(I); end generate; @@ -434,14 +378,14 @@ begin u_requantize_re : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, g_msb_clip_symmetric => FALSE, g_pipeline_remove_lsb => c_pipeline_remove_lsb, g_pipeline_remove_msb => 0, - g_in_dat_w => g_fft.stage_dat_w, + g_in_dat_w => c_raw_dat_w, g_out_dat_w => g_fft.out_dat_w ) port map ( @@ -454,14 +398,14 @@ begin u_requantize_im : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, g_msb_clip_symmetric => FALSE, g_pipeline_remove_lsb => c_pipeline_remove_lsb, g_pipeline_remove_msb => 0, - g_in_dat_w => g_fft.stage_dat_w, + g_in_dat_w => c_raw_dat_w, g_out_dat_w => g_fft.out_dat_w ) port map ( diff --git a/libraries/dsp/fft/src/vhdl/fft_r2_pipe.vhd b/libraries/dsp/fft/src/vhdl/fft_r2_pipe.vhd index 00c2007bd8a4bb7bafb6ca126bf1a11b5f602755..8f3d64e600c1f9e10a087cd2d92210f3aef931aa 100644 --- a/libraries/dsp/fft/src/vhdl/fft_r2_pipe.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_r2_pipe.vhd @@ -69,9 +69,7 @@ entity fft_r2_pipe is g_instance_index : natural := 0; -- used for FFT switch seed g_fft : t_fft := c_fft; -- generics for the FFT g_pipeline : t_fft_pipeline := c_fft_pipeline; -- generics for pipelining in each stage, defined in rTwoSDF_lib.rTwoSDFPkg - g_dont_flip_channels : boolean := false; -- generic to prevent re-ordering of the channels - g_r2_mul_extra_w : natural := 0; -- extra bits at rTwoWMul output in rTwoSDFStage to improve rTwoSDFStage output requantization - g_sepa_extra_w : natural := 0 -- extra LSbits in output of last rTwoSDFStage to improve two real separate requantization + g_dont_flip_channels : boolean := false -- generic to prevent re-ordering of the channels ); port ( clk : in std_logic; @@ -99,8 +97,8 @@ architecture str of fft_r2_pipe is constant c_stage_offset : natural := true_log2(g_fft.wb_factor); -- Stage offset is required for twiddle generation in wideband fft constant c_in_scale_w : natural := g_fft.stage_dat_w - g_fft.in_dat_w - sel_a_b(g_fft.guard_enable, g_fft.guard_w, 0); constant c_out_scale_w : integer := g_fft.stage_dat_w - g_fft.out_dat_w - g_fft.out_gain_w; -- Estimate number of LSBs to throw throw away when > 0 or insert when < 0 - constant c_raw_dat_extra_w : natural := sel_a_b(g_fft.use_separate, g_sepa_extra_w, 0); - constant c_raw_dat_w : natural := g_fft.stage_dat_w + c_raw_dat_extra_w; + constant c_sepa_growth_w : natural := sel_a_b(g_fft.use_separate, 1, 0); -- add one bit for add sub growth in separate + constant c_raw_dat_w : natural := g_fft.stage_dat_w + c_sepa_growth_w; -- number the stage instances from c_nof_stages:1 -- . the data input for the first stage has index c_nof_stages @@ -117,12 +115,10 @@ architecture str of fft_r2_pipe is signal data_re : t_data_arr; signal data_im : t_data_arr; - signal last_re : std_logic_vector(c_raw_dat_w-1 downto 0); - signal last_im : std_logic_vector(c_raw_dat_w-1 downto 0); signal data_val : std_logic_vector(c_nof_stages downto 0):= (others=>'0'); + signal in_cplx : std_logic_vector(c_nof_complex*g_fft.stage_dat_w-1 downto 0); signal out_cplx : std_logic_vector(c_nof_complex*c_raw_dat_w-1 downto 0); - signal in_cplx : std_logic_vector(c_nof_complex*c_raw_dat_w-1 downto 0); signal raw_out_re : std_logic_vector(c_raw_dat_w-1 downto 0); signal raw_out_im : std_logic_vector(c_raw_dat_w-1 downto 0); signal raw_out_val : std_logic; @@ -177,8 +173,7 @@ begin g_stage_offset => c_stage_offset, g_twiddle_offset => g_fft.twiddle_offset, g_scale_enable => sel_a_b(stage <= g_fft.guard_w, FALSE, TRUE), - g_pipeline => g_pipeline, - g_r2_mul_extra_w => g_r2_mul_extra_w + g_pipeline => g_pipeline ) port map ( clk => clk, @@ -200,8 +195,7 @@ begin g_stage_offset => c_stage_offset, g_twiddle_offset => g_fft.twiddle_offset, g_scale_enable => sel_a_b(1 <= g_fft.guard_w, FALSE, TRUE), - g_pipeline => g_pipeline, - g_r2_mul_extra_w => g_r2_mul_extra_w + g_pipeline => g_pipeline ) port map ( clk => clk, @@ -209,16 +203,16 @@ begin in_re => data_re(1), in_im => data_im(1), in_val => data_val(1), - out_re => last_re, -- = data_re(0), but may instead have c_raw_dat_w bits - out_im => last_im, -- = data_im(0), but may instead have c_raw_dat_w bits + out_re => data_re(0), + out_im => data_im(0), out_val => data_val(0) ); ------------------------------------------------------------------------------ -- Optional output reorder and separation ------------------------------------------------------------------------------ - gen_reorder_and_separate : if(g_fft.use_separate or g_fft.use_reorder) generate - in_cplx <= last_im & last_re; + gen_reorder_and_separate : if g_fft.use_separate or g_fft.use_reorder generate + in_cplx <= data_im(0) & data_re(0); u_reorder_sep : entity work.fft_reorder_sepa_pipe generic map ( @@ -232,20 +226,23 @@ begin port map ( clk => clk, rst => rst, - in_dat => in_cplx, + in_dat => in_cplx, -- c_nof_complex * g_fft.stage_dat_w in_val => data_val(0), - out_dat => out_cplx, + out_dat => out_cplx, -- c_nof_complex * c_raw_dat_w out_val => raw_out_val ); + -- c_raw_dat_w = g_fft.stage_dat_w when g_fft.use_separate = false + -- c_raw_dat_w = g_fft.stage_dat_w + 1 when g_fft.use_separate = true raw_out_re <= out_cplx( c_raw_dat_w-1 downto 0); raw_out_im <= out_cplx(2*c_raw_dat_w-1 downto c_raw_dat_w); end generate; - no_reorder_no_seperate : if(g_fft.use_separate=false and g_fft.use_reorder=false) generate - raw_out_re <= last_re; - raw_out_im <= last_im; + no_reorder_no_seperate : if g_fft.use_separate=false and g_fft.use_reorder=false generate + -- c_raw_dat_w = g_fft.stage_dat_w because g_fft.use_separate = false + raw_out_re <= data_re(0); + raw_out_im <= data_im(0); raw_out_val <= data_val(0); end generate; @@ -255,7 +252,7 @@ begin u_requantize_re : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w + c_raw_dat_extra_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, @@ -275,7 +272,7 @@ begin u_requantize_im : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w + c_raw_dat_extra_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, diff --git a/libraries/dsp/fft/src/vhdl/fft_r2_wide.vhd b/libraries/dsp/fft/src/vhdl/fft_r2_wide.vhd index da55a674b03786958fe8ee3f4545643f0664232d..017e5b1384983d66a423fe605f4259e54fc1d4ae 100644 --- a/libraries/dsp/fft/src/vhdl/fft_r2_wide.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_r2_wide.vhd @@ -77,8 +77,7 @@ entity fft_r2_wide is generic ( g_fft : t_fft := c_fft; -- generics for the FFT g_pft_pipeline : t_fft_pipeline := c_fft_pipeline; -- For the pipelined part, from rTwoSDF_lib.rTwoSDFPkg - g_fft_pipeline : t_fft_pipeline := c_fft_pipeline; -- For the parallel part, from rTwoSDF_lib.rTwoSDFPkg - g_r2_mul_extra_w : natural := 0 -- extra bits at rTwoWMul output in rTwoSDFStage to improve rTwoSDFStage output requantization in fft_r2_pipe + g_fft_pipeline : t_fft_pipeline := c_fft_pipeline -- For the parallel part, from rTwoSDF_lib.rTwoSDFPkg ); port ( clk : in std_logic; @@ -153,18 +152,25 @@ architecture rtl of fft_r2_wide is constant c_out_scale_w : integer := c_fft_r2_par.out_dat_w - g_fft.out_dat_w - g_fft.out_gain_w; -- Estimate number of LSBs to throw away when > 0 or insert when < 0 + constant c_sepa_growth_w : natural := sel_a_b(g_fft.use_separate, 1, 0); -- add one bit for add sub growth in separate + constant c_raw_dat_w : natural := g_fft.stage_dat_w + c_sepa_growth_w; + + -- g_fft.wb_factor = 1 + signal fft_pipe_out_re : std_logic_vector(g_fft.out_dat_w-1 downto 0); + signal fft_pipe_out_im : std_logic_vector(g_fft.out_dat_w-1 downto 0); + + -- g_fft.wb_factor > 1 and < g_fft.nof_points signal in_fft_pipe_re_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal in_fft_pipe_im_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal out_fft_pipe_re_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal out_fft_pipe_im_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); + signal out_fft_pipe_val : std_logic_vector(g_fft.wb_factor-1 downto 0); + signal in_fft_par : std_logic; -- = out_fft_pipe_val(0) signal in_fft_par_re_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal in_fft_par_im_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); - signal fft_pipe_out_re : std_logic_vector(g_fft.out_dat_w-1 downto 0); - signal fft_pipe_out_im : std_logic_vector(g_fft.out_dat_w-1 downto 0); - signal fft_out_re_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal fft_out_im_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal fft_out_val : std_logic; @@ -173,11 +179,6 @@ architecture rtl of fft_r2_wide is signal sep_out_im_arr : t_fft_slv_arr(g_fft.wb_factor-1 downto 0); signal sep_out_val : std_logic; - signal int_val : std_logic_vector(g_fft.wb_factor-1 downto 0); - - signal out_cplx : std_logic_vector(c_nof_complex*g_fft.stage_dat_w-1 downto 0); - signal in_cplx : std_logic_vector(c_nof_complex*g_fft.stage_dat_w-1 downto 0); - begin -- Default to fft_r2_pipe when g_fft.wb_factor=1 @@ -185,8 +186,7 @@ begin u_fft_r2_pipe : entity work.fft_r2_pipe generic map ( g_fft => g_fft, - g_pipeline => g_pft_pipeline, - g_r2_mul_extra_w => g_r2_mul_extra_w + g_pipeline => g_pft_pipeline ) port map ( clk => clk, @@ -241,8 +241,7 @@ begin u_pft : entity work.fft_r2_pipe generic map ( g_fft => c_fft_r2_pipe_arr(I), -- generics for the pipelined FFTs - g_pipeline => g_pft_pipeline, -- pipeline generics for the pipelined FFTs - g_r2_mul_extra_w => g_r2_mul_extra_w + g_pipeline => g_pft_pipeline -- pipeline generics for the pipelined FFTs ) port map ( clk => clk, @@ -252,7 +251,7 @@ begin in_val => in_val, out_re => out_fft_pipe_re_arr(I)(c_fft_r2_pipe_arr(I).out_dat_w-1 downto 0), out_im => out_fft_pipe_im_arr(I)(c_fft_r2_pipe_arr(I).out_dat_w-1 downto 0), - out_val => int_val(I) + out_val => out_fft_pipe_val(I) ); end generate; @@ -261,6 +260,8 @@ begin -- PARALLEL FFT STAGE --------------------------------------------------------------- + in_fft_par <= out_fft_pipe_val(0); + -- Create input for parallel FFT gen_inputs_for_par : for I in g_fft.wb_factor-1 downto 0 generate in_fft_par_re_arr(I) <= resize_fft_svec(out_fft_pipe_re_arr(I)(c_fft_r2_pipe_arr(I).out_dat_w-1 downto 0)); @@ -279,7 +280,7 @@ begin rst => rst, in_re_arr => in_fft_par_re_arr, in_im_arr => in_fft_par_im_arr, - in_val => int_val(0), + in_val => in_fft_par, out_re_arr => fft_out_re_arr, out_im_arr => fft_out_im_arr, out_val => fft_out_val @@ -320,14 +321,14 @@ begin u_requantize_output_re : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, g_msb_clip_symmetric => FALSE, g_pipeline_remove_lsb => c_pipeline_remove_lsb, g_pipeline_remove_msb => 0, - g_in_dat_w => g_fft.stage_dat_w, + g_in_dat_w => c_raw_dat_w, g_out_dat_w => g_fft.out_dat_w ) port map ( @@ -340,14 +341,14 @@ begin u_requantize_output_im : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_out_scale_w, + g_lsb_w => c_out_scale_w + c_sepa_growth_w, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, g_msb_clip_symmetric => FALSE, g_pipeline_remove_lsb => c_pipeline_remove_lsb, g_pipeline_remove_msb => 0, - g_in_dat_w => g_fft.stage_dat_w, + g_in_dat_w => c_raw_dat_w, g_out_dat_w => g_fft.out_dat_w ) port map ( diff --git a/libraries/dsp/fft/src/vhdl/fft_reorder_sepa_pipe.vhd b/libraries/dsp/fft/src/vhdl/fft_reorder_sepa_pipe.vhd index 89d056fb82dfdf09df5302911545fc375820e9d5..b363745caf022d3cf0e9716eef1cfcaea424c8e5 100644 --- a/libraries/dsp/fft/src/vhdl/fft_reorder_sepa_pipe.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_reorder_sepa_pipe.vhd @@ -51,9 +51,9 @@ entity fft_reorder_sepa_pipe is port ( clk : in std_logic; rst : in std_logic; - in_dat : in std_logic_vector; + in_dat : in std_logic_vector; -- c_dat_w in_val : in std_logic; - out_dat : out std_logic_vector; + out_dat : out std_logic_vector; -- c_dat_w when g_separate = false, else c_dat_w + 2 out_val : out std_logic ); end entity fft_reorder_sepa_pipe; @@ -323,9 +323,9 @@ begin port map ( clk => clk, rst => rst, - in_dat => out_dat_i, + in_dat => out_dat_i, -- c_dat_w in_val => out_val_i, - out_dat => out_dat, + out_dat => out_dat, -- c_dat_w + 2 out_val => out_val ); end generate; @@ -335,8 +335,8 @@ begin -- the output signals are directly driven. gen_no_separate : if g_separate=false generate rd_adr <= TO_UVEC(r.count_up, c_adr_tot_w); - out_dat <= out_dat_i; - out_val <= out_val_i; + out_dat <= out_dat_i; -- c_dat_w + out_val <= out_val_i; end generate; end rtl; diff --git a/libraries/dsp/fft/src/vhdl/fft_sepa.vhd b/libraries/dsp/fft/src/vhdl/fft_sepa.vhd index 5bf2423a8595c65f9e3218c48f4ab6fc01906049..65da081cd733226a48086dbffdc5be08e4499516 100644 --- a/libraries/dsp/fft/src/vhdl/fft_sepa.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_sepa.vhd @@ -41,17 +41,9 @@ -- B.imag(m) = (X.real(N-m) - X.real(m))/2 -- -- Remarks: --- . The add and sub output of the separate have 1 bit growth that needs to be --- rounded. Simply skipping 1 LSbit is not suitable, because it yields --- asymmetry around 0 and thus a DC offset. For example for N = 3-bit data: --- x = -4 -3 -2 -1 0 1 2 3 --- round(x/2) = -2 -2 -1 -1 0 1 1 2 = common_round for signed --- floor(x/2) = -2 -2 -1 -1 0 0 1 1 = truncation --- The most negative value can be ignored: --- x : mean(-3 -2 -1 0 1 2 3) = 0 --- . round(x/2) : mean(-2 -1 -1 0 1 1 2) = 0 --- . floor(x/2) : mean(-2 -1 -1 0 0 1 1) = -2/8 = -0.25 = -2^(N-1)/2 / 2^N --- So the DC offset due to truncation is -0.25 LSbit, independent of N. +-- . The A, B outputs are scaled by factor 2 due to separate add and sub. +-- Therefore in_dat re, im have c_in_data_w bits and out_dat re, im have +-- c_out_data_w = c_in_data_w + 1 bits, to avoid overflow. library IEEE, common_lib; use IEEE.std_logic_1164.ALL; @@ -62,40 +54,40 @@ entity fft_sepa is port ( clk : in std_logic; rst : in std_logic; - in_dat : in std_logic_vector; + in_dat : in std_logic_vector; -- c_nof_complex * c_in_data_w in_val : in std_logic; - out_dat : out std_logic_vector; + out_dat : out std_logic_vector; -- c_nof_complex * c_out_data_w = c_nof_complex * (c_in_data_w + 1) out_val : out std_logic ); end entity fft_sepa; architecture rtl of fft_sepa is - constant c_sepa_round : boolean := true; -- must be true, because separate should round the 1 bit growth - - constant c_data_w : natural := in_dat'length/c_nof_complex; - constant c_c_data_w : natural := c_nof_complex*c_data_w; - constant c_pipeline : natural := 3; + constant c_in_data_w : natural := in_dat'length / c_nof_complex; + constant c_in_complex_w : natural := c_nof_complex * c_in_data_w; + constant c_out_data_w : natural := c_in_data_w + 1; + constant c_out_complex_w : natural := c_nof_complex * c_out_data_w; + constant c_pipeline : natural := 3; - type reg_type is record - switch : std_logic; -- Register used to toggle between A & B definitionn - val_dly : std_logic_vector(c_pipeline-1 downto 0); -- Register that delays the incoming valid signal - xn_m_reg : std_logic_vector(c_c_data_w-1 downto 0); -- Register to hold the X(N-m) value for one cycle - xm_reg : std_logic_vector(c_c_data_w-1 downto 0); -- Register to hold the X(m) value for one cycle - add_reg_a : std_logic_vector(c_data_w-1 downto 0); -- Input register A for the adder - add_reg_b : std_logic_vector(c_data_w-1 downto 0); -- Input register B for the adder - sub_reg_a : std_logic_vector(c_data_w-1 downto 0); -- Input register A for the subtractor - sub_reg_b : std_logic_vector(c_data_w-1 downto 0); -- Input register B for the subtractor - out_dat : std_logic_vector(c_c_data_w-1 downto 0); -- Registered output value - out_val : std_logic; -- Registered data valid signal + type t_reg is record + switch : std_logic; -- Register used to toggle between A & B definitionn + val_dly : std_logic_vector(c_pipeline-1 downto 0); -- Register that delays the incoming valid signal + xn_m_reg : std_logic_vector(c_in_complex_w-1 downto 0); -- Register to hold the X(N-m) value for one cycle + xm_reg : std_logic_vector(c_in_complex_w-1 downto 0); -- Register to hold the X(m) value for one cycle + add_reg_a : std_logic_vector(c_in_data_w-1 downto 0); -- Input register A for the adder + add_reg_b : std_logic_vector(c_in_data_w-1 downto 0); -- Input register B for the adder + sub_reg_a : std_logic_vector(c_in_data_w-1 downto 0); -- Input register A for the subtractor + sub_reg_b : std_logic_vector(c_in_data_w-1 downto 0); -- Input register B for the subtractor + out_dat : std_logic_vector(c_out_complex_w-1 downto 0); -- Registered output value + out_val : std_logic; -- Registered data valid signal end record; + + constant c_reg_init : t_reg := ('0', (others=>'0'), (others=>'0'), (others=>'0'), (others=>'0'), (others=>'0'), (others=>'0'), (others=>'0'), (others=>'0'), '0'); - signal r, rin : reg_type; - signal sub_result : std_logic_vector(c_data_w downto 0); -- Result of the subtractor - signal add_result : std_logic_vector(c_data_w downto 0); -- Result of the adder - - signal sub_result_q : std_logic_vector(c_data_w-1 downto 0); -- Requantized result of the subtractor - signal add_result_q : std_logic_vector(c_data_w-1 downto 0); -- Requantized result of the adder + signal r : t_reg := c_reg_init; + signal rin : t_reg; + signal sub_result : std_logic_vector(c_out_data_w-1 downto 0); -- Result of the subtractor + signal add_result : std_logic_vector(c_out_data_w-1 downto 0); -- Result of the adder begin @@ -108,8 +100,8 @@ begin g_representation => "SIGNED", g_pipeline_input => 0, g_pipeline_output => 1, - g_in_dat_w => c_data_w, - g_out_dat_w => c_data_w + 1 + g_in_dat_w => c_in_data_w, + g_out_dat_w => c_out_data_w -- = c_in_data_w + 1 ) port map ( clk => clk, @@ -124,8 +116,8 @@ begin g_representation => "SIGNED", g_pipeline_input => 0, g_pipeline_output => 1, - g_in_dat_w => c_data_w, - g_out_dat_w => c_data_w + 1 + g_in_dat_w => c_in_data_w, + g_out_dat_w => c_out_data_w -- = c_in_data_w + 1 ) port map ( clk => clk, @@ -134,52 +126,11 @@ begin result => sub_result ); - gen_sepa_truncate : IF c_sepa_round=FALSE GENERATE - -- truncate the one LSbit - add_result_q <= add_result(c_data_w downto 1); - sub_result_q <= sub_result(c_data_w downto 1); - end generate; - - gen_sepa_round : IF c_sepa_round=TRUE GENERATE - -- round the one LSbit - round_add : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => c_data_w+1, - g_out_dat_w => c_data_w - ) - PORT MAP ( - clk => clk, - in_dat => add_result, - out_dat => add_result_q - ); - - round_sub : ENTITY common_lib.common_round - GENERIC MAP ( - g_representation => "SIGNED", -- SIGNED (round +-0.5 away from zero to +- infinity) or UNSIGNED rounding (round 0.5 up to + inifinity) - g_round => TRUE, -- when TRUE round the input, else truncate the input - g_round_clip => FALSE, -- when TRUE clip rounded input >= +max to avoid wrapping to output -min (signed) or 0 (unsigned) - g_pipeline_input => 0, -- >= 0 - g_pipeline_output => 0, -- >= 0, use g_pipeline_input=0 and g_pipeline_output=0 for combinatorial output - g_in_dat_w => c_data_w+1, - g_out_dat_w => c_data_w - ) - PORT MAP ( - clk => clk, - in_dat => sub_result, - out_dat => sub_result_q - ); - end generate; - --------------------------------------------------------------- -- CONTROL PROCESS --------------------------------------------------------------- - comb : process(r, rst, in_val, in_dat, add_result_q, sub_result_q) - variable v : reg_type; + comb : process(r, rst, in_val, in_dat, add_result, sub_result) + variable v : t_reg; begin v := r; @@ -188,7 +139,7 @@ begin v.val_dly(0) := in_val; -- Composition of the output registers: - v.out_dat := sub_result_q & add_result_q; + v.out_dat := sub_result & add_result; v.out_val := r.val_dly(c_pipeline-1); -- Compose the inputs for the adder and subtractor @@ -196,16 +147,16 @@ begin if in_val = '1' or r.val_dly(0) = '1' then if r.switch = '0' then v.xm_reg := in_dat; - v.add_reg_a := r.xm_reg(c_c_data_w-1 downto c_data_w); -- Xm imag - v.add_reg_b := r.xn_m_reg(c_c_data_w-1 downto c_data_w); -- Xn-m imag - v.sub_reg_a := r.xn_m_reg(c_data_w-1 downto 0); -- Xn-m real - v.sub_reg_b := r.xm_reg(c_data_w-1 downto 0); -- Xm real + v.add_reg_a := r.xm_reg(c_in_complex_w-1 downto c_in_data_w); -- Xm imag + v.add_reg_b := r.xn_m_reg(c_in_complex_w-1 downto c_in_data_w); -- Xn-m imag + v.sub_reg_a := r.xn_m_reg(c_in_data_w-1 downto 0); -- Xn-m real + v.sub_reg_b := r.xm_reg(c_in_data_w-1 downto 0); -- Xm real else v.xn_m_reg := in_dat; - v.add_reg_a := r.xm_reg(c_data_w-1 downto 0); -- Xm real - v.add_reg_b := in_dat(c_data_w-1 downto 0); -- Xn-m real - v.sub_reg_a := r.xm_reg(c_c_data_w-1 downto c_data_w); -- Xm imag - v.sub_reg_b := in_dat(c_c_data_w-1 downto c_data_w); -- Xn-m imag + v.add_reg_a := r.xm_reg(c_in_data_w-1 downto 0); -- Xm real + v.add_reg_b := in_dat(c_in_data_w-1 downto 0); -- Xn-m real + v.sub_reg_a := r.xm_reg(c_in_complex_w-1 downto c_in_data_w); -- Xm imag + v.sub_reg_b := in_dat(c_in_complex_w-1 downto c_in_data_w); -- Xn-m imag end if; end if; @@ -213,16 +164,10 @@ begin v.switch := not r.switch; end if; - if(rst = '1') then + if rst = '1' then + -- Only need to reset the control signals v.switch := '0'; v.val_dly := (others => '0'); - v.xn_m_reg := (others => '0'); - v.xm_reg := (others => '0'); - v.add_reg_a := (others => '0'); - v.add_reg_b := (others => '0'); - v.sub_reg_a := (others => '0'); - v.sub_reg_b := (others => '0'); - v.out_dat := (others => '0'); v.out_val := '0'; end if; diff --git a/libraries/dsp/fft/src/vhdl/fft_sepa_wide.vhd b/libraries/dsp/fft/src/vhdl/fft_sepa_wide.vhd index a950206d5e537f7f015195ad88cbe668f4f5951d..0af4993aee9dfc7d3db23ba938b08ad8ecc42863 100644 --- a/libraries/dsp/fft/src/vhdl/fft_sepa_wide.vhd +++ b/libraries/dsp/fft/src/vhdl/fft_sepa_wide.vhd @@ -67,11 +67,17 @@ architecture rtl of fft_sepa_wide is constant c_page_size : natural := g_fft.nof_points/g_fft.wb_factor; -- Size of the memories constant c_nof_pages : natural := 2; -- The number of pages in each ram. - constant c_dat_w : natural := c_nof_complex*g_fft.stage_dat_w; -- Data width for the internal vectors where real and imag are combined. + constant c_in_w : natural := g_fft.stage_dat_w; + constant c_dat_w : natural := c_nof_complex*c_in_w; -- Data width for the internal vectors where real and imag are combined. constant c_adr_w : natural := ceil_log2(c_page_size); -- Address width of the rams constant c_nof_streams : natural := 2; -- Number of inputstreams for the zip units - type t_dat_arr is array(integer range <> ) of std_logic_vector(c_dat_w-1 downto 0); + constant c_sepa_growth_w : natural := sel_a_b(g_fft.use_separate, 1, 0); -- add one bit for add sub growth in separate + constant c_out_w : natural := c_in_w + c_sepa_growth_w; + constant c_raw_dat_w : natural := c_nof_complex*c_out_w; -- = c_dat_w or c_dat_w + 2 + + type t_dat_arr is array(integer range <> ) of std_logic_vector(c_dat_w-1 downto 0); + type t_raw_dat_arr is array(integer range <> ) of std_logic_vector(c_raw_dat_w-1 downto 0); type t_rd_adr_arr is array(integer range <> ) of std_logic_vector(c_adr_w-1 downto 0); type t_zip_in_matrix is array(integer range <> ) of t_slv_64_arr(1 downto 0); -- Every Zip unit has two inputs. @@ -85,24 +91,27 @@ architecture rtl of fft_sepa_wide is signal zip_in_matrix : t_zip_in_matrix(g_fft.wb_factor-1 downto 0); -- Matrix that contains the inputs for zip units signal zip_in_val : std_logic_vector(g_fft.wb_factor-1 downto 0); -- Vector that holds the data input valids for the zip units - signal zip_out_dat_arr : t_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the outputs of all zip units. + signal zip_out_dat_arr : t_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the outputs of all zip units. signal zip_out_val : std_logic_vector(g_fft.wb_factor-1 downto 0); -- Vector that holds the output valids of the zip units - signal sep_out_dat_arr : t_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the outputs of the separation blocks + signal sep_out_dat_arr : t_raw_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the outputs of the separation blocks signal sep_out_val_vec : std_logic_vector(g_fft.wb_factor-1 downto 0); -- Vector containing the datavalids from the separation blocks - signal out_dat_arr : t_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the ouput values, where real and imag are concatenated + signal out_dat_arr : t_raw_dat_arr(g_fft.wb_factor-1 downto 0); -- Array that holds the ouput values, where real and imag are concatenated - type state_type is (s_idle, s_read); - type reg_type is record + type t_state is (s_idle, s_read); + type t_reg is record switch : std_logic; -- Toggle register used for separate functionalilty count_up : natural range 0 to c_page_size; -- An upwards counter for read addressing count_down : natural range 0 to c_page_size; -- A downwards counter for read addressing val_odd : std_logic; -- Register that drives the in_valid of the odd zip units val_even : std_logic; -- Register that drives the in_valid of the even zip units - state : state_type; -- The state machine. + state : t_state; -- The state machine. end record; - signal r, rin : reg_type; + constant c_reg_init : t_reg := ('0', 0, 0, '0', '0', s_idle); + + signal r : t_reg := c_reg_init; + signal rin : t_reg; begin @@ -111,7 +120,7 @@ begin --------------------------------------------------------------- -- Prepare the data for the dual paged memory. Real and imaginary part are concatenated into one vector. gen_prep_write_data : for I in 0 to g_fft.wb_factor-1 generate - wr_dat(I) <= in_im_arr(I)(g_fft.stage_dat_w-1 downto 0) & in_re_arr(I)(g_fft.stage_dat_w-1 downto 0); + wr_dat(I) <= in_im_arr(I)(c_in_w-1 downto 0) & in_re_arr(I)(c_in_w-1 downto 0); end generate; -- Prepare the write control signals for the memories. @@ -204,9 +213,9 @@ begin port map ( clk => clk, rst => rst, - in_dat => zip_out_dat_arr(I), + in_dat => zip_out_dat_arr(I), -- c_dat_w in_val => zip_out_val(I), - out_dat => sep_out_dat_arr(I), + out_dat => sep_out_dat_arr(I), -- c_dat_w + 2 out_val => sep_out_val_vec(I) ); end generate; @@ -218,13 +227,13 @@ begin -- the fellow toggle signals. It also controls the starting and stopping -- of the data stream. comb : process(r, rst, next_page) - variable v : reg_type; + variable v : t_reg; begin v := r; case r.state is - when s_idle => + when s_idle => v.switch := '0'; v.val_odd := '0'; v.val_even := '0'; @@ -234,7 +243,7 @@ begin v.state := s_read; end if; - when s_read => + when s_read => if(r.switch = '0') then -- Toggle the switch register from 0 to 1 v.switch := '1'; end if; @@ -255,22 +264,17 @@ begin v.val_odd := r.switch; -- Assignment of the odd and even markers v.val_even := not(r.switch); - when others => - v.state := s_idle; + when others => + v.state := s_idle; - end case; + end case; - if(rst = '1') then - v.switch := '0'; - v.count_up := 0; - v.count_down := 0; - v.val_odd := '0'; - v.val_even := '0'; - v.state := s_idle; + if rst = '1' then + v := c_reg_init; end if; rin <= v; - + end process comb; regs : process(clk) @@ -287,8 +291,8 @@ begin u_output_pipeline_align : entity common_lib.common_pipeline generic map ( g_pipeline => c_pipeline_output + 1, -- Pipeline + one stage for allignment - g_in_dat_w => c_dat_w, - g_out_dat_w => c_dat_w + g_in_dat_w => c_raw_dat_w, + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -299,8 +303,8 @@ begin u_output_pipeline : entity common_lib.common_pipeline generic map ( g_pipeline => c_pipeline_output, -- Only pipeline stage - g_in_dat_w => c_dat_w, - g_out_dat_w => c_dat_w + g_in_dat_w => c_raw_dat_w, + g_out_dat_w => c_raw_dat_w ) port map ( clk => clk, @@ -321,8 +325,8 @@ begin -- Split the concatenated array into a real and imaginary array for the output gen_output_arrays : for I in g_fft.wb_factor-1 downto 0 generate - out_re_arr(I) <= resize_fft_svec(out_dat_arr(I)( g_fft.stage_dat_w-1 downto 0)); - out_im_arr(I) <= resize_fft_svec(out_dat_arr(I)(c_nof_complex*g_fft.stage_dat_w-1 downto g_fft.stage_dat_w)); + out_re_arr(I) <= resize_fft_svec(out_dat_arr(I)( c_out_w-1 downto 0)); + out_im_arr(I) <= resize_fft_svec(out_dat_arr(I)(c_nof_complex*c_out_w-1 downto c_out_w)); end generate; end rtl; diff --git a/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDF.vhd b/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDF.vhd index 5734acbf56ec8985eb7a303c0082faf763e5cc2d..06745606030856de10906904dfed7e2d5dd76837 100644 --- a/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDF.vhd +++ b/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDF.vhd @@ -44,8 +44,6 @@ entity rTwoSDF is g_guard_w : natural := 2; -- guard bits are used to avoid overflow in single FFT stage. g_nof_points : natural := 1024; -- N point FFT -- generics for rTwoSDFStage - g_r2_mul_extra_w : natural := 0; -- extra bits at rTwoWMult output in rTwoSDFStage to improve rTwoSDFStage output requantization, - -- proper value is 2, default use 0 to fit original tb_rTwoSDF.vhd golden results file g_pipeline : t_fft_pipeline := c_fft_pipeline ); port ( @@ -106,7 +104,6 @@ begin g_stage_offset => c_stage_offset, g_twiddle_offset => c_twiddle_offset, g_scale_enable => sel_a_b(stage <= g_guard_w, FALSE, TRUE), -- On average all stages have a gain factor of 2 therefore each stage needs to round 1 bit except for the last g_guard_w nof stages due to the input c_in_scale_w - g_r2_mul_extra_w => g_r2_mul_extra_w, g_pipeline => g_pipeline ) port map ( diff --git a/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDFStage.vhd b/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDFStage.vhd index 932023200fe50de75d6122566343d292bfae8aac..8f40621d13484cb722656eb52109340eafd64de4 100644 --- a/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDFStage.vhd +++ b/libraries/dsp/rTwoSDF/src/vhdl/rTwoSDFStage.vhd @@ -32,7 +32,6 @@ entity rTwoSDFStage is g_stage_offset : natural := 0; -- The Stage offset: 0 for normal FFT. Other than 0 in wideband FFT g_twiddle_offset : natural := 0; -- The twiddle offset: 0 for normal FFT. Other than 0 in wideband FFT g_scale_enable : boolean := TRUE; -- - g_r2_mul_extra_w : natural := 0; -- extra bits at rTwoMult output to improve FFT stage output requantization g_pipeline : t_fft_pipeline := c_fft_pipeline -- internal pipeline settings ); port ( @@ -70,8 +69,8 @@ architecture str of rTwoSDFStage is signal weight_re : wTyp; signal weight_im : wTyp; - signal mul_out_re : std_logic_vector(out_re'length-1 + g_r2_mul_extra_w downto 0); - signal mul_out_im : std_logic_vector(out_im'length-1 + g_r2_mul_extra_w downto 0); + signal mul_out_re : std_logic_vector(out_re'length-1 downto 0); + signal mul_out_im : std_logic_vector(out_im'length-1 downto 0); signal mul_out_val : std_logic; signal quant_out_re : std_logic_vector(out_re'range); @@ -170,7 +169,7 @@ begin u_requantize_re : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_r2_stage_bit_growth + g_r2_mul_extra_w, + g_lsb_w => c_r2_stage_bit_growth, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, @@ -191,7 +190,7 @@ begin u_requantize_im : entity common_lib.common_requantize generic map ( g_representation => "SIGNED", - g_lsb_w => c_r2_stage_bit_growth + g_r2_mul_extra_w, + g_lsb_w => c_r2_stage_bit_growth, g_lsb_round => TRUE, g_lsb_round_clip => FALSE, g_msb_clip => FALSE, diff --git a/libraries/dsp/verify_pfb/tb_tb_verify_pfb_wg.vhd b/libraries/dsp/verify_pfb/tb_tb_verify_pfb_wg.vhd index 3324698c2c237c5a69335797bcb40e5a9dfe4853..5201937baf357fabd1ff02dbb2782302a0e48db3 100644 --- a/libraries/dsp/verify_pfb/tb_tb_verify_pfb_wg.vhd +++ b/libraries/dsp/verify_pfb/tb_tb_verify_pfb_wg.vhd @@ -129,8 +129,6 @@ BEGIN -- g_fft_stage_dat_w : NATURAL := 18; -- = c_dsp_mult_w = 18, number of bits that are used inter-stage -- g_fft_guard_w : NATURAL := 1 -- = 2 -- g_switch_en : STD_LOGIC := '0'; -- two real input decorrelation option in PFB2 --- g_r2_mul_extra_w : NATURAL := 0 -- = 0, extra bits at rTwoWMul output in rTwoSDFStage to improve rTwoSDFStage output requantization in fft_r2_pipe in wpfb_unit_dev --- g_sepa_extra_w : NATURAL := 2 -- = 2, extra LSbits in output of last rTwoSDFStage to improve two real separate requantization in fft_r2_pipe in wpfb_unit_dev -- g_tb_index @@ -151,24 +149,22 @@ BEGIN -- . . . . . . . . . . . . . . . g_fft_stage_dat_w -- . . . . . . . . . . . . . . . . g_fft_guard_w -- . . . . . . . . . . . . . . . . . g_switch_en - -- . . . . . . . . . . . . . . . . . . g_r2_mul_extra_w - -- . . . . . . . . . . . . . . . . . . . g_sepa_extra_w - -- . . . . . . . . . . . . . . . . . . . . -gen_ref : IF c_gen_ref GENERATE -- . . . . . . . . . . . . . . . . . . . . - -- WPFB . . . . . . . . . . . . . . . . . . . . - u_apertif : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1001, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 8, 16, 18, 1, 18, 2, '0', 0, 0); - u_lts_2020_11_23 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1002, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 1, 18, 2, '0', 0, 0); + -- . . . . . . . . . . . . . . . . . . +gen_ref : IF c_gen_ref GENERATE -- . . . . . . . . . . . . . . . . . . + -- WPFB . . . . . . . . . . . . . . . . . . + u_apertif : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1001, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 8, 16, 18, 1, 18, 2, '0'); + u_lts_2020_11_23 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1002, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 1, 18, 2, '0'); -- PFB2 - u_lofar1_12b : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1003, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 18, 18, 0, 20, 0, '0', 0, 0); - u_lofar1_14b : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1004, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0', 0, 0); - u_lofar1_14b_22 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1005, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0', 0, 0); - u_lofar1_14b_24 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1006, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 24, 0, '0', 0, 0); + u_lofar1_12b : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1003, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 18, 18, 0, 20, 0, '0'); + u_lofar1_14b : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1004, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0'); + u_lofar1_14b_22 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1005, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0'); + u_lofar1_14b_24 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1006, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 24, 0, '0'); -- WPFB - u_wpfb_stage18 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1007, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); - u_wpfb_stage20 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1008, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); - u_wpfb_stage22 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1009, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); - u_wpfb_stage23 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1010, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 23, 1, '0', 0, 0); - u_wpfb_stage24 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1011, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 0); + u_wpfb_stage18 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1007, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); + u_wpfb_stage20 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1008, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0'); + u_wpfb_stage22 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1009, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0'); + u_wpfb_stage23 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1010, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 23, 1, '0'); + u_wpfb_stage24 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1011, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0'); -- Results: -- Coeffs16384Kaiser-quant -- . Coeffs16384Kaiser-quant-nodc @@ -193,22 +189,22 @@ END GENERATE; gen_g_fil_backoff_w_1 : IF c_gen_g_fil_backoff_w_1 GENERATE -- g_subband_index_a = 60.4, to check that with g_fil_backoff_w = 1 there is no FIR filter overflow - u_149 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (149, "WPFB", 60.4, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 18, 1, '0', 0, 0); + u_149 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (149, "WPFB", 60.4, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 18, 1, '0'); -- g_subband_index_a = 60, WG at center subband frequency to determine PFB processing gain -- g_fft_guard_w = 1, check that no extra FFT backoff guard at first stage is needed when g_fil_backoff_w = 1 - u_150 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (150, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 18, 1, '0', 0, 0); - u_151 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (151, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 20, 1, '0', 0, 0); - u_152 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (152, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 22, 1, '0', 0, 0); - u_153 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (153, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 23, 1, '0', 0, 0); - u_154 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (154, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 24, 1, '0', 0, 0); - u_155 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (155, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 25, 1, '0', 0, 0); + u_150 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (150, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 18, 1, '0'); + u_151 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (151, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 20, 1, '0'); + u_152 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (152, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 22, 1, '0'); + u_153 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (153, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 23, 1, '0'); + u_154 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (154, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 24, 1, '0'); + u_155 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (155, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 25, 1, '0'); -- g_fft_guard_w = 2, use extra FFT backoff guard at first FFT stage, which is compensated by no guard at last FFT stage, intermediate stages have backoff guard 1 to compensate for stage gain of factor 2 - u_156 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (156, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 18, 2, '0', 0, 0); - u_157 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (157, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 20, 2, '0', 0, 0); - u_158 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (158, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 22, 2, '0', 0, 0); - u_159 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (159, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 23, 2, '0', 0, 0); - u_160 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (160, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 24, 2, '0', 0, 0); - u_161 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (161, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 25, 2, '0', 0, 0); + u_156 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (156, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 18, 2, '0'); + u_157 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (157, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 20, 2, '0'); + u_158 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (158, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 22, 2, '0'); + u_159 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (159, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 23, 2, '0'); + u_160 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (160, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 24, 2, '0'); + u_161 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (161, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 0, 25, 2, '0'); --Results: --g_fil_backoff_w = 1 -- g_fft_stage_dat_w @@ -234,10 +230,10 @@ END GENERATE; gen_vary_g_fil_backoff_w : IF c_gen_vary_g_fil_backoff_w GENERATE - u_1000 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1000, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); -- = u_wpfb_stage22 - u_1001 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1001, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 22, 0, '0', 0, 0); - u_1002 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1002, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 18, 19, 0, 22, 0, '0', 0, 0); - u_1003 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1003, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 18, 19, 1, 22, 0, '0', 0, 0); + u_1000 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1000, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0'); -- = u_wpfb_stage22 + u_1001 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1001, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 17, 18, 0, 22, 0, '0'); + u_1002 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1002, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 18, 19, 0, 22, 0, '0'); + u_1003 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1003, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 18, 19, 1, 22, 0, '0'); --Results: -- . wpfb_measured_proc_gain_a_dB = 18.79 [dB] -- . wpfb_measured_proc_gain_a_dB = 16.64 [dB] @@ -248,13 +244,13 @@ END GENERATE; gen_vary_g_fft_out_dat_w : IF c_gen_vary_g_fft_out_dat_w GENERATE -- WPFB - u_100 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (100, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); -- = u_wpfb_stage22 - u_101 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (101, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 19, 0, 22, 1, '0', 0, 0); - u_102 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (102, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 20, 0, 22, 1, '0', 0, 0); + u_100 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (100, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0'); -- = u_wpfb_stage22 + u_101 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (101, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 19, 0, 22, 1, '0'); + u_102 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (102, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 20, 0, 22, 1, '0'); -- PFB2 - u_103 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (103, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0', 0, 0); - u_104 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (104, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 19, 0, 22, 0, '0', 0, 0); - u_105 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (105, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 20, 0, 22, 0, '0', 0, 0); + u_103 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (103, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0'); + u_104 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (104, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 19, 0, 22, 0, '0'); + u_105 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (105, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 20, 0, 22, 0, '0'); -- Results: -- g_fft_out_dat_w -- WPFB . @@ -269,13 +265,9 @@ END GENERATE; gen_2020_jan_18 : IF c_gen_2020_jan_18 GENERATE - u_200 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (200, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 1, 18, 2, '0', 0, 0); -- = u_lts_2020_11_23 - u_201 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (201, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_202 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (202, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 2, 0); - u_203 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (203, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 2, 2); - u_204 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (204, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); -- = u_wpfb_stage20 - u_205 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (205, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 2, 0); - u_206 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (206, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 2, 2); + u_200 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (200, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 1, 14, 16, 18, 1, 18, 2, '0'); -- = u_lts_2020_11_23 + u_201 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (201, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_204 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (204, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0'); -- = u_wpfb_stage20 -- Results: -- Table C: PFB processing gain for APERTIF WPFB quick improvements @@ -293,22 +285,22 @@ END GENERATE; gen_vary_wg_integer_freq : IF c_gen_vary_wg_integer_freq GENERATE - u_2001 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2001, "WPFB", 1.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2002 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2002, "WPFB", 2.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2003 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2003, "WPFB", 3.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2004 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2004, "WPFB", 4.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2008 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2008, "WPFB", 8.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2016 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2016, "WPFB", 16.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2032 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2032, "WPFB", 32.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2037 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2037, "WPFB", 37.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2061 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2061, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2064 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2064, "WPFB", 64.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2117 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2117, "WPFB",117.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2128 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2128, "WPFB",128.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2256 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2256, "WPFB",256.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2257 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2257, "WPFB",257.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2373 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2373, "WPFB",373.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_2503 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2503, "WPFB",503.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 + u_2001 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2001, "WPFB", 1.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2002 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2002, "WPFB", 2.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2003 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2003, "WPFB", 3.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2004 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2004, "WPFB", 4.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2008 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2008, "WPFB", 8.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2016 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2016, "WPFB", 16.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2032 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2032, "WPFB", 32.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2037 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2037, "WPFB", 37.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2061 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2061, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2064 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2064, "WPFB", 64.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2117 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2117, "WPFB",117.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2128 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2128, "WPFB",128.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2256 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2256, "WPFB",256.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2257 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2257, "WPFB",257.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2373 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2373, "WPFB",373.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_2503 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (2503, "WPFB",503.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 -- Results: -- g_subband_index_a @@ -335,29 +327,29 @@ gen_vary_wg_fractional_freq : IF c_gen_vary_wg_fractional_freq GENERATE -- Use fractions that fit integer number of periods in sync interval c_N_blk = c_wpfb.nof_blk_per_sync = 10, so c_N_blk*fraction must be integer, to have stable SST value -- Need to use g_amplitude_a = 0.9 ~< 0.95 to avoid overflow in PFS output, that occurs for some fractional g_subband_index_a -- WG freq 60.0 - u_600 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (600, "WPFB", 60.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_601 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (601, "WPFB", 60.1, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_602 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (602, "WPFB", 60.2, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_603 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (603, "WPFB", 60.3, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_604 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (604, "WPFB", 60.4, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_605 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (605, "WPFB", 60.5, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_606 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (606, "WPFB", 60.6, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_607 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (607, "WPFB", 60.7, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_608 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (608, "WPFB", 60.8, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_609 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (609, "WPFB", 60.9, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 + u_600 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (600, "WPFB", 60.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_601 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (601, "WPFB", 60.1, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_602 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (602, "WPFB", 60.2, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_603 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (603, "WPFB", 60.3, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_604 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (604, "WPFB", 60.4, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_605 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (605, "WPFB", 60.5, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_606 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (606, "WPFB", 60.6, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_607 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (607, "WPFB", 60.7, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_608 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (608, "WPFB", 60.8, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_609 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (609, "WPFB", 60.9, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 -- WG freq 61.0 - u_610 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (610, "WPFB", 61.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 freq 61 - u_611 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (611, "WPFB", 61.1, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_612 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (612, "WPFB", 61.2, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_613 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (613, "WPFB", 61.3, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_614 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (614, "WPFB", 61.4, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_615 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (615, "WPFB", 61.5, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_616 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (616, "WPFB", 61.6, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_617 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (617, "WPFB", 61.7, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_618 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (618, "WPFB", 61.8, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_619 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (619, "WPFB", 61.9, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 + u_610 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (610, "WPFB", 61.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 freq 61 + u_611 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (611, "WPFB", 61.1, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_612 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (612, "WPFB", 61.2, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_613 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (613, "WPFB", 61.3, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_614 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (614, "WPFB", 61.4, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_615 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (615, "WPFB", 61.5, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_616 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (616, "WPFB", 61.6, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_617 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (617, "WPFB", 61.7, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_618 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (618, "WPFB", 61.8, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_619 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (619, "WPFB", 61.9, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 -- WG freq 62.0 - u_620 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (620, "WPFB", 62.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 + u_620 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (620, "WPFB", 62.0, 61.0, 0.9, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 -- Note>: -- . For fractional subband frequencies the WG can only generate the average frequency, due to limited period accuracy of WG. This causes @@ -392,65 +384,65 @@ END GENERATE; gen_vary_g_fft_stage_dat_w : IF c_gen_vary_g_fft_stage_dat_w GENERATE -- g_internal_dat_w = constant -- WPFB - u_300 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (300, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_301 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (301, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 19, 1, '0', 0, 0); - u_302 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (302, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); -- = u_wpfb_stage20 - u_303 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (303, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 21, 1, '0', 0, 0); - u_304 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (304, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); -- = u_wpfb_stage22 - u_305 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (305, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 23, 1, '0', 0, 0); -- = u_wpfb_stage23 - u_306 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (306, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 0); -- = u_wpfb_stage24 - u_307 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (307, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 25, 1, '0', 0, 0); + u_300 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (300, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_301 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (301, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 19, 1, '0'); + u_302 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (302, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0'); -- = u_wpfb_stage20 + u_303 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (303, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 21, 1, '0'); + u_304 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (304, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0'); -- = u_wpfb_stage22 + u_305 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (305, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 23, 1, '0'); -- = u_wpfb_stage23 + u_306 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (306, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0'); -- = u_wpfb_stage24 + u_307 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (307, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 25, 1, '0'); -- PFB2 - u_310 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (310, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 18, 0, '0', 0, 0); - u_311 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (311, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 0, '0', 0, 0); - u_312 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (312, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0', 0, 0); -- = u_lofar1_14b - u_313 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (313, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 21, 0, '0', 0, 0); - u_314 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (314, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0', 0, 0); - u_315 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (315, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 23, 0, '0', 0, 0); - u_316 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (316, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 24, 0, '0', 0, 0); - u_317 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (317, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 25, 0, '0', 0, 0); + u_310 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (310, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 18, 0, '0'); + u_311 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (311, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 0, '0'); + u_312 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (312, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0'); -- = u_lofar1_14b + u_313 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (313, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 21, 0, '0'); + u_314 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (314, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 22, 0, '0'); + u_315 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (315, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 23, 0, '0'); + u_316 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (316, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 24, 0, '0'); + u_317 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (317, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 25, 0, '0'); -- WPFB only FFT - u_320 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (320, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_321 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (321, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 19, 1, '0', 0, 0); - u_322 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (322, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); - u_323 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (323, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 21, 1, '0', 0, 0); - u_324 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (324, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); - u_325 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (325, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 23, 1, '0', 0, 0); - u_326 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (326, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 0); - u_327 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (327, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 25, 1, '0', 0, 0); + u_320 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (320, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_321 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (321, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 19, 1, '0'); + u_322 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (322, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 20, 1, '0'); + u_323 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (323, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 21, 1, '0'); + u_324 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (324, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 22, 1, '0'); + u_325 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (325, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 23, 1, '0'); + u_326 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (326, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 24, 1, '0'); + u_327 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (327, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 25, 1, '0'); -- PFB2 only FFT - u_330 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (330, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 18, 0, '0', 0, 0); - u_331 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (331, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 19, 0, '0', 0, 0); - u_332 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (332, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 20, 0, '0', 0, 0); - u_333 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (333, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 21, 0, '0', 0, 0); - u_334 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (334, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 22, 0, '0', 0, 0); - u_335 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (335, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 23, 0, '0', 0, 0); - u_336 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (336, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 24, 0, '0', 0, 0); - u_337 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (337, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 25, 0, '0', 0, 0); + u_330 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (330, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 18, 0, '0'); + u_331 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (331, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 19, 0, '0'); + u_332 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (332, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 20, 0, '0'); + u_333 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (333, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 21, 0, '0'); + u_334 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (334, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 22, 0, '0'); + u_335 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (335, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 23, 0, '0'); + u_336 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (336, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 24, 0, '0'); + u_337 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (337, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 25, 0, '0'); -- g_internal_dat_w = incrementing with g_fft_stage_dat_w -- WPFB - u_340 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (340, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_341 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (341, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 1, '0', 0, 0); - u_342 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (342, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 20, 1, '0', 0, 0); - u_343 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (343, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 21, 1, '0', 0, 0); - u_344 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (344, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 22, 1, '0', 0, 0); - u_345 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (345, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 23, 1, '0', 0, 0); - u_346 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (346, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 24, 1, '0', 0, 0); - u_347 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (347, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 25, 1, '0', 0, 0); + u_340 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (340, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_341 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (341, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 1, '0'); + u_342 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (342, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 20, 1, '0'); + u_343 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (343, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 21, 1, '0'); + u_344 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (344, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 22, 1, '0'); + u_345 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (345, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 23, 1, '0'); + u_346 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (346, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 24, 1, '0'); + u_347 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (347, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 25, 1, '0'); -- PFB2 - u_350 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (350, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 18, 0, '0', 0, 0); - u_351 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (351, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 19, 0, '0', 0, 0); - u_352 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (352, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 20, 0, '0', 0, 0); - u_353 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (353, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 21, 0, '0', 0, 0); - u_354 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (354, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 22, 0, '0', 0, 0); - u_355 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (355, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 23, 0, '0', 0, 0); - u_356 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (356, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 24, 0, '0', 0, 0); - u_357 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (357, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 18, 0, 25, 0, '0', 0, 0); + u_350 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (350, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 18, 0, '0'); + u_351 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (351, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 19, 0, '0'); + u_352 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (352, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 20, 0, '0'); + u_353 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (353, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 21, 0, '0'); + u_354 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (354, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 22, 0, '0'); + u_355 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (355, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 23, 0, '0'); + u_356 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (356, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 24, 0, '0'); + u_357 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (357, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 18, 0, 25, 0, '0'); -- Results: -- Table A: PFB processing gain for increasing internal data width @@ -475,37 +467,37 @@ END GENERATE; gen_vary_g_fil_in_dat_w : IF c_gen_vary_g_fil_in_dat_w GENERATE - u_400 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (400, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 8, 17, 18, 0, 20, 1, '0', 0, 0); - u_401 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (401, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 9, 17, 18, 0, 20, 1, '0', 0, 0); - u_402 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (402, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 10, 17, 18, 0, 20, 1, '0', 0, 0); - u_403 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (403, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 11, 17, 18, 0, 20, 1, '0', 0, 0); - u_404 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (404, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 17, 18, 0, 20, 1, '0', 0, 0); - u_405 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (405, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 13, 17, 18, 0, 20, 1, '0', 0, 0); - u_406 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (406, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); -- u_wpfb_stage20 - - u_410 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (410, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 8, 18, 18, 0, 20, 0, '0', 0, 0); - u_411 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (411, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 9, 18, 18, 0, 20, 0, '0', 0, 0); - u_412 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (412, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 10, 18, 18, 0, 20, 0, '0', 0, 0); - u_413 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (413, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 11, 18, 18, 0, 20, 0, '0', 0, 0); - u_414 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (414, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 18, 18, 0, 20, 0, '0', 0, 0); - u_415 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (415, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 13, 18, 18, 0, 20, 0, '0', 0, 0); - u_416 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (416, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0', 0, 0); -- u_lofar1_14b - - u_420 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (420, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 8, 17, 18, 0, 20, 1, '0', 0, 0); - u_421 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (421, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 9, 17, 18, 0, 20, 1, '0', 0, 0); - u_422 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (422, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 10, 17, 18, 0, 20, 1, '0', 0, 0); - u_423 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (423, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 11, 17, 18, 0, 20, 1, '0', 0, 0); - u_424 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (424, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 12, 17, 18, 0, 20, 1, '0', 0, 0); - u_425 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (425, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 13, 17, 18, 0, 20, 1, '0', 0, 0); - u_426 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (426, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); - - u_430 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (430, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 8, 18, 18, 0, 20, 0, '0', 0, 0); - u_431 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (431, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 9, 18, 18, 0, 20, 0, '0', 0, 0); - u_432 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (432, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 10, 18, 18, 0, 20, 0, '0', 0, 0); - u_433 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (433, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 11, 18, 18, 0, 20, 0, '0', 0, 0); - u_434 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (434, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 12, 18, 18, 0, 20, 0, '0', 0, 0); - u_435 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (435, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 13, 18, 18, 0, 20, 0, '0', 0, 0); - u_436 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (436, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 20, 0, '0', 0, 0); + u_400 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (400, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 8, 17, 18, 0, 20, 1, '0'); + u_401 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (401, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 9, 17, 18, 0, 20, 1, '0'); + u_402 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (402, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 10, 17, 18, 0, 20, 1, '0'); + u_403 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (403, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 11, 17, 18, 0, 20, 1, '0'); + u_404 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (404, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 17, 18, 0, 20, 1, '0'); + u_405 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (405, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 13, 17, 18, 0, 20, 1, '0'); + u_406 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (406, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0'); -- u_wpfb_stage20 + + u_410 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (410, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 8, 18, 18, 0, 20, 0, '0'); + u_411 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (411, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 9, 18, 18, 0, 20, 0, '0'); + u_412 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (412, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 10, 18, 18, 0, 20, 0, '0'); + u_413 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (413, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 11, 18, 18, 0, 20, 0, '0'); + u_414 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (414, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 12, 18, 18, 0, 20, 0, '0'); + u_415 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (415, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 13, 18, 18, 0, 20, 0, '0'); + u_416 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (416, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 20, 0, '0'); -- u_lofar1_14b + + u_420 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (420, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 8, 17, 18, 0, 20, 1, '0'); + u_421 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (421, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 9, 17, 18, 0, 20, 1, '0'); + u_422 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (422, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 10, 17, 18, 0, 20, 1, '0'); + u_423 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (423, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 11, 17, 18, 0, 20, 1, '0'); + u_424 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (424, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 12, 17, 18, 0, 20, 1, '0'); + u_425 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (425, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 13, 17, 18, 0, 20, 1, '0'); + u_426 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (426, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 20, 1, '0'); + + u_430 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (430, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 8, 18, 18, 0, 20, 0, '0'); + u_431 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (431, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 9, 18, 18, 0, 20, 0, '0'); + u_432 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (432, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 10, 18, 18, 0, 20, 0, '0'); + u_433 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (433, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 11, 18, 18, 0, 20, 0, '0'); + u_434 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (434, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 12, 18, 18, 0, 20, 0, '0'); + u_435 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (435, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 13, 18, 18, 0, 20, 0, '0'); + u_436 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (436, "PFB2", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 18, 18, 0, 20, 0, '0'); -- Results: -- The table B) shows the processing gain for different internal ADC input width between 8b and 14b. Conclusions: @@ -527,13 +519,13 @@ END GENERATE; -- 2021_jan_11 gen_vary_g_amplitude_a : IF c_gen_vary_g_amplitude_a GENERATE - u_760 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (760, "WPFB", 61.0, 61.0, 1.0 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18, 1.0 - u_761 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (761, "WPFB", 61.0, 61.0, 0.5 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_762 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (762, "WPFB", 61.0, 61.0, 0.25 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_763 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (763, "WPFB", 61.0, 61.0, 0.125 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_764 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (764, "WPFB", 61.0, 61.0, 0.0625 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_765 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (765, "WPFB", 61.0, 61.0, 0.03125 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 - u_766 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (766, "WPFB", 61.0, 61.0, 0.015625, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- = u_wpfb_stage18 + u_760 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (760, "WPFB", 61.0, 61.0, 1.0 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18, 1.0 + u_761 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (761, "WPFB", 61.0, 61.0, 0.5 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_762 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (762, "WPFB", 61.0, 61.0, 0.25 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_763 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (763, "WPFB", 61.0, 61.0, 0.125 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_764 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (764, "WPFB", 61.0, 61.0, 0.0625 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_765 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (765, "WPFB", 61.0, 61.0, 0.03125 , 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 + u_766 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (766, "WPFB", 61.0, 61.0, 0.015625, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); -- = u_wpfb_stage18 --Results: --tb-761 . wpfb_measured_proc_gain_a_dB = 6.11 [dB] --tb-762 . wpfb_measured_proc_gain_a_dB = 6.15 [dB] @@ -547,8 +539,8 @@ END GENERATE; gen_vary_c_twiddle_w : IF c_gen_vary_c_twiddle_w GENERATE -- WPFB only FFT - u_0 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (0, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); -- = u_324 - u_1 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 0); -- = u_326 + u_0 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (0, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 22, 1, '0'); -- = u_324 + u_1 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (1, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_bypass, 16, 0, 14, 17, 18, 0, 24, 1, '0'); -- = u_326 -- Rerun the simulation per c_twiddle_w setting ## by first manually doing: -- > cp libraries/dsp/rTwoSDF/src/vhdl/pkg/twiddlesPkg_w##.vhd libraries/dsp/rTwoSDF/src/vhdl/twiddlesPkg.vhd @@ -571,82 +563,6 @@ END GENERATE; gen_vary_extra_w : IF c_gen_vary_extra_w GENERATE - u_900 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (900, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 0); -- u_wpfb_stage18 - u_901 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (901, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 1, 0); - u_902 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (902, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 0, 1); - u_903 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (903, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 1, 1); - - u_910 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (910, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 0); -- u_wpfb_stage20 - u_911 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (911, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 1, 0); - u_912 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (912, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 0, 1); - u_913 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (913, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 20, 1, '0', 1, 1); - - u_920 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (920, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 0); -- u_wpfb_stage22 - u_921 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (921, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 1, 0); - u_922 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (922, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 0, 1); - u_923 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (923, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 22, 1, '0', 1, 1); - - u_930 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (930, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 0); -- u_wpfb_stage24 - u_931 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (931, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 1, 0); - u_932 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (932, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 0, 1); - u_933 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (933, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 24, 1, '0', 1, 1); ---Results: --- g_fft_stage_dat_w --- . g_r2_mul_extra_w --- . . g_sepa_extra_w --- . . . ---tb-900 18, 0, 0 . wpfb_measured_proc_gain_a_dB = 6.11 [dB] -- u_wpfb_stage18 --- 1, 0 . 6.09 [dB] ---tb-901 18, 2, 0 . 6.53 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 6.11 [dB] -- u_wpfb_stage18 --- 0, 1 . 5.09 [dB] ---tb-902 18, 0, 2 . 5.26 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 6.11 [dB] -- u_wpfb_stage18 --- 1, 1 . 6.09 [dB] ---tb-903 18, 2, 2 . 6.53 [dB] --- 3, 3 . 6.70 [dB] --- ---tb-910 20, 0, 0 . wpfb_measured_proc_gain_a_dB = 12.38 [dB] -- u_wpfb_stage20 --- 1, 0 . 12.31 [dB] ---tb-911 20, 2, 0 . 12.35 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 12.38 [dB] -- u_wpfb_stage20 --- 0, 1 . 13.42 [dB] ---tb-912 20, 0, 2 . 13.42 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 12.38 [dB] -- u_wpfb_stage20 --- 1, 1 . 14.49 [dB] ---tb-913 20, 2, 2 . 14.62 [dB] --- 3, 3 . 14.97 [dB] --- ---tb-920 22, 0, 0 . wpfb_measured_proc_gain_a_dB = 18.79 [dB] -- u_wpfb_stage22 --- 1, 0 . 18.97 [dB] ---tb-921 22, 2, 0 . 19.20 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 18.79 [dB] -- u_wpfb_stage22 --- 0, 1 . 18.97 [dB] ---tb-922 22, 0, 2 . 18.97 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 18.79 [dB] -- u_wpfb_stage22 --- 1, 1 . 19.59 [dB] ---tb-923 22, 2, 2 . 19.52 [dB] --- 3, 3 . 19.59 [dB] --- ---tb-930 24, 0, 0 . wpfb_measured_proc_gain_a_dB = 20.08 [dB] -- u_wpfb_stage24 --- 1, 0 . 20.08 [dB] ---tb-931 24, 2, 0 . 20.08 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 20.08 [dB] -- u_wpfb_stage24 --- 0, 1 . 20.16 [dB] ---tb-932 24, 0, 2 . 20.16 [dB] --- --- 0, 0 . wpfb_measured_proc_gain_a_dB = 20.08 [dB] -- u_wpfb_stage24 --- 1, 1 . 20.31 [dB] ---tb-933 24, 2, 2 . 20.23 [dB] --- 3, 3 . 20.23 [dB] --- --Conclusion: --* If g_fft_stage_dat_w is large enough (~=> 24), then using extra_w has no benefit (as expected) --* Combination of using both g_r2_mul_extra_w and g_sepa_extra_w has most benefit, for @@ -660,40 +576,40 @@ END GENERATE; gen_2020_dec : IF c_gen_2020_dec GENERATE -- g_internal_dat_w = g_fft_stage_dat_w - g_fft_guard_w -- g_fft_out_dat_w = 18 - u_800 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (800, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0', 2, 2); - u_801 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (801, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 1, '0', 2, 2); - u_802 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (802, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 20, 1, '0', 2, 2); - u_803 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (803, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 21, 1, '0', 2, 2); - u_804 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (804, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 22, 1, '0', 2, 2); - u_805 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (805, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 23, 1, '0', 2, 2); - u_806 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (806, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 24, 1, '0', 2, 2); - u_807 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (807, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 25, 1, '0', 2, 2); - u_808 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (808, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 18, 0, 26, 1, '0', 2, 2); - u_809 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (809, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 18, 0, 27, 1, '0', 2, 2); + u_800 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (800, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 18, 0, 18, 1, '0'); + u_801 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (801, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 18, 0, 19, 1, '0'); + u_802 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (802, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 18, 0, 20, 1, '0'); + u_803 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (803, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 18, 0, 21, 1, '0'); + u_804 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (804, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 18, 0, 22, 1, '0'); + u_805 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (805, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 18, 0, 23, 1, '0'); + u_806 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (806, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 18, 0, 24, 1, '0'); + u_807 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (807, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 18, 0, 25, 1, '0'); + u_808 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (808, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 18, 0, 26, 1, '0'); + u_809 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (809, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 18, 0, 27, 1, '0'); -- g_fft_out_dat_w = 19 - u_810 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (810, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 19, 0, 18, 1, '0', 2, 2); - u_811 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (811, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 19, 0, 19, 1, '0', 2, 2); - u_812 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (812, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 19, 0, 20, 1, '0', 2, 2); - u_813 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (813, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 19, 0, 21, 1, '0', 2, 2); - u_814 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (814, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 19, 0, 22, 1, '0', 2, 2); - u_815 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (815, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 19, 0, 23, 1, '0', 2, 2); - u_816 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (816, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 19, 0, 24, 1, '0', 2, 2); - u_817 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (817, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 19, 0, 25, 1, '0', 2, 2); - u_818 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (818, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 19, 0, 26, 1, '0', 2, 2); - u_819 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (819, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 19, 0, 27, 1, '0', 2, 2); + u_810 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (810, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 19, 0, 18, 1, '0'); + u_811 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (811, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 19, 0, 19, 1, '0'); + u_812 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (812, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 19, 0, 20, 1, '0'); + u_813 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (813, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 19, 0, 21, 1, '0'); + u_814 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (814, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 19, 0, 22, 1, '0'); + u_815 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (815, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 19, 0, 23, 1, '0'); + u_816 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (816, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 19, 0, 24, 1, '0'); + u_817 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (817, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 19, 0, 25, 1, '0'); + u_818 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (818, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 19, 0, 26, 1, '0'); + u_819 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (819, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 19, 0, 27, 1, '0'); -- g_fft_out_dat_w = 20 - u_820 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (820, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 20, 0, 18, 1, '0', 2, 2); - u_821 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (821, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 20, 0, 19, 1, '0', 2, 2); - u_822 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (822, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 20, 0, 20, 1, '0', 2, 2); - u_823 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (823, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 20, 0, 21, 1, '0', 2, 2); - u_824 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (824, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 20, 0, 22, 1, '0', 2, 2); - u_825 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (825, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 20, 0, 23, 1, '0', 2, 2); - u_826 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (826, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 20, 0, 24, 1, '0', 2, 2); - u_827 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (827, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 20, 0, 25, 1, '0', 2, 2); - u_828 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (828, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 20, 0, 26, 1, '0', 2, 2); - u_829 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (829, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 20, 0, 27, 1, '0', 2, 2); + u_820 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (820, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 17, 20, 0, 18, 1, '0'); + u_821 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (821, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 18, 20, 0, 19, 1, '0'); + u_822 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (822, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 19, 20, 0, 20, 1, '0'); + u_823 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (823, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 20, 20, 0, 21, 1, '0'); + u_824 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (824, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 21, 20, 0, 22, 1, '0'); + u_825 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (825, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 22, 20, 0, 23, 1, '0'); + u_826 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (826, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 23, 20, 0, 24, 1, '0'); + u_827 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (827, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 24, 20, 0, 25, 1, '0'); + u_828 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (828, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 25, 20, 0, 26, 1, '0'); + u_829 : ENTITY work.tb_verify_pfb_wg GENERIC MAP (829, "WPFB", 61.0, 61.0, 1.0, 0.0, 0.0, 0.0, c_fil_coefs, 16, 0, 14, 26, 20, 0, 27, 1, '0'); END GENERATE; END tb; diff --git a/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd b/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd index eac6be532f7a4dbf4ef9af6f0d775cf997238b36..41d547963654ac7de8b143a745b68ef723ab8ce2 100644 --- a/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd +++ b/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd @@ -146,7 +146,7 @@ ENTITY tb_verify_pfb_wg IS --g_fil_coefs_file_prefix : STRING := "data/run_pfir_coeff_m_fircls1_16taps_1024points_18b_1wb"; -- g_fil_coef_dat_w = 18 bit g_fil_coef_dat_w : NATURAL := 16; -- = 16, data width of the FIR coefficients --g_fil_coef_dat_w : NATURAL := 18; -- = 16, data width of the FIR coefficients - g_fil_backoff_w : NATURAL := 0; -- = 0, number of bits for input backoff to avoid output overflow + g_fil_backoff_w : NATURAL := 1; -- = 0, number of bits for input backoff to avoid output overflow g_fil_in_dat_w : NATURAL := 14; -- = W_adc, number of input bits g_internal_dat_w : NATURAL := 0; -- = number of bits between fil and fft, use 0 to use maximum default: @@ -158,9 +158,7 @@ ENTITY tb_verify_pfb_wg IS g_fft_out_gain_w : NATURAL := 1; -- = 1, output gain factor applied after the last stage output, before requantization to out_dat_w g_fft_stage_dat_w : NATURAL := 27; -- = c_dsp_mult_w = 18, number of bits that are used inter-stage g_fft_guard_w : NATURAL := 1; -- = 2 - g_switch_en : STD_LOGIC := '0'; -- two real input decorrelation option in PFB2 - g_r2_mul_extra_w : NATURAL := 0; -- = 2, WPFB extra bits at rTwoWMul output in rTwoSDFStage to improve rTwoSDFStage output requantization in fft_r2_pipe in wpfb_unit_dev - g_sepa_extra_w : NATURAL := 0 -- = 2, WPFB extra LSbits in output of last rTwoSDFStage to improve two real separate requantization in fft_r2_pipe in wpfb_unit_dev + g_switch_en : STD_LOGIC := '0' -- two real input decorrelation option in PFB2 ); END ENTITY tb_verify_pfb_wg; @@ -234,8 +232,6 @@ ARCHITECTURE tb OF tb_verify_pfb_wg IS true, false, true, c_internal_dat_w, g_fft_out_dat_w, g_fft_out_gain_w, g_fft_stage_dat_w, g_fft_guard_w, true, 54, 2, 10, c_fft_pipeline, c_fft_pipeline, c_fil_ppf_pipeline); - CONSTANT c_wpfb_extra : t_wpfb_extra := (g_r2_mul_extra_w, g_sepa_extra_w); - CONSTANT c_N_fft : NATURAL := c_wpfb.nof_points; CONSTANT c_N_sub : NATURAL := c_N_fft / c_nof_complex; CONSTANT c_N_blk : NATURAL := c_wpfb.nof_blk_per_sync; -- nof FFT blocks per sync interval @@ -243,8 +239,9 @@ ARCHITECTURE tb OF tb_verify_pfb_wg IS CONSTANT c_nof_channels : NATURAL := 2**c_wpfb.nof_chan; -- = 2**0 = 1, so no time multiplexing of inputs CONSTANT c_nof_sync : NATURAL := 5; -- nof sync intervals to simulate - CONSTANT c_pfb_sub_scaling : REAL := 2.0**REAL(g_fft_out_dat_w + g_fft_out_gain_w - g_fil_in_dat_w - 1); -- expected subband amplitude gain relative to input WG amplitude - -- -1 for divide by 2 in two real input separate (Ampl --> Ampl/2) + -- Expected subband amplitude gain relative to input WG amplitude -1 for divide by 2 in two real input separate (Ampl --> Ampl/2) + CONSTANT c_pfb_sub_scaling : REAL := 2.0**REAL((g_fft_out_dat_w + g_fft_out_gain_w) - (g_fil_in_dat_w + g_fil_backoff_w) - 1); + -- Subband at WG frequency CONSTANT c_bin_a : NATURAL := NATURAL(FLOOR(g_subband_index_a)); CONSTANT c_bin_a_frac_en : BOOLEAN := g_subband_index_a > REAL(c_bin_a); @@ -979,8 +976,6 @@ BEGIN print_str(". g_fft_stage_dat_w = " & int_to_str(g_fft_stage_dat_w)); print_str(". g_fft_guard_w = " & int_to_str(g_fft_guard_w)); print_str(". c_switch_en = " & slv_to_str(slv(c_switch_en))); - print_str(". g_r2_mul_extra_w = " & int_to_str(g_r2_mul_extra_w)); - print_str(". g_sepa_extra_w = " & int_to_str(g_sepa_extra_w)); END IF; IF g_sel_pfb="PFB2" THEN print_str("-------------------------------------------------------------"); @@ -1113,7 +1108,6 @@ BEGIN u_wpfb_unit_dev : ENTITY wpfb_lib.wpfb_unit_dev GENERIC MAP ( g_wpfb => c_wpfb, - g_wpfb_extra => c_wpfb_extra, g_coefs_file_prefix => g_fil_coefs_file_prefix ) PORT MAP ( diff --git a/libraries/dsp/wpfb/src/vhdl/wpfb_pkg.vhd b/libraries/dsp/wpfb/src/vhdl/wpfb_pkg.vhd index 5b2aefd0e897ab4d2cf5042836c58a3d990634bc..d87302058e1779ac79bba9a0542157a249cedcf7 100644 --- a/libraries/dsp/wpfb/src/vhdl/wpfb_pkg.vhd +++ b/libraries/dsp/wpfb/src/vhdl/wpfb_pkg.vhd @@ -68,16 +68,7 @@ package wpfb_pkg is fft_pipeline : t_fft_pipeline; -- Pipeline settings for the parallel FFT fil_pipeline : t_fil_ppf_pipeline; -- Pipeline settings for the filter units end record; - - -- Extra parameters for the (wideband) poly phase filter, put in new record to show that they are new - type t_wpfb_extra is record - r2_mul_extra_w : natural; -- 0 --> 2, extra LSbits at rTwoMult output in rTwoSDFStage to improve FFT stage output requantization - sepa_extra_w : natural; -- 0 --> 2, extra LSbits in output of last rTwoSDFStage to improve two real separate requantization - end record; - - CONSTANT c_wpfb_extra_none : t_wpfb_extra := (0, 0); - CONSTANT c_wpfb_extra_lofar20 : t_wpfb_extra := (2, 2); - + ----------------------------------------------------------------------------- -- Apertif application specfic settings ----------------------------------------------------------------------------- diff --git a/libraries/dsp/wpfb/src/vhdl/wpfb_unit_dev.vhd b/libraries/dsp/wpfb/src/vhdl/wpfb_unit_dev.vhd index c12d89665762e8451ba9e6e337e367d3bb72f11f..ae905b69951111ea497fa1c49801a2886790ed0f 100644 --- a/libraries/dsp/wpfb/src/vhdl/wpfb_unit_dev.vhd +++ b/libraries/dsp/wpfb/src/vhdl/wpfb_unit_dev.vhd @@ -360,7 +360,6 @@ entity wpfb_unit_dev is generic ( g_big_endian_wb_in : boolean := true; g_wpfb : t_wpfb; - g_wpfb_extra : t_wpfb_extra := c_wpfb_extra_none; g_dont_flip_channels: boolean := false; -- True preserves channel interleaving for pipelined FFT g_use_prefilter : boolean := TRUE; g_stats_ena : boolean := TRUE; -- Enables the statistics unit @@ -574,8 +573,7 @@ begin generic map( g_fft => c_fft, -- generics for the WFFT g_pft_pipeline => g_wpfb.pft_pipeline, - g_fft_pipeline => g_wpfb.fft_pipeline, - g_r2_mul_extra_w => g_wpfb_extra.r2_mul_extra_w + g_fft_pipeline => g_wpfb.fft_pipeline ) port map( clk => dp_clk, @@ -600,9 +598,7 @@ begin g_instance_index => S, g_fft => c_fft, g_pipeline => g_wpfb.fft_pipeline, - g_dont_flip_channels => g_dont_flip_channels, - g_r2_mul_extra_w => g_wpfb_extra.r2_mul_extra_w, - g_sepa_extra_w => g_wpfb_extra.sepa_extra_w + g_dont_flip_channels => g_dont_flip_channels ) port map( clk => dp_clk,