?? 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 + -