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

Subversion Repositories fp_log

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

Go to most recent revision | 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 (7 downto 0);
32
           output_val : out  STD_LOGIC_VECTOR (6 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_254 : std_logic_vector(7 downto 0):="11111110";
39
signal under_127_vec , greater_127_vec : std_logic_vector(6 downto 0);
40
signal tmp_val : std_logic_Vector(7 downto 0);
41
begin
42
 
43
under_127_vec<=(others=>not input_val(7));
44
greater_127_vec<=(others=>input_val(7));
45
get_negative_val<=input_val(7);
46
tmp_val <= value_254 - input_val;
47
 
48
output_val <= (tmp_val(6 downto 0) and greater_127_vec) or (input_val(6 downto 0) and under_127_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.