OpenCores
URL https://opencores.org/ocsvn/astron_filter/astron_filter/trunk

Subversion Repositories astron_filter

[/] [astron_filter/] [trunk/] [tb_tb_fil_ppf_wide.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 danv
--------------------------------------------------------------------------------
2
--
3
-- Copyright (C) 2016
4
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
5
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
6
--
7
-- This program is free software: you can redistribute it and/or modify
8
-- it under the terms of the GNU General Public License as published by
9
-- the Free Software Foundation, either version 3 of the License, or
10
-- (at your option) any later version.
11
--
12
-- This program is distributed in the hope that it will be useful,
13
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-- GNU General Public License for more details.
16
--
17
-- You should have received a copy of the GNU General Public License
18
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
--
20
--------------------------------------------------------------------------------
21
 
22
-- Purpose: Multi-testbench for fil_ppf_wide
23
-- Description:
24
--   Verify fil_ppf_wide
25
-- Usage:
26
--   > as 4
27
--   > run -all
28
 
29
LIBRARY IEEE, common_pkg_lib;
30
USE IEEE.std_logic_1164.ALL;
31
USE common_pkg_lib.common_pkg.all;
32
USE work.fil_pkg.all;
33
 
34
ENTITY tb_tb_fil_ppf_wide IS
35
END tb_tb_fil_ppf_wide;
36
 
37
ARCHITECTURE tb OF tb_tb_fil_ppf_wide IS
38
 
39
  CONSTANT c_fil_ppf_pipeline : t_fil_ppf_pipeline := (1, 1, 1, 1, 1, 1, 0);
40
  CONSTANT c_prefix           : string  := "hex/run_pfir_coeff_m_incrementing";
41
 
42
  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
43
 
44
BEGIN
45
 
46
--g_big_endian_wb_in  : boolean := true;
47
--g_big_endian_wb_out : boolean := true;
48
--g_fil_ppf_pipeline : t_fil_ppf_pipeline := (1, 1, 1, 1, 1, 1, 0);
49
--  -- type t_fil_pipeline is record
50
--  --   -- generic for the taps and coefficients memory
51
--  --   mem_delay      : natural;  -- = 2
52
--  --   -- generics for the multiplier in in the filter unit
53
--  --   mult_input     : natural;  -- = 1
54
--  --   mult_product   : natural;  -- = 1
55
--  --   mult_output    : natural;  -- = 1
56
--  --   -- generics for the adder tree in in the filter unit
57
--  --   adder_stage    : natural;  -- = 1
58
--  --   -- generics for the requantizer in the filter unit
59
--  --   requant_remove_lsb : natural;  -- = 1
60
--  --   requant_remove_msb : natural;  -- = 0
61
--  -- end record;
62
--g_fil_ppf : t_fil_ppf := (1, 1, 64, 8, 1, 8, 20, 16);
63
--  -- type t_fil_ppf is record
64
--  --   wb_factor      : natural; -- = 1, the wideband factor
65
--  --   nof_chan       : natural; -- = default 0, defines the number of channels (=time-multiplexed input signals): nof channels = 2**nof_chan
66
--  --   nof_bands      : natural; -- = 128, the number of polyphase channels (= number of points of the FFT)
67
--  --   nof_taps       : natural; -- = 16, the number of FIR taps per subband
68
--  --   nof_streams    : natural; -- = 1, the number of streams that are served by the same coefficients.
69
--  --   backoff_w      : natural; -- = 0, number of bits for input backoff to avoid output overflow
70
--  --   in_dat_w       : natural; -- = 8, number of input bits per stream
71
--  --   out_dat_w      : natural; -- = 23, number of output bits (per stream). It is set to in_dat_w+coef_dat_w-1 = 23 to be sure the requantizer
72
--  --                                  does not remove any of the data in order to be able to verify with the original coefficients values.
73
--  --   coef_dat_w     : natural; -- = 16, data width of the FIR coefficients
74
--  -- end record;
75
--g_coefs_file_prefix  : string  := "hex/run_pfir_coeff_m_incrementing";
76
--g_enable_in_val_gaps : boolean := FALSE
77
 
78
  -- verify fil_ppf_wide for wb_factor=1, so effectively same as using fil_ppf_single directly
79
  u1_act           : ENTITY work.tb_fil_ppf_wide GENERIC MAP (TRUE, TRUE, (1, 1, 1, 1, 1, 1, 0), (1, 0, 64, 8, 1, 0, 8, 23, 16), c_prefix, FALSE);
80
  u1_rnd_quant     : ENTITY work.tb_fil_ppf_wide GENERIC MAP (TRUE, TRUE, (1, 1, 1, 1, 1, 1, 0), (1, 0, 64, 8, 1, 0, 8, 16, 16), c_prefix, TRUE);
81
  u1_rnd_9taps     : ENTITY work.tb_fil_ppf_wide GENERIC MAP (TRUE, TRUE, (1, 1, 1, 1, 1, 1, 0), (1, 0, 64, 9, 1, 0, 8, 17, 16), c_prefix, TRUE);
82
  u1_rnd_3streams  : ENTITY work.tb_fil_ppf_wide GENERIC MAP (TRUE, TRUE, (1, 1, 1, 1, 1, 1, 0), (1, 0, 64, 9, 3, 0, 8, 18, 16), c_prefix, TRUE);
83
  u1_rnd_4channels : ENTITY work.tb_fil_ppf_wide GENERIC MAP (TRUE, TRUE, (1, 1, 1, 1, 1, 1, 0), (1, 2, 64, 9, 3, 0, 8, 22, 16), c_prefix, TRUE);
84
 
85
  -- verify fil_ppf_wide for wb_factor>1
86
  u4_act           : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE,  TRUE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 8, 1, 0, 8, 23, 16), c_prefix, FALSE);
87
  u4_act_be_le     : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE, FALSE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 8, 1, 0, 8, 23, 16), c_prefix, FALSE);
88
  u4_act_le_le     : ENTITY work.tb_fil_ppf_wide GENERIC MAP (FALSE, FALSE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 8, 1, 0, 8, 23, 16), c_prefix, FALSE);
89
  u4_rnd_quant     : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE,  TRUE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 8, 1, 0, 8, 16, 16), c_prefix, TRUE);
90
  u4_rnd_9taps     : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE,  TRUE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 9, 1, 0, 8, 17, 16), c_prefix, TRUE);
91
  u4_rnd_3streams  : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE,  TRUE, (1, 1, 1, 1, 1, 1, 0), (4, 0, 64, 9, 3, 0, 8, 18, 16), c_prefix, TRUE);
92
  u4_rnd_4channels : ENTITY work.tb_fil_ppf_wide GENERIC MAP ( TRUE,  TRUE, (1, 1, 1, 1, 1, 1, 0), (4, 2, 64, 9, 3, 0, 8, 22, 16), c_prefix, TRUE);
93
 
94
END tb;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.