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

Subversion Repositories jart

[/] [jart/] [branches/] [ver0branch/] [floor0Row.vhd] - Diff between revs 47 and 63

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

Rev 47 Rev 63
Line 28... Line 28...
use work.powerGrid.all;
use work.powerGrid.all;
 
 
 
 
entity floor0Row is
entity floor0Row is
        generic (
        generic (
                        nlw : integer := 32;    -- Next Level Width (V.D width)
                        W1 : integer := 32;     -- Next Level Width (V.D width)
                        viw : integer := 18;    -- Vector input Width
                        W0 : integer := 18;     -- Vector input Width
                        col     : integer := 4;         -- Number of Colums
                        C       : integer := 4          -- Number of Colums
        );
        );
        port (  -- Input Control Signal
        port (  -- Input Control Signal
                        clk, rst, nxtRay : in std_logic;
                        clk, rst, nxtRay : in std_logic;
                        -- Clk, Rst, the usual control signals.
                        -- Clk, Rst, the usual control signals.
                        -- enabled, the machine is running when this input is set.
                        -- enabled, the machine is running when this input is set.
                        -- enabled, all the counters begin again.
                        -- enabled, all the counters begin again.
                        nxtSphere : in std_logic_vector (col-1 downto 0);
                        nxtSphere : in std_logic_vector (C-1 downto 0);
 
 
 
 
                        -- Input Values
                        -- Input Values
                        iRayx: in std_logic_vector (viw - 1 downto 0);
                        iRayx: in std_logic_vector (W0 - 1 downto 0);
                        iRayy: in std_logic_vector (viw - 1 downto 0);
                        iRayy: in std_logic_vector (W0 - 1 downto 0);
                        iRayz: in std_logic_vector (viw - 1 downto 0); -- The ray input vector.
                        iRayz: in std_logic_vector (W0 - 1 downto 0); -- The ray input vector.
                        iSphrCenterx: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        iSphrCenterx: in std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        iSphrCentery: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        iSphrCentery: in std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        iSphrCenterz: in std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        iSphrCenterz: in std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCenterx: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCenterx: out std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCentery: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCentery: out std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCenterz: out std_logic_vector (col*viw - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
                        oSphrCenterz: out std_logic_vector (C*W0 - 1 downto 0); -- The spheres positions (sphere centers) input vectors.
 
 
                        -- Output Values
                        -- Output Values
                        oRayx: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
                        oRayx: out std_logic_vector (W0 - 1 downto 0);-- The ray output vector.
                        oRayy: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
                        oRayy: out std_logic_vector (W0 - 1 downto 0);-- The ray output vector.
                        oRayz: out std_logic_vector (viw - 1 downto 0);-- The ray output vector.
                        oRayz: out std_logic_vector (W0 - 1 downto 0);-- The ray output vector.
                        vdOutput : out std_logic_vector (nlw*col - 1 downto 0) -- The dot product emerging from each dot prod cell. 
                        vdOutput : out std_logic_vector (W1*C - 1 downto 0) -- The dot product emerging from each dot prod cell. 
        );
        );
end entity;
end entity;
 
 
architecture rtl of floor0Row is
architecture rtl of floor0Row is
 
 
        signal sRayx    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
        signal sRayx    : std_logic_vector ((C+1)*W0 - 1 downto 0);      -- The ray difussion nets.
        signal sRayy    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
        signal sRayy    : std_logic_vector ((C+1)*W0 - 1 downto 0);      -- The ray difussion nets.
        signal sRayz    : std_logic_vector ((col+1)*viw - 1 downto 0);   -- The ray difussion nets.
        signal sRayz    : std_logic_vector ((C+1)*W0 - 1 downto 0);      -- The ray difussion nets.
 
 
begin
begin
 
 
        theCells : for i in 0 to col-1 generate
        theCells : for i in 0 to C-1 generate
 
 
                dotCellx : dotCell port map (
                dotCellx : dotCell
 
                generic map (
 
                        RV => "no"
 
                )
 
                port map (
 
 
                        clk                     => clk,
                        clk                     => clk,
                        rst                     => rst,
                        rst                     => rst,
                        nxtSphere       => nxtSphere(i),
                        nxtSphere       => nxtSphere(i),
                        nxtRay          => nxtRay,
                        nxtRay          => nxtRay,
                        vxInput         => iSphrCenterx((i+1)*viw-1 downto i*viw),
                        vxInput         => iSphrCenterx((i+1)*W0-1 downto i*W0),
                        vyInput         => iSphrCentery((i+1)*viw-1 downto i*viw),
                        vyInput         => iSphrCentery((i+1)*W0-1 downto i*W0),
                        vzInput         => iSphrCenterz((i+1)*viw-1 downto i*viw),
                        vzInput         => iSphrCenterz((i+1)*W0-1 downto i*W0),
                        vxOutput        => oSphrCenterx((i+1)*viw-1 downto i*viw),
                        vxOutput        => oSphrCenterx((i+1)*W0-1 downto i*W0),
                        vyOutput        => oSphrCentery((i+1)*viw-1 downto i*viw),
                        vyOutput        => oSphrCentery((i+1)*W0-1 downto i*W0),
                        vzOutput        => oSphrCenterz((i+1)*viw-1 downto i*viw),
                        vzOutput        => oSphrCenterz((i+1)*W0-1 downto i*W0),
                        dxInput         => sRayx ((i+1)*viw-1 downto i*viw),
                        dxInput         => sRayx ((i+1)*W0-1 downto i*W0),
                        dyInput         => sRayx ((i+1)*viw-1 downto i*viw),
                        dyInput         => sRayy ((i+1)*W0-1 downto i*W0),
                        dzInput         => sRayx ((i+1)*viw-1 downto i*viw),
                        dzInput         => sRayz ((i+1)*W0-1 downto i*W0),
                        dxOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
                        dxOutput        => sRayx ((i+2)*W0-1 downto (i+1)*W0),
                        dyOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
                        dyOutput        => sRayy ((i+2)*W0-1 downto (i+1)*W0),
                        dzOutput        => sRayx ((i+2)*viw-1 downto (i+1)*viw),
                        dzOutput        => sRayz ((i+2)*W0-1 downto (i+1)*W0),
                        vdOutput        => vdOutput((i+1)*view-1 downto i*viw)
                        vdOutput        => vdOutput((i+1)*W1-1 downto i*W1)
                        );
                        );
 
 
        end generate;
        end generate;
 
 
        -- Connect the first and last rays.
        -- Connect the first and last rays.
        sRayx (viw-1 downto 0)   <= iRayx;
        sRayx (W0-1 downto 0)    <= iRayx;
        sRayy (viw-1 downto 0)   <= iRayy;
        sRayy (W0-1 downto 0)    <= iRayy;
        sRayz (viw-1 downto 0)   <= iRayz;
        sRayz (W0-1 downto 0)    <= iRayz;
        oRayx                                   <= sRayx ((col+1)*viw - 1 downto col*viw);
        oRayx                                   <= sRayx ((C+1)*W0 - 1 downto C*W0);
        oRayy                                   <= sRayy ((col+1)*viw - 1 downto col*viw);
        oRayy                                   <= sRayy ((C+1)*W0 - 1 downto C*W0);
        oRayz                                   <= sRayz ((col+1)*viw - 1 downto col*viw);
        oRayz                                   <= sRayz ((C+1)*W0 - 1 downto C*W0);
 
 
end rtl;
end rtl;
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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