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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [opcoder.vhd] - Diff between revs 12 and 14

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

Rev 12 Rev 14
Line 3... Line 3...
 
 
entity opcoder is
entity opcoder is
        port (
        port (
                Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz : in std_logic_vector (17 downto 0);
                Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz : in std_logic_vector (17 downto 0);
                m0f0,m0f1,m1f0,m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : out std_logic_vector (17 downto 0);
                m0f0,m0f1,m1f0,m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : out std_logic_vector (17 downto 0);
 
 
                opcode,addcode : in std_logic
                opcode,addcode : in std_logic
        );
        );
end entity;
end entity;
 
 
architecture opcoder_arch of opcoder is
architecture opcoder_arch of opcoder is
 
 
 
 
begin
begin
 
 
        opcoder_:
        procOpcoder:
        process (Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz,opcode,addcode)
        process (Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz,opcode,addcode)
                variable scoder : std_logic_vector (1 downto 0);
                variable scoder : std_logic_vector (1 downto 0);
        begin
        begin
                scoder := opcode & addcode;
                scoder := opcode & addcode;
                case (scoder) is
                case (scoder) is
                        when "0x" =>
 
                                m0f0 <= Ax;
 
                                m0f1 <= Bx;
 
                                m1f0 <= Ay;
 
                                m1f1 <= By;
 
                                m2f0 <= Az;
 
                                m2f1 <= Bz;
 
                                m3f0 <= Cx;
 
                                m3f1 <= Dx;
 
                                m4f0 <= Cy;
 
                                m4f1 <= Dy;
 
                                m5f0 <= Cz;
 
                                m5f1 <= Dz;
 
                        when "10" =>
                        when "10" =>
                                m0f0 <= Ay;
                                m0f0 <= Ay;
                                m0f1 <= Bz;
                                m0f1 <= Bz;
                                m1f0 <= Az;
                                m1f0 <= Az;
                                m1f1 <= By;
                                m1f1 <= By;
Line 58... Line 46...
                                m4f0 <= Cx;
                                m4f0 <= Cx;
                                m4f1 <= Dy;
                                m4f1 <= Dy;
                                m5f0 <= Cy;
                                m5f0 <= Cy;
                                m5f1 <= Dx;
                                m5f1 <= Dx;
                        when others =>
                        when others =>
                                m0f0 <= ( others => '0');
                                m0f0 <= Ax;
                                m0f1 <= ( others => '0');
                                m0f1 <= Bx;
                                m1f0 <= ( others => '0');
                                m1f0 <= Ay;
                                m1f1 <= ( others => '0');
                                m1f1 <= By;
                                m2f0 <= ( others => '0');
                                m2f0 <= Az;
                                m2f1 <= ( others => '0');
                                m2f1 <= Bz;
                                m3f0 <= ( others => '0');
                                m3f0 <= Cx;
                                m3f1 <= ( others => '0');
                                m3f1 <= Dx;
                                m3f0 <= ( others => '0');
                                m4f0 <= Cy;
                                m3f1 <= ( others => '0');
                                m4f1 <= Dy;
                                m4f0 <= ( others => '0');
                                m5f0 <= Cz;
                                m4f1 <= ( others => '0');
                                m5f1 <= Dz;
                                m5f0 <= ( others => '0');
 
                                m5f1 <= ( others => '0');
 
                end case;
                end case;
 
 
 
 
 
 
 
 
 
 
        end process opcoder_;
        end process procOpcoder;
 
 
 
 
end opcoder_arch;
end opcoder_arch;
 
 
 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.