diff --git a/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd b/libraries/dsp/verify_pfb/tb_verify_pfb_wg.vhd index d8ea9478d0881cacbb03fcc97b2193437f169e54..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: @@ -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);