switch2.vhd

来自「很多仪器都输出同步时钟」· VHDL 代码 · 共 25 行

VHD
25
字号
-- 库声明
library IEEE;
use IEEE.STD_LOGIC_1164.all;
-- 实体声明
entity switch2 is
  port (
       din1 : in STD_LOGIC;
       din2 : in STD_LOGIC;
       sel : in STD_LOGIC;
       dout : out STD_LOGIC
  );
end switch2;

--}} End of automatically maintained section
-- 结构体
architecture switch2 of switch2 is
begin

	-- 使用select语句
	with sel select
	dout <= din1 when '0',
			din2 when others;
			
end switch2;

⌨️ 快捷键说明

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