multiplier.vhd

来自「an implementation of fft 1024 with cos a」· VHDL 代码 · 共 48 行

VHD
48
字号
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date:    16:02:29 11/03/2008 -- Design Name: -- Module Name:    multiplier - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: ---- Dependencies: ---- Revision: -- Revision 0.01 - File Created-- Additional Comments: ------------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;---- Uncomment the following library declaration if instantiating---- any Xilinx primitives in this code.--library UNISIM;--use UNISIM.VComponents.all;entity multiplier is 
      generic ( 
inst_width1 : INTEGER := 16;             
inst_width2 : INTEGER := 16);   
    port (   
     inst_A : in std_logic_vector(inst_width1-1 downto 0);        
     inst_B : in std_logic_vector(inst_width2-1 downto 0);        
     PRODUCT_inst : out std_logic_vector(inst_width1 +  inst_width2 - 1 downto 0)); 
	  end multiplier; 
 
architecture oper of multiplier is 
  signal mult_sig : SIGNED(inst_width1+inst_width2-1 downto 0) ;  
 
begin 
  mult_sig <= SIGNED(inst_A) * SIGNED(inst_B);  
PRODUCT_inst <= std_logic_vector(mult_sig);         
end oper; 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?