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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [sqrtdiv/] [shifter2xstage.vhd] - Diff between revs 73 and 74

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

Rev 73 Rev 74
Line 47... Line 47...
        signal exp1     : std_logic_vector (integer(ceil(log(real(width),2.0)))-1 downto 0);
        signal exp1     : std_logic_vector (integer(ceil(log(real(width),2.0)))-1 downto 0);
        signal add0     : std_logic_vector (address_width-1 downto 0);
        signal add0     : std_logic_vector (address_width-1 downto 0);
        signal add1     : std_logic_vector (address_width-1 downto 0);
        signal add1     : std_logic_vector (address_width-1 downto 0);
        signal szero: std_logic_vector (1 downto 0);
        signal szero: std_logic_vector (1 downto 0);
 
 
        function exp0StringParam()return string is
        function exp0StringParam return string is
        begin
        begin
                if width rem 2 = 0 then
                if width rem 2 = 0 then
                        return "NO";
                        return "NO";
                else
                else
                        return "YES";
                        return "YES";
                end if;
                end if;
        end exp0StringParam;
        end exp0StringParam;
        function exp1StringParam()return string is
        function exp1StringParam return string is
        begin
        begin
                if width rem 2 = 0 then
                if width rem 2 = 0 then
                        return "YES";
                        return "YES";
                else
                else
                        return "NO";
                        return "NO";
Line 69... Line 69...
 
 
 
 
begin
begin
        zero <= szero(1) and szero(0);
        zero <= szero(1) and szero(0);
        evenS:shifter
        evenS:shifter
        generic map (address_width,width,exp0StringParam())
        generic map (address_width,width,exp0StringParam)
        port map (data,exp0,add0,szero(0));
        port map (data,exp0,add0,szero(0));
        oddS:shifter
        oddS:shifter
        generic map (address_width,width,exp1StringParam())
        generic map (address_width,width,exp1StringParam)
        port map (data,exp1,add1,szero(1));
        port map (data,exp1,add1,szero(1));
        exp(integer(ceil(log(real(width),2.0)))-1 downto 0)<=exp0;
        exp(integer(ceil(log(real(width),2.0)))-1 downto 0)<=exp0;
        exp(2*integer(ceil(log(real(width),2.0)))-1 downto integer(ceil(log(real(width),2.0))))<=exp1;
        exp(2*integer(ceil(log(real(width),2.0)))-1 downto integer(ceil(log(real(width),2.0))))<=exp1;
        add(address_width-1 downto 0)<=add0;
        add(address_width-1 downto 0)<=add0;
        add(2*address_width-1 downto address_width)<=add1;
        add(2*address_width-1 downto address_width)<=add1;

powered by: WebSVN 2.1.0

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