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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [uf.vhd] - Diff between revs 28 and 32

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

Rev 28 Rev 32
Line 39... Line 39...
--! \n\n
--! \n\n
--! La característica fundamental de uf, es que puede realizar 2 operaciones de producto punto al mimso tiempo ó una operación de producto cruz al mismo tiempo. La otra característica importante es que el pipe de producto punto es mas largo que el pipe de producto cruz: el producto punto tomará 3 clocks para realizarse, mientras que el procto punto tomara 4 clocks para realizarse.    
--! La característica fundamental de uf, es que puede realizar 2 operaciones de producto punto al mimso tiempo ó una operación de producto cruz al mismo tiempo. La otra característica importante es que el pipe de producto punto es mas largo que el pipe de producto cruz: el producto punto tomará 3 clocks para realizarse, mientras que el procto punto tomara 4 clocks para realizarse.    
 
 
entity uf is
entity uf is
        generic (
        generic (
                        use_std_logic_signed : string := "NO"
                        use_std_logic_signed : string := "NO";
 
                        carry_logic : string := "CLA"
        );
        );
        port (
        port (
                opcode          : in std_logic; --! Entrada que dentro de la arquitectura funciona como selector de la operación que se lleva a cabo en la primera etapa de sumadores/restadores. 
                opcode          : in std_logic; --! Entrada que dentro de la arquitectura funciona como selector de la operación que se lleva a cabo en la primera etapa de sumadores/restadores. 
                m0f0,m0f1,m1f0,m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : in std_logic_vector(17 downto 0); --! Entradas que van conectadas a los multiplicadores en la primera etapa de la descripción.  
                m0f0,m0f1,m1f0,m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : in std_logic_vector(17 downto 0); --! Entradas que van conectadas a los multiplicadores en la primera etapa de la descripción.  
                cpx,cpy,cpz,dp0,dp1 : out std_logic_vector(31 downto 0); --! Salidas donde se registran los resultados de las operaciones aritméticas: cpx,cpy,cpz serán los componentes del vector que da por resultado el producto cruz entre los vectores AxB ó CxD.  
                cpx,cpy,cpz,dp0,dp1 : out std_logic_vector(31 downto 0); --! Salidas donde se registran los resultados de las operaciones aritméticas: cpx,cpy,cpz serán los componentes del vector que da por resultado el producto cruz entre los vectores AxB ó CxD.  
Line 162... Line 163...
        end generate useIeee;
        end generate useIeee;
        dontUseIeee:
        dontUseIeee:
        if use_std_logic_signed="NO" generate
        if use_std_logic_signed="NO" generate
                --! Adder 0, 16 bit carry lookahead low adder.
                --! Adder 0, 16 bit carry lookahead low adder.
                a0low : adder
                a0low : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p0(15 downto 0),stage1p1(15 downto 0),stageSRopcode,'0',stage1a0(15 downto 0),stage1_internalCarry(0));
                port map        (stage1p0(15 downto 0),stage1p1(15 downto 0),stageSRopcode,'0',stage1a0(15 downto 0),stage1_internalCarry(0));
                --Adder 0, 16 bit carry lookahead high adder.
                --Adder 0, 16 bit carry lookahead high adder.
                a0high : adder
                a0high : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p0(31 downto 16),stage1p1(31 downto 16),stageSRopcode,stage1_internalCarry(0),stage1a0(31 downto 16),open);
                port map        (stage1p0(31 downto 16),stage1p1(31 downto 16),stageSRopcode,stage1_internalCarry(0),stage1a0(31 downto 16),open);
                --! Adder 1, 16 bit carry lookahead low adder. 
                --! Adder 1, 16 bit carry lookahead low adder. 
                a1low : adder
                a1low : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p2(15 downto 0),stage1p3(15 downto 0),'1','0',stage1a1(15 downto 0),stage1_internalCarry(1));
                port map        (stage1p2(15 downto 0),stage1p3(15 downto 0),'1','0',stage1a1(15 downto 0),stage1_internalCarry(1));
                --! Adder 1, 16 bit carry lookahead high adder.
                --! Adder 1, 16 bit carry lookahead high adder.
                a1high : adder
                a1high : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p2(31 downto 16),stage1p3(31 downto 16),'1',stage1_internalCarry(1),stage1a1(31 downto 16),open);
                port map        (stage1p2(31 downto 16),stage1p3(31 downto 16),'1',stage1_internalCarry(1),stage1a1(31 downto 16),open);
                --! Adder 2, 16 bit carry lookahead low adder. 
                --! Adder 2, 16 bit carry lookahead low adder. 
                a2low : adder
                a2low : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p4(15 downto 0),stage1p5(15 downto 0),stageSRopcode,'0',stage1a2(15 downto 0),stage1_internalCarry(2));
                port map        (stage1p4(15 downto 0),stage1p5(15 downto 0),stageSRopcode,'0',stage1a2(15 downto 0),stage1_internalCarry(2));
                --! Adder 2, 16 bit carry lookahead high adder.
                --! Adder 2, 16 bit carry lookahead high adder.
                a2high : adder
                a2high : adder
                generic map (16,"CLA","YES")    -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"YES")      -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                                                                                -- Yes instantiate Xor gates stage in the adder so we can substract on the opcode signal command.
                port map        (stage1p4(31 downto 16),stage1p5(31 downto 16),stageSRopcode,stage1_internalCarry(2),stage1a2(31 downto 16),open);
                port map        (stage1p4(31 downto 16),stage1p5(31 downto 16),stageSRopcode,stage1_internalCarry(2),stage1a2(31 downto 16),open);
                -- Adder Instantiation (Stage 2)
                -- Adder Instantiation (Stage 2)
                --! Adder 3, 16 bit carry lookahead low adder. 
                --! Adder 3, 16 bit carry lookahead low adder. 
                a3low : adder
                a3low : adder
                generic map (16,"CLA","NO")             -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"NO")               -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Dont instantiate Xor gates stage in the adder.
                                                                                -- Dont instantiate Xor gates stage in the adder.
                port map        (stage2a0(15 downto 0),stage2p2(15 downto 0),'0','0',stage2a3(15 downto 0),stage2_internalCarry(0));
                port map        (stage2a0(15 downto 0),stage2p2(15 downto 0),'0','0',stage2a3(15 downto 0),stage2_internalCarry(0));
                --Adder 3, 16 bit carry lookahead high adder.
                --Adder 3, 16 bit carry lookahead high adder.
                a3high : adder
                a3high : adder
                generic map (16,"CLA","NO")             -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"NO")               -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Dont instantiate Xor gates stage in the adder.
                                                                                -- Dont instantiate Xor gates stage in the adder.
                port map        (stage2a0(31 downto 16),stage2p2(31 downto 16),'0',stage2_internalCarry(0),stage2a3(31 downto 16),open);
                port map        (stage2a0(31 downto 16),stage2p2(31 downto 16),'0',stage2_internalCarry(0),stage2a3(31 downto 16),open);
                --! Adder 4, 16 bit carry lookahead low adder. 
                --! Adder 4, 16 bit carry lookahead low adder. 
                a4low : adder
                a4low : adder
                generic map (16,"CLA","NO")             -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"NO")               -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Dont instantiate Xor gates stage in the adder.
                                                                                -- Dont instantiate Xor gates stage in the adder.
                port map        (stage2p3(15 downto 0),stage2a2(15 downto 0),'0','0',stage2a4(15 downto 0),stage2_internalCarry(1));
                port map        (stage2p3(15 downto 0),stage2a2(15 downto 0),'0','0',stage2a4(15 downto 0),stage2_internalCarry(1));
                --! Adder 4, 16 bit carry lookahead high adder.
                --! Adder 4, 16 bit carry lookahead high adder.
                a4high : adder
                a4high : adder
                generic map (16,"CLA","NO")             -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                generic map (16,carry_logic,"NO")               -- Carry Look Ahead Logic (More Gates Used, But Less Time)
                                                                                -- Dont instantiate Xor gates stage in the adder.
                                                                                -- Dont instantiate Xor gates stage in the adder.
                port map        (stage2p3(31 downto 16),stage2a2(31 downto 16),'0',stage2_internalCarry(1),stage2a4(31 downto 16),open);
                port map        (stage2p3(31 downto 16),stage2a2(31 downto 16),'0',stage2_internalCarry(1),stage2a4(31 downto 16),open);
 
 
        end generate dontUseIeee;
        end generate dontUseIeee;
        -- Incoming from opcoder.vhd signals into pipeline's stage 0.
        -- Incoming from opcoder.vhd signals into pipeline's stage 0.

powered by: WebSVN 2.1.0

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