Line 27... |
Line 27... |
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_arith.all;
|
use ieee.std_logic_arith.all;
|
use ieee.std_logic_unsigned.all;
|
use ieee.std_logic_unsigned.all;
|
|
|
use work.powerGrid.all;
|
use work.powerGrid.all;
|
use work.scanPack.all;
|
|
|
|
entity dComparisonCell is
|
entity dComparisonCell is
|
generic (
|
generic (
|
W1 : integer := 32; -- operands Width ( reference V.D and column V.D)
|
W1 : integer := 32; -- operands Width ( reference V.D and column V.D)
|
IDW : integer := 2; -- Column Sphere ID width. 1 = 2 columns max, 2= 4 colums max... and so on.
|
IDW : integer := 2; -- Column Sphere ID width. 1 = 2 columns max, 2= 4 colums max... and so on.
|
Line 56... |
Line 55... |
cIdd : in std_logic_vector (IDW - 1 downto 0); -- This is the reference column identification input.
|
cIdd : in std_logic_vector (IDW - 1 downto 0); -- This is the reference column identification input.
|
cIdq : out std_logic_vector (IDW - 1 downto 0); -- This is the sphere identification output.
|
cIdq : out std_logic_vector (IDW - 1 downto 0); -- This is the sphere identification output.
|
|
|
refk : in std_logic_vector (W1 - 1 downto 0); -- This is the columns sphere constant
|
refk : in std_logic_vector (W1 - 1 downto 0); -- This is the columns sphere constant
|
colk : in std_logic_vector (W1 - 1 downto 0); -- This is the reference sphere constant
|
colk : in std_logic_vector (W1 - 1 downto 0); -- This is the reference sphere constant
|
selk : in std_logic_vector (W1 - 1 downto 0); -- This is the selected sphere constant
|
selk : out std_logic_vector (W1 - 1 downto 0); -- This is the selected sphere constant
|
|
|
refvd : in std_logic_vector (W1 - 1 downto 0); -- This is the projection incoming from the previous cell.
|
refvd : in std_logic_vector (W1 - 1 downto 0); -- This is the projection incoming from the previous cell.
|
colvd : in std_logic_vector (W1 - 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 (W1 - 1 downto 0); -- This is the projection of the sphere position over the ray traced vector, a.k.a. V.D! .
|
selvd : out std_logic_vector (W1 - 1 downto 0) -- This is the smallest value between refvd and colvd.
|
selvd : out std_logic_vector (W1 - 1 downto 0) -- This is the smallest value between refvd and colvd.
|
);
|
);
|
Line 96... |
Line 95... |
q => selvd
|
q => selvd
|
);
|
);
|
-- Another flip flip with 2 to 1 mux. Selects the column id the intersection signal of the smallest vd and the selected K.
|
-- Another flip flip with 2 to 1 mux. Selects the column id the intersection signal of the smallest vd and the selected K.
|
selectorID: scanFF
|
selectorID: scanFF
|
generic map (
|
generic map (
|
W = W1+IDW+1
|
W => W1+IDW+1
|
)
|
)
|
port map (
|
port map (
|
clk => clk,
|
clk => clk,
|
rst => rst,
|
rst => rst,
|
ena => pipeOn or scanOut,
|
ena => pipeOn or scanOut,
|