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

Subversion Repositories astron_filter

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 danv
-------------------------------------------------------------------------------
2
-- Author: Harm Jan Pepping : pepping at astron.nl: 2012
3
-- Copyright (C) 2012
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
library ieee, common_pkg_lib;
23
use IEEE.std_logic_1164.all;
24
use common_pkg_lib.common_pkg.all;
25
 
26
package fil_pkg is
27
 
28
  -- Parameters for the (wideband) poly phase filter. 
29
  type t_fil_ppf is record
30
    wb_factor      : natural; -- = 1, the wideband factor
31
    nof_chan       : natural; -- = default 0, defines the number of channels (=time-multiplexed input signals): nof channels = 2**nof_chan 
32
    nof_bands      : natural; -- = 1024, the number of polyphase channels (= number of points of the FFT)
33
    nof_taps       : natural; -- = 16, the number of FIR taps per subband
34
    nof_streams    : natural; -- = 1, the number of streams that are served by the same coefficients.
35
    backoff_w      : natural; -- = 0, number of bits for input backoff to avoid output overflow
36
    in_dat_w       : natural; -- = 8, number of input bits per stream
37
    out_dat_w      : natural; -- = 16, number of output bits per stream
38
    coef_dat_w     : natural; -- = 16, data width of the FIR coefficients
39
  end record;
40
 
41
  constant c_fil_ppf : t_fil_ppf := (1, 0, 1024, 16, 1, 0, 8, 16, 16);
42
 
43
  -- Definitions for fil slv array (an array can not have unconstraint elements, so choose sufficiently wide 32 bit slv elements)
44
  subtype  t_fil_slv_arr is t_slv_32_arr;    -- use subtype to ease interfacing to existing types and to have central definition for filter components
45
  constant c_fil_slv_w   : natural := 32;    -- match slv width of t_fil_slv_arr
46
 
47
  -- Record with the pipeline settings for the filter units. 
48
  type t_fil_ppf_pipeline is record
49
    -- generic for the taps and coefficients memory
50
    mem_delay             : natural;  -- = 1
51
    -- generics for the multiplier in in the filter unit
52
    mult_input            : natural;  -- = 1
53
    mult_product          : natural;  -- = 1
54
    mult_output           : natural;  -- = 1                   
55
    -- generics for the adder tree in in the filter unit
56
    adder_stage           : natural;  -- = 1
57
    -- generics for the requantizer in the filter unit
58
    requant_remove_lsb : natural;  -- = 1
59
    requant_remove_msb : natural;  -- = 0
60
  end record;
61
 
62
  constant c_fil_ppf_pipeline : t_fil_ppf_pipeline := (1, 1, 1, 1, 1, 1, 0);
63
 
64
end package fil_pkg;
65
 
66
package body fil_pkg is
67
end fil_pkg;
68
 

powered by: WebSVN 2.1.0

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