URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [tags/] [V2_1/] [vhdl/] [mult.vhd] - Diff between revs 99 and 117
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 99 |
Rev 117 |
Line 35... |
Line 35... |
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_unsigned.all;
|
use ieee.std_logic_unsigned.all;
|
use work.mlite_pack.all;
|
use work.mlite_pack.all;
|
|
|
entity mult is
|
entity mult is
|
generic(adder_type : string := "GENERIC");
|
generic(adder_type : string := "GENERIC";
|
|
mult_type : string := "GENERIC");
|
port(clk : in std_logic;
|
port(clk : in std_logic;
|
a, b : in std_logic_vector(31 downto 0);
|
a, b : in std_logic_vector(31 downto 0);
|
mult_func : in mult_function_type;
|
mult_func : in mult_function_type;
|
c_mult : out std_logic_vector(31 downto 0);
|
c_mult : out std_logic_vector(31 downto 0);
|
pause_out : out std_logic);
|
pause_out : out std_logic);
|
Line 236... |
Line 237... |
|
|
end process;
|
end process;
|
|
|
|
|
generic_adder:
|
generic_adder:
|
if adder_type /= "ALTERA" generate
|
if adder_type = "GENERIC" generate
|
sum <= (aa + bb) when do_mult_reg = '1' else
|
sum <= (aa + bb) when do_mult_reg = '1' else
|
(aa - bb);
|
(aa - bb);
|
end generate; --generic_adder
|
end generate; --generic_adder
|
|
|
--For Altera
|
--For Altera
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.