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

📄 fen_sound.vhdl

📁 数字钟的实现
💻 VHDL
字号:
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;--  Uncomment the following lines to use the declarations that are--  provided for instantiating Xilinx primitive components.--library UNISIM;--use UNISIM.VComponents.all;entity fpq_sound is      Port (CLK:in std_logic;	       CP500,CP1000:out std_logic);end fpq_sound;architecture Behavioral of fpq_sound is  signal count:integer range 0 to 50000;  signal x:std_logic;  signal y:std_logic;    begin	process(CLK)     begin	   if(CLK'event and CLK='1') then		     if count=50000 then			   count<=0;		        x<=not x;		     else			   count<=count+1;		     end if;		  end if;	  	end process;	   CP1000<=x;     process(x)	begin 	   if x'event and x='1' then	      y<=not y;	   end if;	   CP500<=y;     end process;	      	   end Behavioral;

⌨️ 快捷键说明

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