Line 27... |
Line 27... |
generic (
|
generic (
|
width : integer := 32
|
width : integer := 32
|
--!external_readable_widthad : integer := integer(ceil(log(real(external_readable_blocks),2.0))))
|
--!external_readable_widthad : integer := integer(ceil(log(real(external_readable_blocks),2.0))))
|
);
|
);
|
port (
|
port (
|
clk : in std_logic;
|
clk,ena : in std_logic;
|
paraminput : in std_logic_vector ((12*width)-1 downto 0); --! Vectores A,B,C,D
|
paraminput : in std_logic_vector ((12*width)-1 downto 0); --! Vectores A,B,C,D
|
prd32blko : in std_logic_vector ((06*width)-1 downto 0); --! Salidas de los 6 multiplicadores.
|
prd32blko : in std_logic_vector ((06*width)-1 downto 0); --! Salidas de los 6 multiplicadores.
|
add32blko : in std_logic_vector ((04*width)-1 downto 0); --! Salidas de los 4 sumadores.
|
add32blko : in std_logic_vector ((04*width)-1 downto 0); --! Salidas de los 4 sumadores.
|
sqr32blko,inv32blko : in std_logic_vector (width-1 downto 0); --! Salidas de la raiz cuadradas y el inversor.
|
sqr32blko,inv32blko : in std_logic_vector (width-1 downto 0); --! Salidas de la raiz cuadradas y el inversor.
|
fifo32x26_q : in std_logic_vector (03*width-1 downto 0); --! Salida de la cola intermedia.
|
fifo32x23_q : in std_logic_vector (03*width-1 downto 0); --! Salida de la cola intermedia.
|
fifo32x09_q : in std_logic_vector (02*width-1 downto 0); --! Salida de las colas de producto punto.
|
fifo32x09_q : in std_logic_vector (02*width-1 downto 0); --! Salida de las colas de producto punto.
|
unary,crossprod,addsub : in std_logic; --! Bit con el identificador del bloque AB vs CD e identificador del sub bloque (A/B) o (C/D).
|
unary,crossprod,addsub : in std_logic; --! Bit con el identificador del bloque AB vs CD e identificador del sub bloque (A/B) o (C/D).
|
scalar : in std_logic;
|
scalar : in std_logic;
|
sqr32blki,inv32blki : out std_logic_vector (width-1 downto 0); --! Salidas de las 2 raices cuadradas y los 2 inversores.
|
sqr32blki,inv32blki : out std_logic_vector (width-1 downto 0); --! Salidas de las 2 raices cuadradas y los 2 inversores.
|
fifo32x26_d : out std_logic_vector (03*width-1 downto 0); --! Entrada a la cola intermedia para la normalización.
|
fifo32x26_d : out std_logic_vector (03*width-1 downto 0); --! Entrada a la cola intermedia para la normalización.
|
Line 94... |
Line 94... |
for i in 07 downto 0 generate
|
for i in 07 downto 0 generate
|
add32blki(i*width+width-1 downto i*width) <= ssumando(i);
|
add32blki(i*width+width-1 downto i*width) <= ssumando(i);
|
resultoutput(i*width+width-1 downto i*width) <= sresult(i);
|
resultoutput(i*width+width-1 downto i*width) <= sresult(i);
|
end generate stuff08;
|
end generate stuff08;
|
|
|
process (clk)
|
register_products_outputs:
|
|
process (clk,ena)
|
begin
|
begin
|
if clk'event and clk='1' then
|
if clk'event and clk='1' and ena='1' then
|
for i 05 downto 0 loop
|
for i 05 downto 0 loop
|
sprd32blk(p0) <= prd32blko(i*width+width-1 downto i*width);
|
sprd32blk(i) <= prd32blko(i*width+width-1 downto i*width);
|
end loop;
|
end loop;
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
stuff04:
|
register_adder0_and_inversor_output:
|
for i in 03 downto 1 generate
|
process (clk,ena)
|
sadd32blk(i) <= add32blko(i*width+width-1 downto i*width);
|
|
end generate stuff04;
|
|
process (clk)
|
|
begin
|
begin
|
if clk'event and clk='1' then
|
if clk'event and clk='1' and ena='1' then
|
sadd32blk(a0) <= add32blko(a0*width+width-1 downto a0*width);
|
sadd32blk(a0) <= add32blko(a0*width+width-1 downto a0*width);
|
sinv32blk <= inv32blko;
|
sinv32blk <= inv32blko;
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
|
stuff04:
|
|
for i in 03 downto 1 generate
|
|
sadd32blk(i) <= add32blko(i*width+width-1 downto i*width);
|
|
end generate stuff04;
|
|
|
|
|
stuff03:
|
stuff03:
|
for i in 02 downto 0 generate
|
for i in 02 downto 0 generate
|
snormfifo_q(i) <= fifo32x26_q(i*width+width-1 downto i*width);
|
snormfifo_q(i) <= fifo32x23_q(i*width+width-1 downto i*width);
|
fifo32x26_d(i*width+width-1 downto i*width) <= snormfifo_d(i);
|
fifo32x26_d(i*width+width-1 downto i*width) <= snormfifo_d(i);
|
end generate stuff03;
|
end generate stuff03;
|
|
|
stuff02:
|
stuff02:
|
for i in 01 downto 0 generate
|
for i in 01 downto 0 generate
|