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

Subversion Repositories raytrac

[/] [raytrac/] [branches/] [fp/] [arithpack.vhd] - Diff between revs 153 and 155

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

Rev 153 Rev 155
Line 110... Line 110...
                zero_flag,eob_flag,eq_flag      : out std_logic;
                zero_flag,eob_flag,eq_flag      : out std_logic;
                count                   : out std_logic_vector(width-1 downto 0)
                count                   : out std_logic_vector(width-1 downto 0)
        );
        );
        end component;
        end component;
 
 
 
        --! LPM_MULTIPLIER
 
        component lpm_mult
 
        generic (
 
                lpm_hint                        : string;
 
                lpm_pipeline            : natural;
 
                lpm_representation      : string;
 
                lpm_type                        : string;
 
                lpm_widtha                      : natural;
 
                lpm_widthb                      : natural;
 
                lpm_widthp                      : natural
 
        );
 
        port (
 
                dataa   : in std_logic_vector ( lpm_widtha-1 downto 0 );
 
                datab   : in std_logic_vector ( lpm_widthb-1 downto 0 );
 
                result  : out std_logic_vector( lpm_widthp-1 downto 0 )
 
        );
 
        end component;
        --! LPM Memory Compiler.
        --! LPM Memory Compiler.
        component scfifo
        component scfifo
        generic (
        generic (
                add_ram_output_register :string;
                add_ram_output_register :string;
                almost_full_value               :natural;
                almost_full_value               :natural;
Line 329... Line 346...
        function ap_slv2fp (sl:std_logic_vector) return real;
        function ap_slv2fp (sl:std_logic_vector) return real;
 
 
        --! Función que devuelve un vector en punto flotante IEEE754 a través de un   
        --! Función que devuelve un vector en punto flotante IEEE754 a través de un   
        function ap_slv_calc_xyvec (x,y:integer; cam:apCamera) return v3f;
        function ap_slv_calc_xyvec (x,y:integer; cam:apCamera) return v3f;
 
 
 
        --! Función que devuelve una cadena con el número flotante IEEE 754.
 
        function ap_slvf2string(sl:std_logic_vector) return string;
 
 
 
        --! Función para escribir en una sola línea una cadena de caracteres.
 
        procedure ap_print(f:in text;s:in string);
 
 
 
 
 
 
end package;
end package;
 
 
 
 
package body arithpack is
package body arithpack is
 
 
 
        procedure ap_print(f:in text;s:in string) is
 
                variable l:line;
 
        begin
 
                write(l,s);
 
                writeline(f,l);
 
        end procedure
 
 
        function ap_slv2int (sl:std_logic_vector) return integer is
        function ap_slv2int (sl:std_logic_vector) return integer is
                alias s : std_logic_vector (sl'high downto sl'low) is sl;
                alias s : std_logic_vector (sl'high downto sl'low) is sl;
                variable i : integer;
                variable i : integer;
        begin
        begin
                i:=0;
                i:=0;
Line 423... Line 451...
 
 
                return v;
                return v;
 
 
        end function;
        end function;
 
 
 
        function ap_slvf2string(sl:std_logic_vector) return string is
 
                alias f: std_logic_vector(31 downto 0) is sl;
 
                variable r: real;
 
 
 
        begin
 
 
 
                r:=ap_slv2fp(f);
 
                return real'image(r);
 
 
 
        end function;
 
 
 
 
 
 
 
 
end package body;
end package body;
 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.