FPGA数字钟的设计

源代码在线查看: program-h.txt

软件大小: 263 K
上传用户: leaf82318
关键词: 数字
下载地址: 免注册下载 普通下载 VIP

相关代码

				library ieee;
				use ieee.std_logic_1164.all;
				use ieee.std_logic_unsigned.all;
				entity newhour is
				  port (carrym,reset:in std_logic;
				        hour1,hour2: out std_logic_vector(3 downto 0));
				end newhour;
				architecture t1 of newhour is
				signal hourt1,hourt2: std_logic_vector(3 downto 0);
				begin
				process(reset,carrym)
				    begin
				    if reset='1' then
				       hourt1				       hourt2				    elsif (carrym'event and carrym='1') then
				        if hourt1="1001" then
				           hourt1				            if hourt2="1011"  then
				               hourt2				            else 	hourt2				            end if;
				        else 	hourt1				        end if;
				        end if;
				    end process;
				        hour1				        hour2				end t1;
							

相关资源