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

📄 counter60.vhd

📁 多功能数字时钟设计方案及电路图
💻 VHD
字号:
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity counter60 is
	port( En   : in std_logic;
		  inclk: in std_logic;
		  fpb  : in std_logic;
		  count: out std_logic;
		  Low  : out std_logic_vector(3 downto 0);
		  High : out std_logic_vector(3 downto 0)
		);
end counter60;
architecture counter60_arch of counter60 is
 	signal ma,mb :std_logic_vector(3 downto 0);
	 begin
	   process(inclk,fpb,En)
			begin
			   if fpb'event and fpb='1' then
				 if En='1' then
					if ma=9 then
						ma<="0000";
						if mb=5 then
							mb<="0000";
							else
								mb<=mb+1;
						    end if;
					else
						ma<=ma+1;
					end if;
				end if;
			   end if;
               	Low<=ma;
				High<=mb;
			if mb=5 and ma=9 and En='1' then
				count<='1';
			else count<='0';
			end if;
		end process;
end counter60_arch;

⌨️ 快捷键说明

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