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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [opcoder.vhd] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 jguarin200
library ieee;
2
use ieee.std_logic_1164.all;
3
 
4
entity opcoder is
5
        port map (
6
                Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz : in std_logic_vector (17 downto 0);
7
                m0f0,m0f1,m1f0m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : out std_logic_vector (17 downto 0);
8
                opcode,addcode : in std_logic
9
        );
10
end entity;
11
 
12
architecture opcoder_arch of opcoder is
13
 
14
 
15
begin
16
 
17
        opcoder_:
18
        process (Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz,opcode,addcode)
19
                variable scoder : std_logic_vector (1 downto 0);
20
        begin
21
                scoder := opcode & addcode;
22
                case (scoder) is
23
                        when "0x" =>
24
                                m0f0 <= Ax;
25
                                m0f1 <= Bx;
26
                                m1f0 <= Ay;
27
                                m1f1 <= By;
28
                                m2f0 <= Az;
29
                                m2f1 <= Bz;
30
                                m3f0 <= Cx;
31
                                m3f1 <= Dx;
32
                                m4f0 <= Cy;
33
                                m4f1 <= Dy;
34
                                m5f0 <= Cz;
35
                                m5f1 <= Dz;
36
                        when "10" =>
37
                                m0f0 <= Ay;
38
                                m0f1 <= Bz;
39
                                m1f0 <= Az;
40
                                m1f1 <= By;
41
                                m2f0 <= Az;
42
                                m2f1 <= Bx;
43
                                m3f0 <= Ax;
44
                                m3f1 <= Bz;
45
                                m4f0 <= Ax;
46
                                m4f1 <= By;
47
                                m5f0 <= Ay;
48
                                m5f1 <= Bx;
49
                        when "11" =>
50
                                m0f0 <= Cy;
51
                                m0f1 <= Dz;
52
                                m1f0 <= Cz;
53
                                m1f1 <= Dy;
54
                                m2f0 <= Cz;
55
                                m2f1 <= Dx;
56
                                m3f0 <= Cx;
57
                                m3f1 <= Dz;
58
                                m4f0 <= Cx;
59
                                m4f1 <= Dy;
60
                                m5f0 <= Cy;
61
                                m5f1 <= Dx;
62
                        when others =>
63
                                m0f0 <= ( others => '0');
64 5 jguarin200
                                m0f1 <= ( others => '0');
65
                                m1f0 <= ( others => '0');
66
                                m1f1 <= ( others => '0');
67
                                m2f0 <= ( others => '0');
68
                                m2f1 <= ( others => '0');
69
                                m3f0 <= ( others => '0');
70
                                m3f1 <= ( others => '0');
71
                                m3f0 <= ( others => '0');
72
                                m3f1 <= ( others => '0');
73
                                m4f0 <= ( others => '0');
74
                                m4f1 <= ( others => '0');
75 3 jguarin200
                end case;
76 4 jguarin200
 
77 3 jguarin200
 
78
 
79
 
80
 
81
        end process opcoder_;
82
 
83
 
84 4 jguarin200
end opcoder_arch;

powered by: WebSVN 2.1.0

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