and3_gate.vhd
来自「数字逻辑基础与Verilog设计,针对verilog语言的特点」· VHDL 代码 · 共 42 行
VHD
42 行
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
ENTITY and2_gate IS
PORT (a : IN std_logic;
b : IN std_logic;
c : OUT std_logic);
END and2_gate;
ARCHITECTURE behave_arc OF and2_gate IS
BEGIN
PROCESS(a,b)
BEGIN
c <= a AND b;
END PROCESS;
END behave_arc;
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
ENTITY and3_gate IS
PORT (a : IN std_logic;
b : IN std_logic;
c : IN std_logic;
y : OUT std_logic);
END and3_gate;
ARCHITECTURE structure_arc OF and3_gate IS
COMPONENT and2_gate
PORT (a : IN std_logic;
b : IN std_logic;
c : OUT std_logic);
END COMPONENT;
SIGNAL tmp : std_logic;
BEGIN
U1:and2_gate
PORT MAP (a,b,tmp);
U2:and2_gate
PORT MAP (tmp,c,y);
END structure_arc;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?