📄 switch.vhd
字号:
-- 库声明
library IEEE;
use IEEE.STD_LOGIC_1164.all;
-- 实体声明
entity switch is
port (
din1 : in STD_LOGIC;
din2 : in STD_LOGIC;
sel : in STD_LOGIC;
dout : out STD_LOGIC
);
end switch;
--}} End of automatically maintained section
-- 结构体
architecture switch of switch is
begin
-- 使用select语句
with sel select
dout <= din1 when '0',
din2 when others;
end switch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -