- 1、本文档共13页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
EDA_课程设计报告--数字时钟设计.doc
电 子 信 息 科 学 与 技 术
EDA课程设计报告
实验内容
计数始终由模60秒计数器、模60分计数器、模24小时计数器、报时模块、分,时校定模块及输出显示组成,可以采用同步计数器或异步计数器设计方法。
实验要求
计时范围为0小时0分0秒至23小时59分59秒。
采用6个8段数码管分别显示小时十位,小时个位,分钟十位,分钟个位,秒十位,秒个位。
整点报时,蜂鸣器响5声,每秒响一声。
校时功能能够单独校分,校时,校秒,用按键控制。
具有清零,启动,停止计数功能,用按键控制。
采用静态扫描方式显示。
时分秒皆采用两个位的计数,一位代表十位,一位代表个位。分秒为60进制,时为24进制。个位逢九向十位进一,秒逢59向分进一,分逢59向时进一。
在小时的子程序里把两位小时数转换成一位数作为报时程序的输入。
主要VHDL源程序
主程序:主要将建好的library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity time1 is
--generic(N: integer :=60 );
port(
clk:in std_logic;
reset:in std_logic;
stop:in std_logic;
clock_out:out std_logic;
min_add:in std_logic;
hour_add:in std_logic;
secout_1:out std_logic_vector(6 downto 0);
secout_2:out std_logic_vector(6 downto 0);
min_out_1:out std_logic_vector(6 downto 0);
min_out_2:out std_logic_vector(6 downto 0);
hour_cout_1:out std_logic_vector(6 downto 0);
hour_cout_2:out std_logic_vector(6 downto 0)
);
end entity time1;
architecture xtime1 of time1 is
--60s
component secoud is
port(
clk:in std_logic;
reset:in std_logic;
secout1:out integer range 0 to 9;
secout2:out integer range 0 to 9; --0 to 5
en_min:out std_logic
);
end component secoud;
--60min
component minute is
port(
en_min:in std_logic;
reset:in std_logic;
min_out1:out integer range 0 to 9;
min_out2:out integer range 0 to 9; --0 to 5
en_hour:out std_logic
);
end component minute;
--24hour
component hour is
port(
en_hour:in std_logic;
reset:in std_logic;
hour_cout1:out integer range 0 to 9;
hour_cout2:out integer range 0 to 9 --0 to 2
);
end component hour;
--yima
component decode_dis is
port(
din:in integer range 0 to 9;
dout:out std_logic_vector(6 downto 0)
);
end component decode_dis;
--huomen
component or_2 is
port(
a:in std_
文档评论(0)