adder.vhd
来自「多个Verilog和vhdl程序例子」· VHDL 代码 · 共 13 行
VHD
13 行
library ieee;
use ieee.std_logic_1164.all;
entity adder is
port (a, b, cin :std_logic;
sum, cout :out std_logic);
end adder;
architecture behave of adder is
begin
sum <= (a xor b) xor cin;
cout <= (a and b) or (a and cin) or (b and cin);
end behave;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?