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

Subversion Repositories adaptive_lms_equalizer

[/] [adaptive_lms_equalizer/] [trunk/] [code/] [tf_lms.vhd] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 digish
--  Copyright (C) 2004-2005 Digish Pandya <digish.pandya@gmail.com>
2
 
3
--  This program is free software; you can redistribute it and/or modify
4
--  it under the terms of the GNU General Public License as published by
5
--  the Free Software Foundation; either version 2 of the License, or
6
--  (at your option) any later version.
7
--
8
--  This program is distributed in the hope that it will be useful,
9
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
--  GNU General Public License for more details.
12
--
13
--  You should have received a copy of the GNU General Public License
14
--  along with this program; if not, write to the Free Software
15
--  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 
17
 
18
-- A.6 tf_lms.vhd
19
-- Adaptive equalizer routine
20
-- 
21
 
22
library IEEE;
23
use IEEE.STD_LOGIC_1164.ALL;
24
use IEEE.STD_LOGIC_ARITH.ALL;
25
use IEEE.STD_LOGIC_SIGNED.ALL;
26
 
27
 
28
entity tf_lms is
29
    Port (
30
                 xin : in std_logic_vector(7 downto 0);    -- data input
31
                 dxin : in std_logic_vector(7 downto 0);  -- desired response input
32
           clock : in std_logic;                                  -- clock
33
                 err:out std_logic_vector(7 downto 0);     -- error output
34
           yout : out std_logic_vector(7 downto 0); -- output data               
35
                 adapt_en: in std_logic                           -- enable adaption
36
             );
37
end tf_lms;
38
 
39
architecture structural of tf_lms is
40
 
41
        -- filter core 
42
        component core_filt
43
            Port (
44
                         x_in : in std_logic_vector(7 downto 0);
45
                   x_N_in : in std_logic_vector(7 downto 0);
46
                   ue_in : in std_logic_vector(7 downto 0);
47
                   clock : in std_logic;
48
                   y_out : out std_logic_vector(7 downto 0));
49
        end component ;
50
 
51
        -- shift regesters
52
        component shift_21d
53
            Port ( xin : in std_logic_vector(7 downto 0);
54
                   x_N_out : out std_logic_vector(7 downto 0);
55
                         x_1_out : out std_logic_vector(7 downto 0);
56
                   clock : in std_logic);
57
        end component;
58
 
59
        component shift_20d
60
            Port ( xin : in std_logic_vector(7 downto 0);
61
                   xout : out std_logic_vector(7 downto 0);
62
                   clock : in std_logic);
63
        end component;
64
 
65
        signal e,e_t,y_o,x_1,x_N:std_logic_vector(7 downto 0);
66
 
67
begin
68
 
69
        -- if Adaption is not enabled then ERROR signal is ZERO
70
        with adapt_en select
71
                e <= y_o - e_t when '1',
72
                        "00000000" when others;
73
 
74
        err <= e;
75
 
76
        shift_1:shift_20d
77
                port map (
78
                                  xin => dxin,
79
                                  xout => e_t,
80
                                  clock => clock
81
                            );
82
 
83
        shift_2:shift_21d
84
                port map (
85
                                  xin => xin,
86
                                  x_N_out =>x_N,
87
                                  x_1_out =>x_1,
88
                                  clock => clock
89
                            );
90
 
91
        cflt: core_filt
92
                port map (
93
                               x_in   => x_1,
94
                               x_N_in => x_N,
95
                                  ue_in  => e,
96
                                  y_out  => y_o,
97
                                  clock  => clock
98
                    );
99
 
100
        yout <= y_o;
101
end structural;

powered by: WebSVN 2.1.0

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