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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [adder.vhd] - Diff between revs 52 and 67

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 52 Rev 67
Line 35... Line 35...
                result  : out std_logic_vector(width-1 downto 0);
                result  : out std_logic_vector(width-1 downto 0);
                cout    : out std_logic
                cout    : out std_logic
        );
        );
end adder;
end adder;
 
 
--! @brief arquitectura del sumador
--! @brief      Arquitectura del sumador
architecture adder_arch of adder is
architecture adder_arch of adder is
 
 
        signal sa,p,g:  std_logic_vector(width-1 downto 0);
        signal sa,p,g:  std_logic_vector(width-1 downto 0);
        signal sCarry:  std_logic_vector(width downto 1);
        signal sCarry:  std_logic_vector(width downto 1);
 
 
Line 64... Line 64...
        cout <= sCarry(width);
        cout <= sCarry(width);
        g<= sa and b;
        g<= sa and b;
        p<= sa or b;
        p<= sa or b;
 
 
 
 
        --! Si se configura una se&ntilde;al para seleccionar entre suma y resta, se generar&oacute; el circuito a continuaci&oacute;n.
        --! Si se configura una se&ntilde;al para seleccionar entre suma y resta, se generar&aacute; el circuito a continuaci&oacute;n.
 
 
        adder_sub_logic :       -- adder substractor logic
        adder_sub_logic :       -- adder substractor logic
        if substractor_selector = "YES" generate
        if substractor_selector = "YES" generate
                a_xor_s:
                a_xor_s:
                for i in 0 to width-1 generate
                for i in 0 to width-1 generate

powered by: WebSVN 2.1.0

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