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

Corrected c_pfb_sub_scaling to also depend on g_fil_backoff_w.

parent 1bb0667d
No related branches found
No related tags found
1 merge request!225Round outside separate function in output quantizer, to avoid more inaccurate...
Pipeline #26767 failed
......@@ -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:
......@@ -239,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);
......
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