OpenCores
URL https://opencores.org/ocsvn/raytrac/raytrac/trunk

Subversion Repositories raytrac

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /raytrac/trunk
    from Rev 117 to Rev 118
    Reverse comparison

Rev 117 → Rev 118

/fpbranch/unrm/shftr.vhd
57,7 → 57,7
);
end component;
signal s1zero : std_logic;
signal s1delta : std_logic_vector(5 downto 0);
signal s0delta,s1exp,s2exp,s3exp,s4exp,s5exp,s5factor,s6exp,s6factor: std_logic_vector(7 downto 0);
signal s1shifter,s5factorhot9 : std_logic_vector(8 downto 0);
83,6 → 83,11
 
--!Etapa 0,Escoger el mayor exponente que sera el resultado desnormalizado, calcula cuanto debe ser el corrimiento de la mantissa con menor exponente y reorganiza los operandos, si el mayor es b, intercambia las posición si el mayor es a las posiciones la mantiene. Zero check.
--!signo,exponente,mantissa
if (s0b(30 downto 23)&s0a(30 downto 23))=x"0000" then
s1zero <= '0';
else
s1zero <= '1';
end if;
s1delta <= s0delta(7) & (s0delta(7) xor s0delta(4))&(s0delta(7) xor s0delta(4)) & s0delta(2 downto 0);
case s0delta(7) is
when '1' =>
96,7 → 101,7
end case;
--! Etapa 1: Denormalizaci&oacute;n de la mantissas.
case s0delta(4 downto 3) is
case s1delta(4 downto 3) is
when "00" => s2umantshift <= s1umantshift(23)&s1postshift(23 downto 0);
when "01" => s2umantshift <= s1umantshift(23)&x"00"&s1postshift(23 downto 8);
when "10" => s2umantshift <= s1umantshift(23)&x"0000"&s1postshift(23 downto 16);
127,7 → 132,7
--! Etapa 6: Entregar el resultado.
c32(31) <= s6result(25);
c32(30 downto 23) <= s6exp+s5factor+x"ff";
c32(30 downto 23) <= s6exp+s6factor+x"ff";
case s6factor(4 downto 3) is
when "01" => c32(22 downto 0) <= s6postshift(14 downto 00)&x"00";
when "10" => c32(22 downto 0) <= s6postshift(06 downto 00)&x"0000";
155,7 → 160,7
end process;
denormhighshiftermult:lpm_mult
generic map ("DEDICATED_MULTIPLIER_CIRCUITRY=YES,MAXIMIZE_SPEED=9","UNSIGNED","LPM_MULT",9,18,27)
port map (s1shifter,'1'&s1umantshift(22 downto 06),s1ph);
port map (s1shifter,s1zero&s1umantshift(22 downto 06),s1ph);
denormlowshiftermult:lpm_mult
generic map ("DEDICATED_MULTIPLIER_CIRCUITRY=YES,MAXIMIZE_SPEED=9","UNSIGNED","LPM_MULT",9,9,18)
port map (s1shifter,s1umantshift(5 downto 0)&"000",s1pl);
/fpbranch/add/ema32x2.vhd
240,10 → 240,7
s1signeddata56b(i) <= s1signb xor s1data40b(i);
end loop;
end if;
end process;
s1b2b1s:
for i in 22 downto 0 generate
b1s(i) <= s1b(22-i);
254,14 → 251,11
end generate;
s1sma(23) <= not(s1a(31));
s1sma(24) <= s1a(31);
--! Combinatorial Gremlin, Etapa2: Finalizar la denormalizaci&oacute;n de b.
s2signslab:
for i in 16 downto 0 generate
s2slab(i) <= s2smb(24);
end generate s2signslab;
--! Combinatorial Gremlin, Etapa 3 Realizar la suma, quitar el signo de la mantissa y codificar el corrimiento hacia la izquierda.
--adder:sadd2
--port map (s3sma(24)&s3sma,s3smb(24)&s3smb,dpc,s3res);
270,7 → 264,6
--! Magia: La suma ocurre aqui
s3res <= (s3sma(24)&s3sma)+(s3smb(24)&s3smb);
end process;
process(s3res)
variable lshift : integer range 24 downto 0;
begin
285,8 → 278,6
s3ures(24) <= s3res(24) xor s3res(25);
s3lshift <= conv_std_logic_vector(lshift,5);
end process;
--! Combinatorial Gremlin, Etapa 4 corrimientos y normalizaci&oacute;n de la mantissa resultado.
normsupershiftermult:lpm_mult
generic map ("DEDICATED_MULTIPLIER_CIRCUITRY=YES,MAXIMIZE_SPEED=9","UNSIGNED","LPM_MULT",9,9,18)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.