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

Subversion Repositories raytrac

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

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 7 jguarin200
        port (
6 3 jguarin200
                Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz : in std_logic_vector (17 downto 0);
7 12 jguarin200
                m0f0,m0f1,m1f0,m1f1,m2f0,m2f1,m3f0,m3f1,m4f0,m4f1,m5f0,m5f1 : out std_logic_vector (17 downto 0);
8 14 jguarin200
 
9 3 jguarin200
                opcode,addcode : in std_logic
10
        );
11
end entity;
12
 
13
architecture opcoder_arch of opcoder is
14
 
15
 
16
begin
17
 
18 14 jguarin200
        procOpcoder:
19 3 jguarin200
        process (Ax,Bx,Cx,Dx,Ay,By,Cy,Dy,Az,Bz,Cz,Dz,opcode,addcode)
20
                variable scoder : std_logic_vector (1 downto 0);
21
        begin
22
                scoder := opcode & addcode;
23
                case (scoder) is
24
                        when "10" =>
25
                                m0f0 <= Ay;
26
                                m0f1 <= Bz;
27
                                m1f0 <= Az;
28
                                m1f1 <= By;
29
                                m2f0 <= Az;
30
                                m2f1 <= Bx;
31
                                m3f0 <= Ax;
32
                                m3f1 <= Bz;
33
                                m4f0 <= Ax;
34
                                m4f1 <= By;
35
                                m5f0 <= Ay;
36
                                m5f1 <= Bx;
37
                        when "11" =>
38
                                m0f0 <= Cy;
39
                                m0f1 <= Dz;
40
                                m1f0 <= Cz;
41
                                m1f1 <= Dy;
42
                                m2f0 <= Cz;
43
                                m2f1 <= Dx;
44
                                m3f0 <= Cx;
45
                                m3f1 <= Dz;
46
                                m4f0 <= Cx;
47
                                m4f1 <= Dy;
48
                                m5f0 <= Cy;
49
                                m5f1 <= Dx;
50
                        when others =>
51 14 jguarin200
                                m0f0 <= Ax;
52
                                m0f1 <= Bx;
53
                                m1f0 <= Ay;
54
                                m1f1 <= By;
55
                                m2f0 <= Az;
56
                                m2f1 <= Bz;
57
                                m3f0 <= Cx;
58
                                m3f1 <= Dx;
59
                                m4f0 <= Cy;
60
                                m4f1 <= Dy;
61
                                m5f0 <= Cz;
62
                                m5f1 <= Dz;
63
 
64 3 jguarin200
                end case;
65 4 jguarin200
 
66 3 jguarin200
 
67
 
68
 
69
 
70 14 jguarin200
        end process procOpcoder;
71 3 jguarin200
 
72
 
73 4 jguarin200
end opcoder_arch;

powered by: WebSVN 2.1.0

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