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

Subversion Repositories special_functions_unit

[/] [special_functions_unit/] [Open_source_SFU/] [cordic_vhdl/] [parts/] [suma_resta.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 divadnauj
 
2
-- operacion de suma y resta en flotante.
3
Library IEEE;
4
use ieee.std_logic_1164.all;
5
use ieee.numeric_std.all;
6
--use IEEE.numeric_bit.all;
7
 
8
--use IEEE.STD_LOGIC_ARITH.ALL;
9
 
10
entity suma_resta is
11
generic(
12
                long : natural := 32
13
                );
14
 
15
port(
16
        operando1, operando2: in unsigned(long-1 downto 0);
17
        operacion: in unsigned(3 downto 0);
18
        resultado: out unsigned(long-1 downto 0)
19
        );
20
end suma_resta;
21
 
22
architecture ar of suma_resta is
23
                component prueba is
24
                Port ( FP_A : in  std_logic_vector (31 downto 0);
25
                        FP_B : in  std_logic_vector (31 downto 0);
26
                        add_sub: in std_logic;
27
                        FP_Z : out  std_logic_vector (31 downto 0));
28
        end component;
29
 
30
begin
31
 
32
        P2: prueba port map(
33
                                FP_A =>STD_LOGIC_VECTOR(operando1),
34
                                FP_B =>STD_LOGIC_VECTOR(operando2),
35
                                add_sub =>operacion(0),
36
                                unsigned(FP_Z) =>resultado
37
                                );
38
end ar;
39
 
40
 
41
 
42
 
43
 
44
 
45
 
46
 
47
 
48
 
49
 
50
 
51
 
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
 
67
 
68
 
69
 
70
 
71
 

powered by: WebSVN 2.1.0

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