⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcdadd4.vhd

📁 大家一定要看 哦 程序在与多看多练 我找了好久才找到呢
💻 VHD
字号:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;

ENTITY bcdadd4 IS
	PORT (op1, op2	: in std_logic_vector(3 downto 0);
		   result	: out std_logic_vector(4 downto 0)
        );
END bcdadd4;

ARCHITECTURE behavior OF bcdadd4 IS
    signal   binadd    :std_logic_vector(4 downto 0);
BEGIN
  binadd<=('0' & op1) +('0' & op2);
  process(binadd)
   begin
     if binadd>9 then   
        result <= binadd+6;
       else
         result <= binadd;
     end if;   
  end process;      
END behavior;


⌨️ 快捷键说明

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