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

Subversion Repositories adaptive_lms_equalizer

[/] [adaptive_lms_equalizer/] [trunk/] [code/] [ch_filt_tap.vhd] - Blame information for rev 5

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.5
19
-- simple logic for filter tap operation optimized for the fact that 
20
-- that there are only two possible data at input
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
 
29
entity ch_filt_tap is
30
    Port ( din : in std_logic_vector(7 downto 0);
31
           dout : out std_logic_vector(7 downto 0);
32
           c1_in : in std_logic_vector(7 downto 0);
33
           c2_in : in std_logic_vector(7 downto 0);
34
           add_in : in std_logic_vector(7 downto 0);
35
           add_out : out std_logic_vector(7 downto 0);
36
           clock : in std_logic);
37
end ch_filt_tap;
38
 
39
architecture Behavioral of ch_filt_tap is
40
 
41
signal mul_res:std_logic_vector(7 downto 0);
42
 
43
begin
44
        shift_process:
45
        process (clock)
46
        begin
47
                if(clock'event and clock = '1') then
48
                        dout <= din;
49
                end if;
50
        end process;
51
 
52
 
53
        with din select
54
        mul_res <= c1_in when "11000000",        -- -1
55
                         c2_in when others;              -- +1
56
 
57
        add_out <= add_in + mul_res;
58
 
59
end Behavioral;

powered by: WebSVN 2.1.0

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