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

Subversion Repositories fp_log

[/] [fp_log/] [trunk/] [LAU/] [Virtex 5/] [DP-LAU/] [get_exp_LUT_index.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 NikosAl
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    16:25:14 06/22/2009 
6
-- Design Name: 
7
-- Module Name:    get_exp_LUT_index - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity get_exp_LUT_index is
31
    Port ( input_val : in  STD_LOGIC_VECTOR (10 downto 0);
32
           output_val : out  STD_LOGIC_VECTOR (9 downto 0);
33
                          get_negative_val : out std_logic);
34
end get_exp_LUT_index;
35
 
36
architecture Behavioral of get_exp_LUT_index is
37
 
38
constant value_2048 : std_logic_vector(10 downto 0):="11111111110";
39
signal under_1023_vec , greater_1023_vec : std_logic_vector(9 downto 0);
40
signal tmp_val : std_logic_Vector(10 downto 0);
41
begin
42
 
43
under_1023_vec<=(others=>not input_val(10));
44
greater_1023_vec<=(others=>input_val(10));
45
get_negative_val<=input_val(10);
46
tmp_val <= value_2048 - input_val;
47
 
48
output_val <= (tmp_val(9 downto 0) and greater_1023_vec) or (input_val(9 downto 0) and under_1023_vec);
49
end Behavioral;
50
 

powered by: WebSVN 2.1.0

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