📄 decoder3.vhd
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity decoder3 is
Port ( i : in std_logic_vector(2 downto 0);
o : out std_logic_vector(7 downto 0));
end decoder3;
architecture Behavioral of decoder3 is
begin
with i select o <=
x"01" when "000",
x"02" when "001",
x"04" when "010",
x"08" when "011",
x"10" when "100",
x"20" when "101",
x"40" when "110",
x"80" when others;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -