op_add.vhd
来自「simple MIPS source code very simple it h」· VHDL 代码 · 共 50 行
VHD
50 行
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date: 10:46:58 04/04/2009 -- Design Name: -- Module Name: op_add - 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;use IEEE.STD_LOGIC_UNSIGNED.ALL;---- Uncomment the following library declaration if instantiating---- any Xilinx primitives in this code.--library UNISIM;--use UNISIM.VComponents.all;entity op_add is
port (
input1 : in std_logic_vector(15 downto 0);
input2 : in std_logic_vector(15 downto 0);
output_from_add : out std_logic_vector(15 downto 0));
end op_add;architecture Behavioral of op_add issignal data : std_logic_vector(15 downto 0);begin process (input1, input2, data)
begin
data <= input1 + input2;
end process;
output_from_add <= data;
end Behavioral;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?