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

Subversion Repositories fp_log

[/] [fp_log/] [trunk/] [LAU/] [Virtex 4/] [SP-LAU/] [Construct_sp_fp_add_offset.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 NikosAl
----------------------------------------------------------------------------------
2
-- Company: TUM - Technischen Universität München
3
-- Engineer: N.Alachiotis
4
-- 
5
-- Create Date:    14:49:49 06/24/2009 
6
-- Design Name: 
7
-- Module Name:    Construct_sp_fp_add_offset - 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 Construct_sp_fp_add_offset is
31
    Port ( rst : in  STD_LOGIC;
32
           clk : in  STD_LOGIC;
33
           lut_index : in  STD_LOGIC_VECTOR(12 downto 0);
34
           sp_fp_add_offset : out  STD_LOGIC_VECTOR (31 downto 0));
35
end Construct_sp_fp_add_offset;
36
 
37
architecture Behavioral of Construct_sp_fp_add_offset is
38
 
39
component mant_lut_MEM is
40
  port (
41
    clka : in STD_LOGIC := 'X';
42
    addra : in STD_LOGIC_VECTOR ( 11 downto 0 );
43
    douta : out STD_LOGIC_VECTOR ( 26 downto 0 )
44
  );
45
end component;
46
 
47
component comp_eq_000000000000 is
48
  port (
49
    sclr : in STD_LOGIC := 'X';
50
    qa_eq_b : out STD_LOGIC;
51
    clk : in STD_LOGIC := 'X';
52
    a : in STD_LOGIC_VECTOR ( 11 downto 0 )
53
  );
54
end component;
55
 
56
component reg_32b_1c is
57
  port (
58
    sclr : in STD_LOGIC := 'X';
59
    clk : in STD_LOGIC := 'X';
60
    d : in STD_LOGIC_VECTOR ( 31 downto 0 );
61
    q : out STD_LOGIC_VECTOR ( 31 downto 0 )
62
  );
63
end component;
64
 
65
signal eq_000000000000 : std_logic;
66
 
67
signal mant_lut_addra : std_logic_vector(11 downto 0);
68
signal mant_lut_dout : std_logic_vector(26 downto 0);
69
 
70
signal sp_fp_val_offset , sp_fp_val_offset_reg: std_logic_vector(31 downto 0);
71
 
72
begin
73
 
74
-- Mantissa Look Up Table
75
mant_lut_addra(11 downto 1) <= lut_index(12 downto 2);
76
mant_lut_addra(0) <= lut_index(1);
77
 
78
mant_lut_MEM_port_map:  mant_lut_MEM port map (clk,mant_lut_addra,mant_lut_dout);
79
 
80
-- Comparator for the MSBs of mantLUT dout
81
comp_eq_000000000000_port_map : comp_eq_000000000000 port map (rst, eq_000000000000 , clk , lut_index(12 downto 1));
82
 
83
sp_fp_val_offset(31 downto 30) <= "00";
84
sp_fp_val_offset(29 downto 27) <=(others=>not eq_000000000000);
85
sp_fp_val_offset(26 downto 0) <= mant_lut_dout;
86
 
87
-- Output Register
88
 
89
reg_32b_1c_port_map : reg_32b_1c port map (rst, clk, sp_fp_val_offset , sp_fp_add_offset);
90
 
91
 
92
 
93
end Behavioral;
94
 

powered by: WebSVN 2.1.0

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