helo.vhd
来自「DE2板上的hello程序,实现在8个七段译码器上循环显示hello」· VHDL 代码 · 共 29 行
VHD
29 行
library IEEE;
use IEEE.std_logic_1164.all;
entity HELO is --在7段译码器上能显示H,E,L,O
port(
Cin : in std_logic_vector(2 downto 0);
Display : out std_logic_vector(6 downto 0)
);
end entity;
architecture bhav of HELO is
-- signal D : std_logic_vector(0 to 6);
begin
process(Cin)
begin
case Cin is
when "000" => Display <="0001001"; --H
when "001" => Display <="0000110"; --E
when "010" => Display <="1000111"; --L
when "011" => Display <="1000000"; --O
when "100" => Display <="1111111"; --无
when "101" => Display <="1111111"; --无
when "110" => Display <="1111111"; --无
when "111" => Display <="1111111"; --无
when others => NULL;
end case;
end process;
end architecture;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?