⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 警报器alert.vhd.txt

📁 具有多种功能的电子钟:闹钟
💻 TXT
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity alert is
   port(
         clk    :in  std_logic;
         dain   :in  std_logic_vector(6 downto 0);
         speak  :out std_logic);
end alert;
architecture fun of alert is
   signal count   : std_logic_vector(1 downto 0);
   signal count1  : std_logic_vector(1 downto 0);
begin
speaker : process(clk)
               begin
               speak<=count(1);
               if(clk'event and clk ='1' )then
                    if( dain = "0000000")then
                           if(count1>="10" )then
                                count1<="00";
                           else
                                count1<= count1+1;
                           end if;
                     end if;
                end if;   
end process speaker;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -