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

Subversion Repositories special_functions_unit

[/] [special_functions_unit/] [Open_source_SFU/] [exp2_vhdl/] [parts/] [exp2_luts_64x23b.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 divadnauj
-----------------------------------------------------------------------------   
2
-- constantes en complemento a dos
3
 
4
library ieee;
5
        use ieee.std_logic_1164.all;
6
        use ieee.numeric_std.all;
7
        use work.log2_pkg.all;
8
 
9
 
10
entity exp2_luts_64x23b is
11
        generic (SEG                                            :               natural := 64);
12
        port      (i_lutA_addr                          : in    std_logic_vector(4 downto 0); -- f_log2(SEG)-1 downto 0)
13
                                i_lutB_addr                             : in std_logic_vector(4 downto 0); -- f_log2(SEG)-1 downto 0)
14
                                o_lutA                                  : out std_logic_vector(22 downto 0);
15
                                o_lutB                                  : out std_logic_vector(22 downto 0));
16
end entity;
17
 
18
 
19
architecture arch of exp2_luts_64x23b is
20
 
21
signal s_lutA_addr :integer;
22
signal s_lutB_addr :integer;
23
 
24
begin
25
        s_lutA_addr <=to_integer(unsigned(i_lutA_addr));
26
        s_lutB_addr <=to_integer(unsigned(i_lutB_addr));
27
 
28
        luts: process(s_lutA_addr, s_lutB_addr) -- i_lutA_addr  : in    std_logic_vector(3 downto 0);
29
        begin
30
                case s_lutA_addr is
31
                when 0 => o_lutA <= "00000000000000000000000";
32
                when 1 => o_lutA        <= "11111101100110100110011";
33
                when 2 => o_lutA        <= "11111011010101001101110";
34
                when 3 => o_lutA        <= "11111001001011110110111";
35
                when 4 => o_lutA        <= "11110111001010101101001";
36
                when 5 => o_lutA        <= "11110101010001111011110";
37
                when 6 => o_lutA        <= "11110011100001101110110";
38
                when 7 => o_lutA        <= "11110001111010010010000";
39
                when 8 => o_lutA        <= "11110000011011110001111";
40
                when 9 => o_lutA        <= "11101111000110011010110";
41
                when 10=> o_lutA        <= "11101101111010011001101";
42
                when 11=> o_lutA        <= "11101100110111111011011";
43
                when 12=> o_lutA        <= "11101011111111001101100";
44
                when 13=> o_lutA        <= "11101011010000011101110";
45
                when 14=> o_lutA        <= "11101010101011111010000";
46
                when 15=> o_lutA        <= "11101010010001110000100";
47
                when 16 => o_lutA       <= "11101010000010001111111";
48
                when 17 => o_lutA       <= "11101001111101100111001";
49
                when 18 => o_lutA       <= "11101010000100000101011";
50
                when 19 => o_lutA       <= "11101010010101111010001";
51
                when 20 => o_lutA       <= "11101010110011010101100";
52
                when 21 => o_lutA       <= "11101011011100100111100";
53
                when 22 => o_lutA       <= "11101100010010000001000";
54
                when 23 => o_lutA       <= "11101101010011110010111";
55
                when 24 => o_lutA       <= "11101110100010001110011";
56
                when 25 => o_lutA       <= "11101111111101100101011";
57
                when 26=> o_lutA        <= "11110001100110001001111";
58
                when 27=> o_lutA        <= "11110011011100001110100";
59
                when 28=> o_lutA        <= "11110101100000000110001";
60
                when 29=> o_lutA        <= "11110111110010000100000";
61
                when 30=> o_lutA        <= "11111010010010011100000";
62
                when 31=> o_lutA        <= "11111101000001100010010";
63
                when others => o_lutA <= "00000000000000000000000";
64
                end case;
65
 
66
                case s_lutB_addr is
67
                when 0 => o_lutB <= "11111110110010001111111";
68
                when 1 => o_lutB        <= "11111100011100111010100";
69
                when 2 => o_lutB        <= "11111010001111100001011";
70
                when 3 => o_lutB        <= "11111000001010001111101";
71
                when 4 => o_lutB        <= "11110110001101010000101";
72
                when 5 => o_lutB        <= "11110100011000110000000";
73
                when 6 => o_lutB        <= "11110010101100111001101";
74
                when 7 => o_lutB        <= "11110001001001111001101";
75
                when 8 => o_lutB        <= "11101111101111111100011";
76
                when 9 => o_lutB        <= "11101110011111001110101";
77
                when 10=> o_lutB        <= "11101101010111111101010";
78
                when 11=> o_lutB        <= "11101100011010010101101";
79
                when 12=> o_lutB        <= "11101011100110100101000";
80
                when 13=> o_lutB        <= "11101010111100111001100";
81
                when 14=> o_lutB        <= "11101010011101100001001";
82
                when 15=> o_lutB        <= "11101010001000101010001";
83
                when 16 => o_lutB       <= "11101001111110100011101";
84
                when 17 => o_lutB       <= "11101001111111011100011";
85
                when 18 => o_lutB       <= "11101010001011100011111";
86
                when 19 => o_lutB       <= "11101010100011001010000";
87
                when 20 => o_lutB       <= "11101011000110011110101";
88
                when 21 => o_lutB       <= "11101011110101110010010";
89
                when 22 => o_lutB       <= "11101100110001010101110";
90
                when 23 => o_lutB       <= "11101101111001011010010";
91
                when 24 => o_lutB       <= "11101111001110010001010";
92
                when 25 => o_lutB       <= "11110000110000001100110";
93
                when 26=> o_lutB        <= "11110010011111011111000";
94
                when 27=> o_lutB        <= "11110100011100011010110";
95
                when 28=> o_lutB        <= "11110110100111010011000";
96
                when 29=> o_lutB        <= "11111001000000011011100";
97
                when 30=> o_lutB        <= "11111011101000001000001";
98
                when 31=> o_lutB        <= "11111110011110101101010";
99
                when others => o_lutB <= "00000000000000000000000";
100
                end case;
101
 
102
        end process;
103
end arch;

powered by: WebSVN 2.1.0

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