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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [sqrtdiv/] [RLshifter.vhd] - Diff between revs 71 and 72

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

Rev 71 Rev 72
Line 33... Line 33...
 
 
 
 
 
 
entity RLshifter is
entity RLshifter is
        generic (
        generic (
                shiftFunction   : string  := "INVERSION";
                shiftFunction   : string  := "SQUARE_ROOT";
                mantissa_width  : integer := 18;
                mantissa_width  : integer := 18;
                width                   : integer := 32
                width                   : integer := 32
 
 
        );
        );
        port (
        port (
Line 57... Line 57...
        begin
        begin
                expi:= conv_integer(exp);
                expi:= conv_integer(exp);
 
 
                for i in width-1 downto 0 loop
                for i in width-1 downto 0 loop
 
 
 
                        result(i)<='0';
 
 
                        if shiftFunction="INVERSION" then
                        if shiftFunction="INVERSION" then
                                if i<=width-1-expi and i>=width-expi-mantissa_width then
                                if i<=width-1-expi and i>=width-expi-mantissa_width then
                                        result(i)<=mantis(mantissa_width-width+expi+i);
                                        result(i)<=mantis(mantissa_width-width+expi+i);
                                else
 
                                        result(i)<='0';
 
                                end if;
                                end if;
                        end if;
                        end if;
 
 
                        if shiftFunction="SQUARE_ROOT" then
                        if shiftFunction="SQUARE_ROOT" then
                                if i>expi then
                                if i<=expi then
                                        result(i)<='0';
 
                                else
 
                                        result(i)<=mantis(mantissa_width-1-expi+i);
                                        result(i)<=mantis(mantissa_width-1-expi+i);
                                end if;
                                end if;
                        end if;
                        end if;
 
 
                end loop;
                end loop;
 
 
        end process inverse;
        end process inverse;
 
 
end RLshifter_arch;
end RLshifter_arch;
 No newline at end of file
 No newline at end of file
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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