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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [sqrtdiv/] [shift.vhd] - Diff between revs 60 and 67

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

Rev 60 Rev 67
Line 27... Line 27...
use ieee.std_logic_arith.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_signed.all;
use ieee.std_logic_signed.all;
use ieee.math_real.all;
use ieee.math_real.all;
 
 
 
 
 
--! \brief Dado que cualquier número entero A, se puede escribir 2^n * f, es importante obtener una representación del valor de f en base 2. Una vez hallado este valor y evaluado en una función bastara con realizar un corrimiento a la izquierda n bits del resultado, para calcular funciones como A^-1 o A^0.5.
entity shifter is
entity shifter is
        generic (
        generic (
                address_width   : integer       := 9;
                address_width   : integer       := 9;
                width                   : integer       := 32;
                width                   : integer       := 32;
                even_shifter    : string        := "YES"
                even_shifter    : string        := "YES"
Line 44... Line 45...
        );
        );
end shifter;
end shifter;
 
 
architecture shifter_arch of shifter is
architecture shifter_arch of shifter is
 
 
        -- signal datamask : std_logic_vector(width+address_width-1 downto 0);
 
begin
begin
        -- datamask (width+address_width-1 downto address_width) <= data(width-1 downto 0);
 
        -- datamask (address_width-1 downto 0) <= (others=>'0');
 
 
 
        sanityLost:
        sanityLost:
        process (data)
        process (data)
                variable index: integer range-1 to width+address_width-1:=width+address_width-1;
                variable index: integer range-1 to width+address_width-1:=width+address_width-1;
 
 
Line 84... Line 82...
 
 
 
 
 
 
 
 
        end process sanityLost;
        end process sanityLost;
        -- process (data)
 
        -- begin
 
                -- if data=0 then
 
                        -- zero<='1';
 
                -- else
 
                        -- zero<='0';
 
                -- end if;
 
        -- end process;
 
 
 
end shifter_arch;
end shifter_arch;
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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