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

Pass on g_round_even = true default, to support using false for golden...

Pass on g_round_even = true default, to support using false for golden reference results in tb_fil_ppf_wide_file_data.vhd.
parent 2abc85ae
No related branches found
No related tags found
1 merge request!244Pass on g_round_even = true default, to support using false for golden...
......@@ -38,7 +38,8 @@ entity fil_ppf_filter is
generic (
g_technology : NATURAL := c_tech_select_default;
g_fil_ppf : t_fil_ppf;
g_fil_ppf_pipeline : t_fil_ppf_pipeline
g_fil_ppf_pipeline : t_fil_ppf_pipeline;
g_round_even : boolean := true
);
port (
clk : in std_logic;
......@@ -117,12 +118,13 @@ begin
sum => adder_out
);
u_requantize_addeer_output : entity common_lib.common_requantize
u_requantize_adder_output : entity common_lib.common_requantize
generic map (
g_representation => "SIGNED",
g_lsb_w => c_ppf_lsb_w,
g_lsb_round => TRUE,
g_lsb_round_clip => FALSE,
g_lsb_round_even => g_round_even,
g_msb_clip => FALSE,
g_msb_clip_symmetric => FALSE,
g_pipeline_remove_lsb => g_fil_ppf_pipeline.requant_remove_lsb,
......
......@@ -73,7 +73,8 @@ use work.fil_pkg.ALL;
entity fil_ppf_single is
generic (
g_fil_ppf : t_fil_ppf := c_fil_ppf;
g_fil_ppf_pipeline : t_fil_ppf_pipeline := c_fil_ppf_pipeline;
g_fil_ppf_pipeline : t_fil_ppf_pipeline := c_fil_ppf_pipeline;
g_round_even : boolean := true;
g_file_index_arr : t_nat_natural_arr := array_init(0, 128, 1); -- default use the instance index as file index 0, 1, 2, 3, 4 ...
g_coefs_file_prefix : string := "hex/coef" -- Relative path to the mif files that contain the initial data for the coefficients memories
); -- The sequence number and ".mif"-extension are added within the entity.
......@@ -234,7 +235,8 @@ begin
u_filter : entity work.fil_ppf_filter
generic map (
g_fil_ppf_pipeline => g_fil_ppf_pipeline,
g_fil_ppf => g_fil_ppf
g_fil_ppf => g_fil_ppf,
g_round_even => g_round_even
)
port map (
clk => dp_clk,
......
......@@ -121,6 +121,7 @@ entity fil_ppf_wide is
g_big_endian_wb_out : boolean := false;
g_fil_ppf : t_fil_ppf := c_fil_ppf;
g_fil_ppf_pipeline : t_fil_ppf_pipeline := c_fil_ppf_pipeline;
g_round_even : boolean := true;
g_coefs_file_prefix : string := "../../data/coef" -- Relative path to the mif files that contain the FIR the coefficients
-- The sequence number and ".mif"-extension are added within the entity.
);
......@@ -235,6 +236,7 @@ begin
generic map (
g_fil_ppf => c_fil_ppf_arr(P),
g_fil_ppf_pipeline => g_fil_ppf_pipeline,
g_round_even => g_round_even,
g_file_index_arr => c_file_index_arr2(P), -- use (g_fil_ppf.wb_factor-1 - P) to try impact of reversed WB FIR coefficients
g_coefs_file_prefix => g_coefs_file_prefix
)
......
......@@ -131,6 +131,7 @@ architecture tb of tb_fil_ppf_wide_file_data is
constant c_clk_period : time := 10 ns;
constant c_sclk_period : time := c_clk_period / g_fil_ppf.wb_factor;
constant c_round_even : boolean := false; -- golden reference data is for round half away from zero
constant c_diff_margin : integer := 0; -- maximum difference between PFIR HDL output and expected output (> 0 to allow minor rounding differences)
constant c_nof_channels : natural := 2**g_fil_ppf.nof_chan;
......@@ -285,6 +286,7 @@ begin
g_big_endian_wb_out => g_big_endian_wb_out,
g_fil_ppf => g_fil_ppf,
g_fil_ppf_pipeline => g_fil_ppf_pipeline,
g_round_even => c_round_even,
g_coefs_file_prefix => c_coefs_mif_file_prefix
)
port map (
......@@ -489,4 +491,4 @@ begin
end if;
end process;
end tb;
\ No newline at end of file
end tb;
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