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

Subversion Repositories jart

[/] [jart/] [branches/] [ver0branch/] [rayxsphereGrid.vhd] - Blame information for rev 64

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

Line No. Rev Author Line
1 34 jguarin200
-- Author : Julian Andres Guarin Reyes.
2
-- Project : JART, Just Another Ray Tracer.
3
-- email : jguarin2002 at gmail.com, j.guarin at javeriana.edu.co
4
 
5
-- This code was entirely written by Julian Andres Guarin Reyes.
6
-- The following code is licensed under GNU Public License
7
-- http://www.gnu.org/licenses/gpl-3.0.txt.
8
 
9
 -- This file is part of JART (Just Another Ray Tracer).
10
 
11
    -- JART (Just Another Ray Tracer) is free software: you can redistribute it and/or modify
12
    -- it under the terms of the GNU General Public License as published by
13
    -- the Free Software Foundation, either version 3 of the License, or
14
    -- (at your option) any later version.
15
 
16
    -- JART (Just Another Ray Tracer) is distributed in the hope that it will be useful,
17
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
    -- GNU General Public License for more details.
20
 
21
    -- You should have received a copy of the GNU General Public License
22
    -- along with JART (Just Another Ray Tracer).  If not, see <http://www.gnu.org/licenses/>.
23
 
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
use work.powerGrid.all;
28
 
29
 
30
entity rayxsphereGrid is
31
        generic (
32
        -- Width of Column identificator.
33
        IDW     : integer := 2;
34
        -- Number of Columns.
35
        C       : integer := 4;
36
        -- Input rays width.
37
        W0      : integer := 18;
38
        -- Dot products and spheres constant width
39
        W1      : integer := 32;
40
 
41
        );
42
        port (
43
        -- The usual control signals.
44
        clk,rst : in std_logic;
45
 
46
        -- Grid, rays and sphere flow through control signals.
47
        pipeOn                  : in std_logic;
48
        nxtSphere               : in std_logic_vector (C-1 downto 0);
49
 
50
        -- R-F0
51
        -- Input Values. 
52
        -- The ray input vector.
53
        iRayx: in std_logic_vector (W0 - 1 downto 0);
54
        iRayy: in std_logic_vector (W0 - 1 downto 0);
55
        iRayz: in std_logic_vector (W0 - 1 downto 0);
56
        -- The spheres x position (sphere centers) input vectors.
57
        iSphrCenterx: in std_logic_vector (C*W0 - 1 downto 0);
58
        -- The spheres y position (sphere centers) input vectors.
59
        iSphrCentery: in std_logic_vector (C*W0 - 1 downto 0);
60
        -- The spheres z position (sphere centers) input vectors.
61
        iSphrCenterz: in std_logic_vector (C*W0 - 1 downto 0);
62
        -- The spheres x position (sphere centers) output vectors.
63
        oSphrCenterx: out std_logic_vector (C*W0 - 1 downto 0);
64
        -- The spheres y positions (sphere centes) output vectors.
65
        oSphrCentery: out std_logic_vector (C*W0 - 1 downto 0);
66
        -- The spheres z positions (sphere centers) output vectors.             
67
        oSphrCenterz: out std_logic_vector (C*W0 - 1 downto 0);
68
        -- Output Values
69
        -- The ray output vector.
70
        oRayx: out std_logic_vector (W0 - 1 downto 0);
71
        oRayy: out std_logic_vector (W0 - 1 downto 0);
72
        oRayz: out std_logic_vector (W0 - 1 downto 0);
73
 
74
        -- R-F1
75
        -- K Input / Output.
76
        kInput  : in std_logic_vector (C*W1 - 1 downto 0);
77
        kOutput : out std_logic_vector (C*W1 - 1 downto 0)
78
 
79
        --R-F2
80
        -- Input Values
81
        refvd   : in std_logic_vector (W1-1 downto 0);
82
        selvd   : out std_logic_vector (W1-1 downto 0);
83
        colid   : out std_logic_vector (IDW-1 downto 0);
84
        inter   : out std_logic
85
        );
86
end entity;
87
 
88
architecture rtl of rayxsphereGrid is
89
 
90
        -- Signal to connect outgoing floor0 vd and ingoing floor1 vd.
91
        signal svdf0f1  : std_logic_vector (C*W1-1 downto 0);
92
        signal svdf1f2  : std_logic_vector (C*W1-1 downto 0);
93
begin
94
        RF0 : floor0Row
95
        generic map(
96
        nlw=W1,
97
        viw=W0,
98
        col=C );
99
        port map(
100
        clk                             => clk,
101
        rst                             => rst,
102
        nxtRay                  => pipeOn,
103
        nxtSphere               => nxtSphere,
104
        iRayx                   => iRayx,
105
        iRayy                   => iRayy,
106
        iRayz                   => iRayz,
107
        iSphrCenterx    => iSphrCenterx,
108
        iSphrCentery    => iSphrCentery,
109
        iSphrCenterz    => iSphrCenterz,
110
        oSphrCenterx    => oSphrCenterx,
111
        oSphrCentery    => oSphrCentery,
112
        oSphrCenterz    => oSphrCenterz,
113
        oRayx                   => oRayx,
114
        oRayy                   => oRayy,
115
        oRayz                   => oRayz,
116
        vdOutput                => svdf0f1
117
        );
118
        RF1 : floor1Row
119
        generic map (
120
        viw = W1,
121
        col = C );
122
        port map (
123
        clk                             => clk,
124
        rst                             => rst,
125
        pipeOn                  => pipeOn,
126
        nxtSphere               => nxtSphere,
127
        vdInput                 => svdf0f1,
128
        vdOutput                => svdf1f2,
129
        kInput                  => kInput,
130
        kOutput                 => kOutput
131
        );
132
        RF2 : floor2Row
133
        generic map (
134
        viw = W1,
135
        idColW = IDW,
136
        col = C );
137
        port map (
138
        clk                             => clk,
139
        rst                             => rst,
140
        pipeOn                  => pipeOn,
141
        refvd                   => refvd,
142
        selvd                   => selvd,
143
        colvd                   => svdf1f2,
144
        colid                   => colid,
145
        inter                   => inter
146
        );
147
 
148
end rtl;

powered by: WebSVN 2.1.0

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