Line 41... |
Line 41... |
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.
|
fifo32x09_d : out std_logic_vector (02*width-1 downto 0); --! Entrada a las colas intermedias del producto punto.
|
fifo32x09_d : out std_logic_vector (02*width-1 downto 0); --! Entrada a las colas intermedias del producto punto.
|
prd32blki : out std_logic_vector ((12*width)-1 downto 0); --! Entrada de los 12 factores en el bloque de multiplicación respectivamente.
|
prd32blki : out std_logic_vector ((12*width)-1 downto 0); --! Entrada de los 12 factores en el bloque de multiplicación respectivamente.
|
add32blki : out std_logic_vector ((08*width)-1 downto 0); --! Entrada de los 8 sumandos del bloque de 4 sumadores.
|
add32blki : out std_logic_vector ((08*width)-1 downto 0); --! Entrada de los 8 sumandos del bloque de 4 sumadores.
|
res567w,res13w,res2w,res0w,res4w,fifo32x09_w,fifo32x23_w,fifo32x09_r,fifo32x23_r: out std_logic;
|
res567w,res13w,res2w : out std_logic; --! Salidas de escritura y lectura en las colas de resultados.
|
|
res0w,res4w,fifo32x09_w : out std_logic;
|
|
fifo32x23_w,fifo32x09_r : out std_logic;
|
|
fifo32x23_r : out std_logic;
|
|
res567f,res13f : in std_logic; --! Entradas de la señal de full de las colas de resultados.
|
|
res2f,res0f : in std_logic;
|
|
resf : out std_logic; --! Salida decodificada que indica que la cola de resultados de la operación está en curso.
|
resultoutput : out std_logic_vector ((08*width)-1 downto 0) --! 8 salidas de resultados, pues lo máximo que podrá calcularse por cada clock son 2 vectores.
|
resultoutput : out std_logic_vector ((08*width)-1 downto 0) --! 8 salidas de resultados, pues lo máximo que podrá calcularse por cada clock son 2 vectores.
|
);
|
);
|
end dpc;
|
end dpc;
|
|
|
architecture dpc_arch of dpc is
|
architecture dpc_arch of dpc is
|
Line 70... |
Line 76... |
type vectorblock04 is array (03 downto 0) of std_logic_vector(width-1 downto 0);
|
type vectorblock04 is array (03 downto 0) of std_logic_vector(width-1 downto 0);
|
type vectorblock03 is array (02 downto 0) of std_logic_vector(width-1 downto 0);
|
type vectorblock03 is array (02 downto 0) of std_logic_vector(width-1 downto 0);
|
type vectorblock02 is array (01 downto 0) of std_logic_vector(width-1 downto 0);
|
type vectorblock02 is array (01 downto 0) of std_logic_vector(width-1 downto 0);
|
|
|
|
|
|
|
signal sparaminput,sfactor : vectorblock12;
|
signal sparaminput,sfactor : vectorblock12;
|
signal ssumando,sresult : vectorblock08;
|
signal ssumando,sresult : vectorblock08;
|
signal sprd32blk : vectorblock06;
|
signal sprd32blk : vectorblock06;
|
signal sadd32blk : vectorblock04;
|
signal sadd32blk : vectorblock04;
|
signal snormfifo_q,snormfifo_d : vectorblock03;
|
signal snormfifo_q,snormfifo_d : vectorblock03;
|
signal sdpfifo_q : vectorblock02;
|
signal sdpfifo_q : vectorblock02;
|
signal ssqr32blk,sinv32blk : std_logic_vector(width-1 downto 0);
|
signal ssqr32blk,sinv32blk : std_logic_vector(width-1 downto 0);
|
|
|
signal ssync_chain : std_logic_vector(28 downto 0);
|
signal ssync_chain : std_logic_vector(28 downto 0);
|
signal ssync_chain_d : std_logic;
|
signal ssync_chain_d : std_logic;
|
|
|
|
|
constant rstMasterValue : std_logic := '0';
|
constant rstMasterValue : std_logic := '0';
|
|
|
begin
|
begin
|
|
|
--! Cadena de sincronización: 29 posiciones.
|
--! Cadena de sincronización: 29 posiciones.
|
Line 99... |
Line 107... |
ssync_chain(i) <= ssync_chain(i-1);
|
ssync_chain(i) <= ssync_chain(i-1);
|
end loop;
|
end loop;
|
end if;
|
end if;
|
end process sync_chain_proc;
|
end process sync_chain_proc;
|
--! Escritura en las colas de resultados y escritura/lectura en las colas intermedias mediante cadena de resultados.
|
--! Escritura en las colas de resultados y escritura/lectura en las colas intermedias mediante cadena de resultados.
|
fifo32x09_w <= ssync_chain(4);
|
fifo32x09_w <= ssync_chain(5);
|
fifo32x23_w <= ssync_chain(0);
|
fifo32x23_w <= ssync_chain(1);
|
fifo32x09_r <= ssync_chain(12);
|
fifo32x09_r <= ssync_chain(13);
|
fifo32x23_r <= ssync_chain(23);
|
fifo32x23_r <= ssync_chain(24);
|
|
res0w <= ssync_chain(23);
|
res0w <= ssync_chain(22);
|
res4w <= ssync_chain(21);
|
res4w <= ssync_chain(20);
|
|
sync_chain_comb:
|
sync_chain_comb:
|
process (ssync_chain,addsub,crossprod,unary)
|
process (ssync_chain,addsub,crossprod,unary)
|
begin
|
begin
|
if unary='1' then
|
if unary='1' then
|
res567w <= ssync_chain(27);
|
res567w <= ssync_chain(28);
|
else
|
else
|
res567w <= ssync_chain(3);
|
res567w <= ssync_chain(4);
|
end if;
|
end if;
|
|
|
if addsub='1' then
|
if addsub='1' then
|
res13w <= ssync_chain(8);
|
res13w <= ssync_chain(9);
|
res2w <= ssync_chain(8);
|
res2w <= ssync_chain(9);
|
else
|
else
|
res13w <= ssync_chain(12);
|
res13w <= ssync_chain(13);
|
if crossprod='1' then
|
if crossprod='1' then
|
res2w <= ssync_chain(12);
|
res2w <= ssync_chain(13);
|
else
|
else
|
res2w <= ssync_chain(21);
|
res2w <= ssync_chain(22);
|
end if;
|
end if;
|
end if;
|
end if;
|
end process sync_chain_comb;
|
end process sync_chain_comb;
|
|
|
|
|
Line 213... |
Line 220... |
--! Conectar las entradas del sumador a, a la salida
|
--! Conectar las entradas del sumador a, a la salida
|
ssumando(s6) <= sadd32blk(a2);
|
ssumando(s6) <= sadd32blk(a2);
|
ssumando(s7) <= sdpfifo_q(dpfifocd);
|
ssumando(s7) <= sdpfifo_q(dpfifocd);
|
|
|
|
|
|
fullQ:process(res0f,res13f,res2f,res567f,unary,crossprod,addsub)
|
|
begin
|
|
if unary='0' then
|
|
if crossprod='1' or addsub='1' then
|
|
resf <= res13f;
|
|
else
|
|
resf <= res2f;
|
|
end if;
|
|
elsif crossprod='1' or addsub='1' then
|
|
resf <= res567f;
|
|
else
|
|
resf <= res0f;
|
|
end if;
|
|
end process;
|
|
|
|
|
mul:process(unary,addsub,crossprod,sparaminput,sinv32blk,sprd32blk,sadd32blk,sdpfifo_q,snormfifo_q)
|
mul:process(unary,addsub,crossprod,sparaminput,sinv32blk,sprd32blk,sadd32blk,sdpfifo_q,snormfifo_q)
|
begin
|
begin
|
|
|
sfactor(f4) <= sparaminput(az);
|
sfactor(f4) <= sparaminput(az);
|
if unary='1' then
|
if unary='1' then
|