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

Subversion Repositories jart

[/] [jart/] [trunk/] [BLRT/] [dComparisonCell.vhd] - Diff between revs 21 and 32

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

Rev 21 Rev 32
Line 37... Line 37...
                                idCol   : integer := 0           -- Column Id
                                idCol   : integer := 0           -- Column Id
        );
        );
 
 
 
 
        port    (
        port    (
                                clk             : in std_logic;
                                clk, rst, ena   : in std_logic;
                                rst             : in std_logic;
 
 
                                intd : in std_logic; -- Reference intersection signal.
 
                                intq : out std_logic;
 
 
                                cIdd    : in    std_logic_vector (idColW - 1 downto 0);  -- This is the reference column identification input.
                                cIdd    : in    std_logic_vector (idColW - 1 downto 0);  -- This is the reference column identification input.
                                cIdq    : out   std_logic_vector (idColW - 1 downto 0);  -- This is the sphere identification output.
                                cIdq    : out   std_logic_vector (idColW - 1 downto 0);  -- This is the sphere identification output.
                                refvd   : in    std_logic_vector (W - 1 downto 0);               -- This is the projection incoming from the previous cell.
                                refvd   : in    std_logic_vector (W - 1 downto 0);               -- This is the projection incoming from the previous cell.
                                colvd   : in    std_logic_vector (W - 1 downto 0);               -- This is the projection of the sphere position over the ray traced vector, a.k.a. V.D! .
                                colvd   : in    std_logic_vector (W - 1 downto 0);               -- This is the projection of the sphere position over the ray traced vector, a.k.a. V.D! .
Line 53... Line 55...
 
 
 
 
architecture rtl of dComparisonCell is
architecture rtl of dComparisonCell is
 
 
        signal          ssl32 : std_logic;      -- This signal indicates if refvd is less than colvd
        signal          ssl32 : std_logic;      -- This signal indicates if refvd is less than colvd
 
        signal          qdist : std_logic_vector (idColW downto 0);
 
 
begin
begin
 
 
        -- A less than B comparison, check if colvd is less than refvd, meaning the act V.D less than actual min V.D
        -- A less than B comparison, check if colvd is less than refvd, meaning the act V.D less than actual min V.D
        cl32                    : sl32  port map (      dataa   => colvd,
        cl32                    : sl32  port map (      dataa   => colvd,
                                                                                datab   => refvd,
                                                                                datab   => refvd,
                                                                                AlB             => ssl32
                                                                                AlB             => ssl32
                                                                                );
                                                                                );
 
 
        -- A flip flop with 2 to 1 mux.
        -- A flip flop with 2 to 1 mux.Selects between the smallest vd.
        selectorVD              : scanFF        generic map (   W = W   )
        selectorVD              : scanFF        generic map (   W = W   )
                                                                port map        (       clk     => clk,
                                                                port map        (       clk     => clk,
                                                                                                rst     => rst,
                                                                                                rst     => rst,
                                                                                                scLoad  => ssl32,
                                                                                                ena     => ena,
                                                                                                extData => colvd,
                                                                                                sel => ssl32,
                                                                                                dStage  => refvd,
                                                                                                d0      => refvd,
                                                                                                qStage  => selvd);
                                                                                                d1      => colvd,
        -- Another flip flip with 2 to 1 mux.
                                                                                                q       => selvd
        selectorID              : scanFF        generic map     (       W = idColW )
                                                                                        );
 
        -- Another flip flip with 2 to 1 mux. Selects the id and intersection signal of the smallest vd.
 
        selectorID              : scanFF        generic map     (       W = idColW+1 )
                                                                port map        (       clk     => clk,
                                                                port map        (       clk     => clk,
                                                                                                rst             => rst,
                                                                                                rst             => rst,
                                                                                                scLoad  => ssl32,
                                                                                                ena     => ena
                                                                                                extData => CONV_STD_LOGIC(idCol,idColW),
                                                                                                sel     => ssl32,
                                                                                                dStage  => cIdd,
                                                                                                d0      => cIdd&intd,
                                                                                                qStage  => cIdq
                                                                                                d1      => conv_std_logic_vector(idCol,idColW)&ssl32,
 
                                                                                                q       => qdist;
                                                                                                );
                                                                                                );
 
 
 
        cIdq <= qdist(idColw downto 1);
 
        intq <= qdist(0);
 
 
 
 
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.