⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filter.vhd

📁 用verilog实现滤波器的功能
💻 VHD
📖 第 1 页 / 共 3 页
字号:
-- ----------------------------------------------------------------- Module: filter---- Generated by MATLAB(R) 7.0.4 and the Filter Design HDL Coder 1.2.---- Generated on: 2005-11-03 18:55:40---- --------------------------------------------------------------- --------------------------------------------------------------- HDL Code Generation Options:---- TargetLanguage: VHDL-- AddInputRegister: Off-- TestBenchStimulus: impulse step ramp chirp noise ---- Filter Settings:---- Discrete-Time FIR Filter (real)-- --------------------------------- Filter Structure  : Direct-Form FIR-- Filter Length     : 51-- Stable            : Yes-- Linear Phase      : Yes (Type 1)-- Arithmetic        : fixed-- Numerator         : s16,16 -> [-5.000000e-001 5.000000e-001)-- Input             : s16,15 -> [-1 1)-- Filter Internals  : Specify Precision--   Output          : s16,31 -> [-1.525879e-005 1.525879e-005)--   Product         : s32,31 -> [-1 1)--   Accumulator     : s40,31 -> [-256 256)--   Round Mode      : floor--   Overflow Mode   : saturate-- -------------------------------------------------------------LIBRARY IEEE;USE IEEE.std_logic_1164.all;USE IEEE.numeric_std.ALL;ENTITY filter IS   PORT( clk                             :   IN    std_logic;          clk_enable                      :   IN    std_logic;          reset                           :   IN    std_logic;          filter_in                       :   IN    std_logic_vector(15 DOWNTO 0); -- sfix16_En15         filter_out                      :   OUT   std_logic_vector(15 DOWNTO 0)  -- sfix16_En31         );END filter;------------------------------------------------------------------Module Architecture: filter----------------------------------------------------------------ARCHITECTURE rtl OF filter IS  -- Local Functions  -- Type Definitions  TYPE delay_pipeline_type IS ARRAY (NATURAL range <>) OF signed(15 DOWNTO 0); -- sfix16_En15  -- Constants  CONSTANT coeff1                         : signed(15 DOWNTO 0) := to_signed(-60, 16); -- sfix16_En16  CONSTANT coeff2                         : signed(15 DOWNTO 0) := to_signed(-178, 16); -- sfix16_En16  CONSTANT coeff3                         : signed(15 DOWNTO 0) := to_signed(-163, 16); -- sfix16_En16  CONSTANT coeff4                         : signed(15 DOWNTO 0) := to_signed(240, 16); -- sfix16_En16  CONSTANT coeff5                         : signed(15 DOWNTO 0) := to_signed(895, 16); -- sfix16_En16  CONSTANT coeff6                         : signed(15 DOWNTO 0) := to_signed(1137, 16); -- sfix16_En16  CONSTANT coeff7                         : signed(15 DOWNTO 0) := to_signed(502, 16); -- sfix16_En16  CONSTANT coeff8                         : signed(15 DOWNTO 0) := to_signed(-430, 16); -- sfix16_En16  CONSTANT coeff9                         : signed(15 DOWNTO 0) := to_signed(-504, 16); -- sfix16_En16  CONSTANT coeff10                        : signed(15 DOWNTO 0) := to_signed(400, 16); -- sfix16_En16  CONSTANT coeff11                        : signed(15 DOWNTO 0) := to_signed(909, 16); -- sfix16_En16  CONSTANT coeff12                        : signed(15 DOWNTO 0) := to_signed(23, 16); -- sfix16_En16  CONSTANT coeff13                        : signed(15 DOWNTO 0) := to_signed(-1108, 16); -- sfix16_En16  CONSTANT coeff14                        : signed(15 DOWNTO 0) := to_signed(-584, 16); -- sfix16_En16  CONSTANT coeff15                        : signed(15 DOWNTO 0) := to_signed(1143, 16); -- sfix16_En16  CONSTANT coeff16                        : signed(15 DOWNTO 0) := to_signed(1360, 16); -- sfix16_En16  CONSTANT coeff17                        : signed(15 DOWNTO 0) := to_signed(-806, 16); -- sfix16_En16  CONSTANT coeff18                        : signed(15 DOWNTO 0) := to_signed(-2244, 16); -- sfix16_En16  CONSTANT coeff19                        : signed(15 DOWNTO 0) := to_signed(-68, 16); -- sfix16_En16  CONSTANT coeff20                        : signed(15 DOWNTO 0) := to_signed(3132, 16); -- sfix16_En16  CONSTANT coeff21                        : signed(15 DOWNTO 0) := to_signed(1793, 16); -- sfix16_En16  CONSTANT coeff22                        : signed(15 DOWNTO 0) := to_signed(-3891, 16); -- sfix16_En16  CONSTANT coeff23                        : signed(15 DOWNTO 0) := to_signed(-5394, 16); -- sfix16_En16  CONSTANT coeff24                        : signed(15 DOWNTO 0) := to_signed(4403, 16); -- sfix16_En16  CONSTANT coeff25                        : signed(15 DOWNTO 0) := to_signed(20317, 16); -- sfix16_En16  CONSTANT coeff26                        : signed(15 DOWNTO 0) := to_signed(28184, 16); -- sfix16_En16  CONSTANT coeff27                        : signed(15 DOWNTO 0) := to_signed(20317, 16); -- sfix16_En16  CONSTANT coeff28                        : signed(15 DOWNTO 0) := to_signed(4403, 16); -- sfix16_En16  CONSTANT coeff29                        : signed(15 DOWNTO 0) := to_signed(-5394, 16); -- sfix16_En16  CONSTANT coeff30                        : signed(15 DOWNTO 0) := to_signed(-3891, 16); -- sfix16_En16  CONSTANT coeff31                        : signed(15 DOWNTO 0) := to_signed(1793, 16); -- sfix16_En16  CONSTANT coeff32                        : signed(15 DOWNTO 0) := to_signed(3132, 16); -- sfix16_En16  CONSTANT coeff33                        : signed(15 DOWNTO 0) := to_signed(-68, 16); -- sfix16_En16  CONSTANT coeff34                        : signed(15 DOWNTO 0) := to_signed(-2244, 16); -- sfix16_En16  CONSTANT coeff35                        : signed(15 DOWNTO 0) := to_signed(-806, 16); -- sfix16_En16  CONSTANT coeff36                        : signed(15 DOWNTO 0) := to_signed(1360, 16); -- sfix16_En16  CONSTANT coeff37                        : signed(15 DOWNTO 0) := to_signed(1143, 16); -- sfix16_En16  CONSTANT coeff38                        : signed(15 DOWNTO 0) := to_signed(-584, 16); -- sfix16_En16  CONSTANT coeff39                        : signed(15 DOWNTO 0) := to_signed(-1108, 16); -- sfix16_En16  CONSTANT coeff40                        : signed(15 DOWNTO 0) := to_signed(23, 16); -- sfix16_En16  CONSTANT coeff41                        : signed(15 DOWNTO 0) := to_signed(909, 16); -- sfix16_En16  CONSTANT coeff42                        : signed(15 DOWNTO 0) := to_signed(400, 16); -- sfix16_En16  CONSTANT coeff43                        : signed(15 DOWNTO 0) := to_signed(-504, 16); -- sfix16_En16  CONSTANT coeff44                        : signed(15 DOWNTO 0) := to_signed(-430, 16); -- sfix16_En16  CONSTANT coeff45                        : signed(15 DOWNTO 0) := to_signed(502, 16); -- sfix16_En16  CONSTANT coeff46                        : signed(15 DOWNTO 0) := to_signed(1137, 16); -- sfix16_En16  CONSTANT coeff47                        : signed(15 DOWNTO 0) := to_signed(895, 16); -- sfix16_En16  CONSTANT coeff48                        : signed(15 DOWNTO 0) := to_signed(240, 16); -- sfix16_En16  CONSTANT coeff49                        : signed(15 DOWNTO 0) := to_signed(-163, 16); -- sfix16_En16  CONSTANT coeff50                        : signed(15 DOWNTO 0) := to_signed(-178, 16); -- sfix16_En16  CONSTANT coeff51                        : signed(15 DOWNTO 0) := to_signed(-60, 16); -- sfix16_En16  -- Signals  SIGNAL delay_pipeline                   : delay_pipeline_type(0 TO 49); -- sfix16_En15  SIGNAL filter_in_regtype                : signed(15 DOWNTO 0); -- sfix16_En15  SIGNAL product51                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product50                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product49                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product48                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product47                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product46                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product45                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product44                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product43                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product42                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product41                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product40                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product39                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product38                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product37                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product36                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product35                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product34                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product33                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product32                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product31                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product30                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product29                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product28                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product27                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product26                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product25                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product24                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product23                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product22                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product21                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product20                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product19                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product18                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product17                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product16                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product15                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product14                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product13                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product12                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product11                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product10                        : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product9                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product8                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product7                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product6                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product5                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product4                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product3                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product2                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL product1                         : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL mul_temp                         : signed(31 DOWNTO 0); -- sfix32_En31  SIGNAL sum1                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp                         : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum2                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_1                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum3                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_2                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum4                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_3                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum5                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_4                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum6                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_5                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum7                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_6                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum8                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_7                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum9                             : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_8                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum10                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_9                       : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum11                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_10                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum12                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_11                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum13                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_12                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum14                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_13                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum15                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_14                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum16                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_15                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum17                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_16                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum18                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_17                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum19                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_18                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum20                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_19                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum21                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_20                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum22                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_21                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum23                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_22                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum24                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_23                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum25                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_24                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum26                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_25                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum27                            : signed(39 DOWNTO 0); -- sfix40_En31  SIGNAL add_temp_26                      : signed(40 DOWNTO 0); -- sfix41_En31  SIGNAL sum28                            : signed(39 DOWNTO 0); -- sfix40_En31

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -