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

Subversion Repositories jart

[/] [jart/] [trunk/] [BLRT/] [floor0Row.vhd] - Blame information for rev 25

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

Line No. Rev Author Line
1 25 jguarin200
-- This is a template for generate a grid row in the JART control.
2
 
3
-- The question is : ¿ Should I use all tiles of the row registered? Well for sure there are two possibilities :
4
-- 1 . Dont register them: But for there is going to be a maximun number of columns where porpagation times are going to be
5
-- too high in order to substain a one clock upwards pipe. It depends upon the platform you are using how many columns you can implement in the row without registering them.
6
 
7
-- Ray Difussion Pipe Longitude (
8
-- Row Ray Difussion Time ( RRDT ) in clks: 2 + log 2 (Number of Columns) clks. 
9
-- An excellent difussion Time, but the max number of columns its limited by the platform specs.
10
-- Even it is an excellent time is not much of gain because this time is the same time of the pipe longitude, thus a result each clock is achieved anyway.
11
 
12
 
13
 
14
-- 2. Register them 
15
 
16
library ieee;
17
use ieee.std_logic_1164.all;
18
use work.powerGrid.all;
19
 
20
 
21
entity floor0Row is
22
        generic (
23
                        nlw : integer := 32;    -- Next Level Width (V.D width)
24
                        viw : integer := 18;    -- Vector input Width
25
                        col     : integer := 4;         -- Number of Colums
26
        );
27
        port (  -- Input Control Signal
28
                        clk, rst, nxtRay, nxtSphere     : in std_logic;
29
                        -- Clk, Rst, the usual control signals.
30
                        -- enabled, the machine is running when this input is set.
31
                        -- enabled, all the counters begin again.
32
 
33
 
34
 
35
                        -- Input Values
36
                        iRayx: in std_logic_vector (viw - 1 downto 0);
37
                        iRayy: in std_logic_vector (viw - 1 downto 0);
38
                        iRayz: in std_logic_vector (viw - 1 downto 0); -- The ray input vector.
39
                        iSphrCenterx: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
40
                        iSphrCentery: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
41
                        iSphrCenterz: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
42
                        oSphrCenterx: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
43
                        oSphrCentery: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
44
                        oSphrCenterz: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
45
 
46
                        -- Output Values
47
                        oRayx: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
48
                        oRayy: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
49
                        oRayz: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
50
                        vdOutput : out std_logic_vector (nlw*col - 1 downto 0) -- The dot product emerging from each dot prod cell. 
51
        );
52
end entity;
53
 
54
 
55
 
56
architecture rtl of floor0Row is
57
 
58
        signal sRayx    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
59
        signal sRayy    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
60
        signal sRayz    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
61
 
62
begin
63
 
64
        theCells : for i in 0 to col-1 generate
65
 
66
                dotCellx : dotCell port map (
67
 
68
                        clk                     => clk,
69
                        rst                     => rst,
70
                        nxtSphere       => nxtSphere,
71
                        nxtRay          => nxtRay,
72
                        vxInput         => iSphrCenterx((i+1)*viw-1 downto i*viw),
73
                        vyInput         => iSphrCentery((i+1)*viw-1 downto i*viw),
74
                        vzInput         => iSphrCenterz((i+1)*viw-1 downto i*viw),
75
                        vxOutput        => oSphrCenterx((i+1)*viw-1 downto i*viw),
76
                        vyOutput        => oSphrCentery((i+1)*viw-1 downto i*viw),
77
                        vzOutput        => oSphrCenterz((i+1)*viw-1 downto i*viw),
78
                        dxInput         => sRayx ((i+1)*viw-1 downto i*viw),
79
                        dyInput         => sRayx ((i+1)*viw-1 downto i*viw),
80
                        dzInput         => sRayx ((i+1)*viw-1 downto i*viw),
81
                        dxOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
82
                        dyOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
83
                        dzOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
84
                        vdOutput        => vdOutput((i+1)*view-1 downto i*viw)
85
                        );
86
 
87
        end generate;
88
 
89
        -- Connect the first and last rays.
90
        sRayx (viw-1 downto 0)   <= iRayx;
91
        sRayy (viw-1 downto 0)   <= iRayy;
92
        sRayz (viw-1 downto 0)   <= iRayz;
93
        oRayx                                   <= sRayx ((col+1)*viw - 1 downto col*viw);
94
        oRayy                                   <= sRayy ((col+1)*viw - 1 downto col*viw);
95
        oRayz                                   <= sRayz ((col+1)*viw - 1 downto col*viw);
96
 
97
end rtl;
98
 
99
 

powered by: WebSVN 2.1.0

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