Skip to content
Snippets Groups Projects
Commit 1bb0667d authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Removed g_r2_mul_extra_w because it more clear to increase stage_dat_w....

Removed g_r2_mul_extra_w because it more clear to increase stage_dat_w. Removed g_sepa_extra_w because separate rounding is no moved to FFT output requantizer.
parent 486ce720
No related branches found
No related tags found
1 merge request!225Round outside separate function in output quantizer, to avoid more inaccurate...
......@@ -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,7 +97,6 @@ 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_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;
......@@ -176,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,
......@@ -199,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,
......
This diff is collapsed.
......@@ -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
......@@ -979,8 +975,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 +1107,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 (
......
......@@ -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
-----------------------------------------------------------------------------
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment