条件赋值:使用when else语句.txt
来自「VHDL代码编程,集合了众多优秀的实例,胜过任何一本书的例子,作为教学或程序开发」· 文本 代码 · 共 23 行
TXT
23 行
-- Conditional Signal Assignment
-- download from: www.pld.com.cn & www.fpga.com.cn
Library IEEE ;
use IEEE.std_logic_1164.all ;
ENTITY condsig IS
PORT
(
input0, input1, sel : IN BIT;
output : OUT BIT
);
END condsig;
ARCHITECTURE maxpld OF condsig IS
BEGIN
output <= input0 WHEN sel = '0' ELSE input1;
END maxpld;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?