| 1 |
123 |
jguarin200 |
--! @file dpc.vhd
|
| 2 |
122 |
jguarin200 |
--! @brief Decodificador de operacion.
|
| 3 |
128 |
jguarin200 |
--! @author Julián Andrés Guarín Reyes
|
| 4 |
122 |
jguarin200 |
--------------------------------------------------------------
|
| 5 |
|
|
-- RAYTRAC
|
| 6 |
|
|
-- Author Julian Andres Guarin
|
| 7 |
123 |
jguarin200 |
-- dpc.vhd
|
| 8 |
122 |
jguarin200 |
-- This file is part of raytrac.
|
| 9 |
|
|
--
|
| 10 |
|
|
-- raytrac is free software: you can redistribute it and/or modify
|
| 11 |
|
|
-- it under the terms of the GNU General Public License as published by
|
| 12 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
| 13 |
|
|
-- (at your option) any later version.
|
| 14 |
|
|
--
|
| 15 |
|
|
-- raytrac is distributed in the hope that it will be useful,
|
| 16 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 17 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 18 |
|
|
-- GNU General Public License for more details.
|
| 19 |
|
|
--
|
| 20 |
|
|
-- You should have received a copy of the GNU General Public License
|
| 21 |
|
|
-- along with raytrac. If not, see <http://www.gnu.org/licenses/>.
|
| 22 |
|
|
|
| 23 |
|
|
library ieee;
|
| 24 |
|
|
use ieee.std_logic_1164.all;
|
| 25 |
134 |
jguarin200 |
|
| 26 |
123 |
jguarin200 |
entity dpc is
|
| 27 |
122 |
jguarin200 |
generic (
|
| 28 |
132 |
jguarin200 |
width : integer := 32
|
| 29 |
|
|
--!external_readable_widthad : integer := integer(ceil(log(real(external_readable_blocks),2.0))))
|
| 30 |
122 |
jguarin200 |
);
|
| 31 |
|
|
port (
|
| 32 |
143 |
jguarin200 |
clk,rst : in std_logic;
|
| 33 |
127 |
jguarin200 |
paraminput : in std_logic_vector ((12*width)-1 downto 0); --! Vectores A,B,C,D
|
| 34 |
|
|
prd32blko : in std_logic_vector ((06*width)-1 downto 0); --! Salidas de los 6 multiplicadores.
|
| 35 |
|
|
add32blko : in std_logic_vector ((04*width)-1 downto 0); --! Salidas de los 4 sumadores.
|
| 36 |
136 |
jguarin200 |
sqr32blko,inv32blko : in std_logic_vector (width-1 downto 0); --! Salidas de la raiz cuadradas y el inversor.
|
| 37 |
138 |
jguarin200 |
fifo32x23_q : in std_logic_vector (03*width-1 downto 0); --! Salida de la cola intermedia.
|
| 38 |
127 |
jguarin200 |
fifo32x09_q : in std_logic_vector (02*width-1 downto 0); --! Salida de las colas de producto punto.
|
| 39 |
|
|
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).
|
| 40 |
145 |
jguarin200 |
sync_chain_0 : in std_logic; --! Señal de dato valido que se va por toda la cadena de sincronizacion.
|
| 41 |
147 |
jguarin200 |
eoi_int : in std_logic; --! Sennal de interrupción de final de instrucción.
|
| 42 |
|
|
eoi_demuxed_int : out std_logic_vector (3 downto 0); --! Señal de interrupción de final de instrucción pero esta vez va asociada a la instruccón UCA.
|
| 43 |
136 |
jguarin200 |
sqr32blki,inv32blki : out std_logic_vector (width-1 downto 0); --! Salidas de las 2 raices cuadradas y los 2 inversores.
|
| 44 |
127 |
jguarin200 |
fifo32x26_d : out std_logic_vector (03*width-1 downto 0); --! Entrada a la cola intermedia para la normalización.
|
| 45 |
|
|
fifo32x09_d : out std_logic_vector (02*width-1 downto 0); --! Entrada a las colas intermedias del producto punto.
|
| 46 |
|
|
prd32blki : out std_logic_vector ((12*width)-1 downto 0); --! Entrada de los 12 factores en el bloque de multiplicación respectivamente.
|
| 47 |
|
|
add32blki : out std_logic_vector ((08*width)-1 downto 0); --! Entrada de los 8 sumandos del bloque de 4 sumadores.
|
| 48 |
143 |
jguarin200 |
res567w,res13w,res2w : out std_logic; --! Salidas de escritura y lectura en las colas de resultados.
|
| 49 |
|
|
res0w,res4w,fifo32x09_w : out std_logic;
|
| 50 |
|
|
fifo32x23_w,fifo32x09_r : out std_logic;
|
| 51 |
|
|
fifo32x23_r : out std_logic;
|
| 52 |
|
|
res567f,res13f : in std_logic; --! Entradas de la señal de full de las colas de resultados.
|
| 53 |
|
|
res2f,res0f : in std_logic;
|
| 54 |
147 |
jguarin200 |
resf : out std_logic; --! Salida decodificada que indica que la cola de resultados de la operación que está en curso.
|
| 55 |
140 |
jguarin200 |
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.
|
| 56 |
122 |
jguarin200 |
);
|
| 57 |
123 |
jguarin200 |
end dpc;
|
| 58 |
122 |
jguarin200 |
|
| 59 |
123 |
jguarin200 |
architecture dpc_arch of dpc is
|
| 60 |
125 |
jguarin200 |
|
| 61 |
|
|
constant qz : integer := 00;constant qy : integer := 01;constant qx : integer := 02;
|
| 62 |
123 |
jguarin200 |
constant az : integer := 00;constant ay : integer := 01;constant ax : integer := 02;constant bz : integer := 03;constant by : integer := 04;constant bx : integer := 05;
|
| 63 |
|
|
constant cz : integer := 06;constant cy : integer := 07;constant cx : integer := 08;constant dz : integer := 09;constant dy : integer := 10;constant dx : integer := 11;
|
| 64 |
|
|
constant f0 : integer := 00;constant f1 : integer := 01;constant f2 : integer := 02;constant f3 : integer := 03;constant f4 : integer := 04;constant f5 : integer := 05;
|
| 65 |
|
|
constant f6 : integer := 06;constant f7 : integer := 07;constant f8 : integer := 08;constant f9 : integer := 09;constant f10: integer := 10;constant f11: integer := 11;
|
| 66 |
|
|
constant s0 : integer := 00;constant s1 : integer := 01;constant s2 : integer := 02;constant s3 : integer := 03;constant s4 : integer := 04;constant s5 : integer := 05;
|
| 67 |
127 |
jguarin200 |
constant s6 : integer := 06;constant s7 : integer := 07;
|
| 68 |
|
|
constant a0 : integer := 00;constant a1 : integer := 01;constant a2 : integer := 02;constant aa : integer := 03;
|
| 69 |
123 |
jguarin200 |
constant p0 : integer := 00;constant p1 : integer := 01;constant p2 : integer := 02;constant p3 : integer := 03;constant p4 : integer := 04;constant p5 : integer := 05;
|
| 70 |
127 |
jguarin200 |
|
| 71 |
124 |
jguarin200 |
constant dpfifoab : integer := 00;
|
| 72 |
|
|
constant dpfifocd : integer := 01;
|
| 73 |
|
|
|
| 74 |
122 |
jguarin200 |
|
| 75 |
123 |
jguarin200 |
type vectorblock12 is array (11 downto 0) of std_logic_vector(width-1 downto 0);
|
| 76 |
127 |
jguarin200 |
type vectorblock08 is array (07 downto 0) of std_logic_vector(width-1 downto 0);
|
| 77 |
123 |
jguarin200 |
type vectorblock06 is array (05 downto 0) of std_logic_vector(width-1 downto 0);
|
| 78 |
127 |
jguarin200 |
type vectorblock04 is array (03 downto 0) of std_logic_vector(width-1 downto 0);
|
| 79 |
124 |
jguarin200 |
type vectorblock03 is array (02 downto 0) of std_logic_vector(width-1 downto 0);
|
| 80 |
123 |
jguarin200 |
type vectorblock02 is array (01 downto 0) of std_logic_vector(width-1 downto 0);
|
| 81 |
122 |
jguarin200 |
|
| 82 |
127 |
jguarin200 |
|
| 83 |
143 |
jguarin200 |
|
| 84 |
127 |
jguarin200 |
signal sparaminput,sfactor : vectorblock12;
|
| 85 |
|
|
signal ssumando,sresult : vectorblock08;
|
| 86 |
|
|
signal sprd32blk : vectorblock06;
|
| 87 |
|
|
signal sadd32blk : vectorblock04;
|
| 88 |
125 |
jguarin200 |
signal snormfifo_q,snormfifo_d : vectorblock03;
|
| 89 |
127 |
jguarin200 |
signal sdpfifo_q : vectorblock02;
|
| 90 |
|
|
signal ssqr32blk,sinv32blk : std_logic_vector(width-1 downto 0);
|
| 91 |
142 |
jguarin200 |
signal ssync_chain : std_logic_vector(28 downto 0);
|
| 92 |
143 |
jguarin200 |
signal ssync_chain_d : std_logic;
|
| 93 |
|
|
|
| 94 |
|
|
|
| 95 |
140 |
jguarin200 |
constant rstMasterValue : std_logic := '0';
|
| 96 |
|
|
|
| 97 |
123 |
jguarin200 |
begin
|
| 98 |
122 |
jguarin200 |
|
| 99 |
142 |
jguarin200 |
--! Cadena de sincronización: 29 posiciones.
|
| 100 |
145 |
jguarin200 |
ssync_chain(0) <= sync_chain_0;
|
| 101 |
140 |
jguarin200 |
sync_chain_proc:
|
| 102 |
|
|
process(clk,rst)
|
| 103 |
|
|
begin
|
| 104 |
|
|
if rst=rstMasterValue then
|
| 105 |
145 |
jguarin200 |
ssync_chain(28 downto 1) <= (others => '0');
|
| 106 |
140 |
jguarin200 |
elsif clk'event and clk='1' then
|
| 107 |
142 |
jguarin200 |
for i in 28 downto 1 loop
|
| 108 |
|
|
ssync_chain(i) <= ssync_chain(i-1);
|
| 109 |
140 |
jguarin200 |
end loop;
|
| 110 |
|
|
end if;
|
| 111 |
|
|
end process sync_chain_proc;
|
| 112 |
144 |
jguarin200 |
|
| 113 |
140 |
jguarin200 |
--! Escritura en las colas de resultados y escritura/lectura en las colas intermedias mediante cadena de resultados.
|
| 114 |
143 |
jguarin200 |
fifo32x09_w <= ssync_chain(5);
|
| 115 |
|
|
fifo32x23_w <= ssync_chain(1);
|
| 116 |
|
|
fifo32x09_r <= ssync_chain(13);
|
| 117 |
|
|
fifo32x23_r <= ssync_chain(24);
|
| 118 |
|
|
res0w <= ssync_chain(23);
|
| 119 |
|
|
res4w <= ssync_chain(21);
|
| 120 |
140 |
jguarin200 |
sync_chain_comb:
|
| 121 |
142 |
jguarin200 |
process (ssync_chain,addsub,crossprod,unary)
|
| 122 |
140 |
jguarin200 |
begin
|
| 123 |
|
|
if unary='1' then
|
| 124 |
143 |
jguarin200 |
res567w <= ssync_chain(28);
|
| 125 |
140 |
jguarin200 |
else
|
| 126 |
143 |
jguarin200 |
res567w <= ssync_chain(4);
|
| 127 |
140 |
jguarin200 |
end if;
|
| 128 |
127 |
jguarin200 |
|
| 129 |
140 |
jguarin200 |
if addsub='1' then
|
| 130 |
143 |
jguarin200 |
res13w <= ssync_chain(9);
|
| 131 |
|
|
res2w <= ssync_chain(9);
|
| 132 |
140 |
jguarin200 |
else
|
| 133 |
143 |
jguarin200 |
res13w <= ssync_chain(13);
|
| 134 |
140 |
jguarin200 |
if crossprod='1' then
|
| 135 |
143 |
jguarin200 |
res2w <= ssync_chain(13);
|
| 136 |
140 |
jguarin200 |
else
|
| 137 |
143 |
jguarin200 |
res2w <= ssync_chain(22);
|
| 138 |
140 |
jguarin200 |
end if;
|
| 139 |
|
|
end if;
|
| 140 |
|
|
end process sync_chain_comb;
|
| 141 |
|
|
|
| 142 |
|
|
|
| 143 |
|
|
--! El siguiente código sirve para conectar arreglos a señales std_logic_1164, simplemente son abstracciones a nivel de código y no representará cambios en la síntesis.
|
| 144 |
123 |
jguarin200 |
stuff12:
|
| 145 |
|
|
for i in 11 downto 0 generate
|
| 146 |
|
|
sparaminput(i) <= paraminput(i*width+width-1 downto i*width);
|
| 147 |
|
|
prd32blki(i*width+width-1 downto i*width) <= sfactor(i);
|
| 148 |
127 |
jguarin200 |
end generate stuff12;
|
| 149 |
|
|
stuff08:
|
| 150 |
|
|
for i in 07 downto 0 generate
|
| 151 |
123 |
jguarin200 |
add32blki(i*width+width-1 downto i*width) <= ssumando(i);
|
| 152 |
127 |
jguarin200 |
resultoutput(i*width+width-1 downto i*width) <= sresult(i);
|
| 153 |
|
|
end generate stuff08;
|
| 154 |
138 |
jguarin200 |
stuff04:
|
| 155 |
|
|
for i in 03 downto 1 generate
|
| 156 |
|
|
sadd32blk(i) <= add32blko(i*width+width-1 downto i*width);
|
| 157 |
|
|
end generate stuff04;
|
| 158 |
|
|
|
| 159 |
|
|
|
| 160 |
124 |
jguarin200 |
stuff03:
|
| 161 |
|
|
for i in 02 downto 0 generate
|
| 162 |
138 |
jguarin200 |
snormfifo_q(i) <= fifo32x23_q(i*width+width-1 downto i*width);
|
| 163 |
124 |
jguarin200 |
fifo32x26_d(i*width+width-1 downto i*width) <= snormfifo_d(i);
|
| 164 |
|
|
end generate stuff03;
|
| 165 |
|
|
|
| 166 |
123 |
jguarin200 |
stuff02:
|
| 167 |
127 |
jguarin200 |
for i in 01 downto 0 generate
|
| 168 |
|
|
sdpfifo_q(i) <= fifo32x09_q(i*width+width-1 downto i*width);
|
| 169 |
123 |
jguarin200 |
end generate stuff02;
|
| 170 |
140 |
jguarin200 |
|
| 171 |
|
|
--! El siguiente código sirve para conectar arreglos a señales std_logic_1164, son abstracciones de código también, sin embargo se realizan a través de registros.
|
| 172 |
|
|
register_products_outputs:
|
| 173 |
|
|
process (clk)
|
| 174 |
|
|
begin
|
| 175 |
|
|
if clk'event and clk='1' then
|
| 176 |
|
|
for i in 05 downto 0 loop
|
| 177 |
|
|
sprd32blk(i) <= prd32blko(i*width+width-1 downto i*width);
|
| 178 |
|
|
end loop;
|
| 179 |
|
|
end if;
|
| 180 |
|
|
end process;
|
| 181 |
|
|
--! Los productos del multiplicador 2 y 3, ya registrados dentro de dpc van a la cola intermedia del producto punto (fifo32x09_d)
|
| 182 |
124 |
jguarin200 |
fifo32x09_d <= sprd32blk(p3)&sprd32blk(p2);
|
| 183 |
140 |
jguarin200 |
register_adder0_and_inversor_output:
|
| 184 |
|
|
process (clk)
|
| 185 |
|
|
begin
|
| 186 |
|
|
if clk'event and clk='1' then
|
| 187 |
|
|
sadd32blk(a0) <= add32blko(a0*width+width-1 downto a0*width);
|
| 188 |
|
|
sinv32blk <= inv32blko;
|
| 189 |
|
|
end if;
|
| 190 |
|
|
end process;
|
| 191 |
122 |
jguarin200 |
|
| 192 |
127 |
jguarin200 |
|
| 193 |
|
|
|
| 194 |
140 |
jguarin200 |
|
| 195 |
144 |
jguarin200 |
--! Raiz Cuadrada.
|
| 196 |
127 |
jguarin200 |
ssqr32blk <= sqr32blko;
|
| 197 |
|
|
|
| 198 |
136 |
jguarin200 |
--! Colas de salida de los distintos resultados;
|
| 199 |
127 |
jguarin200 |
sresult(0) <= ssqr32blk;
|
| 200 |
|
|
sresult(1) <= sadd32blk(a0);
|
| 201 |
|
|
sresult(2) <= sadd32blk(a1);
|
| 202 |
|
|
sresult(3) <= sadd32blk(a2);
|
| 203 |
|
|
sresult(4) <= sadd32blk(aa);
|
| 204 |
|
|
sresult(5) <= sprd32blk(p3);
|
| 205 |
|
|
sresult(6) <= sprd32blk(p4);
|
| 206 |
|
|
sresult(7) <= sprd32blk(p5);
|
| 207 |
|
|
|
| 208 |
|
|
--! Cola de normalizacion
|
| 209 |
|
|
snormfifo_d(qx) <= sparaminput(ax);
|
| 210 |
|
|
snormfifo_d(qy) <= sparaminput(ay);
|
| 211 |
|
|
snormfifo_d(qz) <= sparaminput(az);
|
| 212 |
|
|
|
| 213 |
|
|
|
| 214 |
|
|
|
| 215 |
136 |
jguarin200 |
--! La entrada al inversor SIEMPRE viene con la salida de la raiz cuadrada
|
| 216 |
|
|
inv32blki <= sqr32blko;
|
| 217 |
139 |
jguarin200 |
--! La entrada de la ra�z cuadrada SIEMPRE viene con la salida del sumador 1.
|
| 218 |
136 |
jguarin200 |
sqr32blki <= sadd32blk(a1);
|
| 219 |
127 |
jguarin200 |
|
| 220 |
|
|
|
| 221 |
136 |
jguarin200 |
|
| 222 |
|
|
--! Conectar las entradas del sumador a, a la salida
|
| 223 |
|
|
ssumando(s6) <= sadd32blk(a2);
|
| 224 |
|
|
ssumando(s7) <= sdpfifo_q(dpfifocd);
|
| 225 |
|
|
|
| 226 |
144 |
jguarin200 |
--!El siguiente proceso conecta la señal de cola "casi llena", de la cola que corresponde al resultado de la operación indicada por los bit UCA (Unary, Crossprod, Addsub).
|
| 227 |
143 |
jguarin200 |
fullQ:process(res0f,res13f,res2f,res567f,unary,crossprod,addsub)
|
| 228 |
|
|
begin
|
| 229 |
|
|
if unary='0' then
|
| 230 |
147 |
jguarin200 |
if crossprod='1' or addsub='1' then
|
| 231 |
|
|
eoi_demuxed_int <= "00"&eoi_int&'0';
|
| 232 |
143 |
jguarin200 |
resf <= res13f;
|
| 233 |
|
|
else
|
| 234 |
147 |
jguarin200 |
eoi_demuxed_int <= '0'&eoi_int&"00";
|
| 235 |
143 |
jguarin200 |
resf <= res2f;
|
| 236 |
|
|
end if;
|
| 237 |
|
|
elsif crossprod='1' or addsub='1' then
|
| 238 |
147 |
jguarin200 |
eoi_demuxed_int <= eoi_int&"000";
|
| 239 |
143 |
jguarin200 |
resf <= res567f;
|
| 240 |
|
|
else
|
| 241 |
147 |
jguarin200 |
eoi_demuxed_int <= "000"&eoi_int;
|
| 242 |
143 |
jguarin200 |
resf <= res0f;
|
| 243 |
|
|
end if;
|
| 244 |
|
|
end process;
|
| 245 |
|
|
|
| 246 |
144 |
jguarin200 |
--! Decodificación del Datapath.
|
| 247 |
142 |
jguarin200 |
mul:process(unary,addsub,crossprod,sparaminput,sinv32blk,sprd32blk,sadd32blk,sdpfifo_q,snormfifo_q)
|
| 248 |
123 |
jguarin200 |
begin
|
| 249 |
124 |
jguarin200 |
|
| 250 |
142 |
jguarin200 |
sfactor(f4) <= sparaminput(az);
|
| 251 |
127 |
jguarin200 |
if unary='1' then
|
| 252 |
|
|
--! Magnitud y normalizacion
|
| 253 |
|
|
sfactor(f0) <= sparaminput(ax);
|
| 254 |
|
|
sfactor(f1) <= sparaminput(ax);
|
| 255 |
|
|
sfactor(f2) <= sparaminput(ay);
|
| 256 |
|
|
sfactor(f3) <= sparaminput(ay);
|
| 257 |
142 |
jguarin200 |
|
| 258 |
127 |
jguarin200 |
sfactor(f5) <= sparaminput(az);
|
| 259 |
142 |
jguarin200 |
if crossprod='1' and addsub='1' then
|
| 260 |
|
|
sfactor(f6) <= sparaminput(cx);
|
| 261 |
|
|
sfactor(f7) <= sparaminput(dx);
|
| 262 |
|
|
sfactor(f8) <= sparaminput(cy);
|
| 263 |
|
|
sfactor(f9) <= sparaminput(dx);
|
| 264 |
|
|
sfactor(f10) <= sparaminput(cz);
|
| 265 |
|
|
sfactor(f11) <= sparaminput(dx);
|
| 266 |
|
|
else
|
| 267 |
|
|
sfactor(f6) <= snormfifo_q(ax);
|
| 268 |
|
|
sfactor(f7) <= sinv32blk;
|
| 269 |
|
|
sfactor(f8) <= snormfifo_q(ay);
|
| 270 |
|
|
sfactor(f9) <= sinv32blk;
|
| 271 |
|
|
sfactor(f10) <= snormfifo_q(az);
|
| 272 |
|
|
sfactor(f11) <= sinv32blk;
|
| 273 |
|
|
end if;
|
| 274 |
|
|
|
| 275 |
|
|
|
| 276 |
|
|
elsif addsub='0' then
|
| 277 |
|
|
--! Solo productos punto o cruz
|
| 278 |
|
|
if crossprod='1' then
|
| 279 |
|
|
|
| 280 |
|
|
sfactor(f0) <= sparaminput(ay);
|
| 281 |
|
|
sfactor(f1) <= sparaminput(bz);
|
| 282 |
|
|
sfactor(f2) <= sparaminput(az);
|
| 283 |
|
|
sfactor(f3) <= sparaminput(by);
|
| 284 |
|
|
|
| 285 |
|
|
sfactor(f5) <= sparaminput(bx);
|
| 286 |
|
|
sfactor(f6) <= sparaminput(ax);
|
| 287 |
|
|
sfactor(f7) <= sparaminput(bz);
|
| 288 |
|
|
sfactor(f8) <= sparaminput(ax);
|
| 289 |
|
|
sfactor(f9) <= sparaminput(by);
|
| 290 |
|
|
sfactor(f10) <= sparaminput(ay);
|
| 291 |
|
|
sfactor(f11) <= sparaminput(bx);
|
| 292 |
|
|
|
| 293 |
|
|
else
|
| 294 |
|
|
|
| 295 |
|
|
sfactor(f0) <= sparaminput(ax) ;
|
| 296 |
|
|
sfactor(f1) <= sparaminput(bx) ;
|
| 297 |
|
|
sfactor(f2) <= sparaminput(ay) ;
|
| 298 |
|
|
sfactor(f3) <= sparaminput(by) ;
|
| 299 |
|
|
sfactor(f5) <= sparaminput(bz) ;
|
| 300 |
|
|
sfactor(f6) <= sparaminput(cx) ;
|
| 301 |
|
|
sfactor(f7) <= sparaminput(dx) ;
|
| 302 |
|
|
sfactor(f8) <= sparaminput(cy) ;
|
| 303 |
|
|
sfactor(f9) <= sparaminput(dy) ;
|
| 304 |
|
|
sfactor(f10) <= sparaminput(cz) ;
|
| 305 |
|
|
sfactor(f11) <= sparaminput(dz) ;
|
| 306 |
|
|
end if;
|
| 307 |
|
|
|
| 308 |
127 |
jguarin200 |
else
|
| 309 |
|
|
sfactor(f0) <= sparaminput(ax) ;
|
| 310 |
|
|
sfactor(f1) <= sparaminput(bx) ;
|
| 311 |
|
|
sfactor(f2) <= sparaminput(ay) ;
|
| 312 |
|
|
sfactor(f3) <= sparaminput(by) ;
|
| 313 |
|
|
sfactor(f5) <= sparaminput(bz) ;
|
| 314 |
|
|
sfactor(f6) <= sparaminput(cx) ;
|
| 315 |
|
|
sfactor(f7) <= sparaminput(dx) ;
|
| 316 |
|
|
sfactor(f8) <= sparaminput(cy) ;
|
| 317 |
|
|
sfactor(f9) <= sparaminput(dx) ;
|
| 318 |
|
|
sfactor(f10) <= sparaminput(cz) ;
|
| 319 |
|
|
sfactor(f11) <= sparaminput(dx) ;
|
| 320 |
125 |
jguarin200 |
end if;
|
| 321 |
127 |
jguarin200 |
|
| 322 |
136 |
jguarin200 |
|
| 323 |
127 |
jguarin200 |
if addsub='1' then
|
| 324 |
|
|
ssumando(s0) <= sparaminput(ax);
|
| 325 |
|
|
ssumando(s1) <= sparaminput(bx);
|
| 326 |
|
|
ssumando(s2) <= sparaminput(ay);
|
| 327 |
|
|
ssumando(s3) <= sparaminput(by);
|
| 328 |
|
|
ssumando(s4) <= sparaminput(az);
|
| 329 |
|
|
ssumando(s5) <= sparaminput(bz);
|
| 330 |
|
|
else
|
| 331 |
|
|
ssumando(s0) <= sprd32blk(p0);
|
| 332 |
|
|
ssumando(s1) <= sprd32blk(p1);
|
| 333 |
132 |
jguarin200 |
if crossprod='0' then
|
| 334 |
|
|
ssumando(s2) <= sadd32blk(a0);
|
| 335 |
|
|
ssumando(s3) <= sdpfifo_q(dpfifoab);
|
| 336 |
|
|
else
|
| 337 |
|
|
ssumando(s2) <= sprd32blk(p2);
|
| 338 |
|
|
ssumando(s3) <= sprd32blk(p3);
|
| 339 |
|
|
end if;
|
| 340 |
127 |
jguarin200 |
ssumando(s4) <= sprd32blk(p4);
|
| 341 |
|
|
ssumando(s5) <= sprd32blk(p5);
|
| 342 |
|
|
end if;
|
| 343 |
123 |
jguarin200 |
end process;
|
| 344 |
|
|
|
| 345 |
|
|
|
| 346 |
127 |
jguarin200 |
|
| 347 |
123 |
jguarin200 |
end dpc_arch;
|