URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [trunk/] [vhdl/] [mult.vhd] - Diff between revs 390 and 391
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 390 |
Rev 391 |
Line 124... |
Line 124... |
when MULT_SIGNED_MULT =>
|
when MULT_SIGNED_MULT =>
|
mode_reg <= MODE_MULT;
|
mode_reg <= MODE_MULT;
|
if b(31) = '0' then
|
if b(31) = '0' then
|
aa_reg <= a;
|
aa_reg <= a;
|
bb_reg <= b;
|
bb_reg <= b;
|
sign_reg <= a(31);
|
|
---- Special case of 0x80000000 * negative number
|
|
--elsif a(31) = '1' and (a(30 downto 0) = ZERO(30 downto 0) or
|
|
-- b(30 downto 0) = ZERO(30 downto 0)) then
|
|
-- aa_reg <= a; --convert to unsigned mult
|
|
-- bb_reg <= b;
|
|
-- sign_reg <= '0';
|
|
else
|
else
|
aa_reg <= a_neg;
|
aa_reg <= a_neg;
|
bb_reg <= b_neg;
|
bb_reg <= b_neg;
|
sign_reg <= a_neg(31);
|
|
end if;
|
end if;
|
|
sign_reg <= a(31) xor b(31);
|
sign2_reg <= '0';
|
sign2_reg <= '0';
|
upper_reg <= ZERO;
|
upper_reg <= ZERO;
|
count_reg <= "100000";
|
count_reg <= "100000";
|
negate_reg <= '0';
|
negate_reg <= '0';
|
when MULT_DIVIDE =>
|
when MULT_DIVIDE =>
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.