📄 alert.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
entity alert is
port(clkspk:in std_logic;
second,minute:in std_logic_vector(7 downto 0);
speak:out std_logic;
lamp:out std_logic_vector(8 downto 0));
end alert;
architecture behave of alert is
begin
process(clkspk,second,minute)
begin
if(clkspk'event and clkspk='1')then
if(minute="01011001")then
case second is
when"01010001"=>lamp<="000000001";speak<='0';
when"01010010"=>lamp<="000000011";speak<='1';
when"01010011"=>lamp<="000000111";speak<='0';
when"01010100"=>lamp<="000001111";speak<='1';
when"01010101"=>lamp<="000011111";speak<='0';
when"01010110"=>lamp<="000111111";speak<='1';
when"01010111"=>lamp<="001111111";speak<='0';
when"01011000"=>lamp<="011111111";speak<='1';
when"01011001"=>lamp<="111111111";speak<='0';
when others=>lamp<="000000000";speak<='0';
end case;
end if;
end if;
end process;
end behave;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -