Line 22... |
Line 22... |
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
entity dpc is
|
entity dpc is
|
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 (
|
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.
|
Line 135... |
Line 135... |
--! Signo de los 3 primeros sumadores
|
--! Signo de los 3 primeros sumadores
|
|
|
|
|
|
|
|
|
mul:process(unary,addsub,crossprod,scalar,sparaminput,sinv32blk,sprd32blk,sdpfifo_q,snormfifo_q)
|
mul:process(unary,addsub,crossprod,scalar,sparaminput,sinv32blk,sprd32blk,sadd32blk,sdpfifo_q,snormfifo_q)
|
begin
|
begin
|
|
|
|
|
if unary='1' then
|
if unary='1' then
|
--! Magnitud y normalizacion
|
--! Magnitud y normalizacion
|
Line 208... |
Line 208... |
ssumando(s4) <= sparaminput(az);
|
ssumando(s4) <= sparaminput(az);
|
ssumando(s5) <= sparaminput(bz);
|
ssumando(s5) <= sparaminput(bz);
|
else
|
else
|
ssumando(s0) <= sprd32blk(p0);
|
ssumando(s0) <= sprd32blk(p0);
|
ssumando(s1) <= sprd32blk(p1);
|
ssumando(s1) <= sprd32blk(p1);
|
ssumando(s2) <= sdpfifo_q(dpfifoab);
|
if crossprod='0' then
|
ssumando(s3) <= sprd32blk(p2);
|
ssumando(s2) <= sadd32blk(a0);
|
|
ssumando(s3) <= sdpfifo_q(dpfifoab);
|
|
else
|
|
ssumando(s2) <= sprd32blk(p2);
|
|
ssumando(s3) <= sprd32blk(p3);
|
|
end if;
|
ssumando(s4) <= sprd32blk(p4);
|
ssumando(s4) <= sprd32blk(p4);
|
ssumando(s5) <= sprd32blk(p5);
|
ssumando(s5) <= sprd32blk(p5);
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|