📄 +
字号:
library IEEE;
use IEEE.std_logic_1164.all;
entity decoder is
port (enable:in bit;
sel: in bit_VECTOR (2 downto 0);
yout: out bit_VECTOR (7 downto 0)
);
end decoder;
architecture decoder_arch of decoder is
signal z:bit_vector(7 downto 0);
begin
with sel select
z<="11111110"when"000",
"11111101"when"001",
"11111011"when"010",
"11110111"when"011",
"11101111"when"100",
"11011111"when"101",
"10111111"when"110",
"01111111"when"111";
process(enable)
begin
if enable='1'then
yout<=z;
else
yout<="00000000";
end if;
end process;
end decoder_arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -