📄 h_adder.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
entity h_adder is
port(a,b:in std_logic;
co,so:out std_logic);
end entity h_adder;
architecture fh1 of h_adder is
signal abc:std_logic_vector(1 downto 0);
begin
abc<=a&b;
process(abc)
begin
case abc is
when"00"=>so<='0';co<='0';
when"01"=>so<='1';co<='0';
when"10"=>so<='1';co<='0';
when "11"=>so<='0';co<='1';
when others=>null;
end case;
end process;
end architecture fh1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -