fadd.vhd
来自「用VHDL编写的计算器:能实现简单的加减乘除四则运算」· VHDL 代码 · 共 46 行
VHD
46 行
------------------------------------------------------------------------------------ Company: -- Engineer: -- -- Create Date: 22:12:45 11/09/2006 -- Design Name: -- Module Name: fadd - 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 fadd is Port ( a : in STD_LOGIC; b : in STD_LOGIC; ci : in STD_LOGIC; co : out STD_LOGIC; sum : out STD_LOGIC);end fadd;architecture Behavioral of fadd isbegin co<=(a and b) or (b and ci) or (a and ci);
sum<=a xor b xor ci;end Behavioral;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?