eda课程设计由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“eda课程设计题目”。
数字钟
一、设计要求
设计一个数字钟,具体要求如下:
1、具有时、分、秒计数显示功能,以24小时循环计时。
2、具有清零、校时、校分功能。
3、具有整点蜂鸣器报时以及LED花样显示功能。
二、设计方案
根据设计要求,数字钟的结构如图8-3所示,包括:时hour、分minute、秒second计数模块,显示控制模块sel_clock,七段译码模块deled,报时模块alert。
三、VHDL程序
library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;
----Uncomment the following library declaration if instantiating----any Xilinx primitives in this code.--library UNISIM;
--use UNISIM.VComponents.all;
entityddz is port(rst,clk: in std_logic;hour_h: out std_logic_vector(6 downto 0);hour_l: out std_logic_vector(6 downto 0);min_h: out std_logic_vector(6 downto 0);
min_l: out std_logic_vector(6 downto 0);
sec_h: out std_logic_vector(6 downto 0);
sec_l: out std_logic_vector(6 downto 0));endddz;
architecture Behavioral of ddz is signalcnt: std_logic_vector(15 downto 0);signalsec_h_in: std_logic_vector(3 downto 0);signalsec_l_in: std_logic_vector(3 downto 0);signalmin_h_in: std_logic_vector(3 downto 0);signalmin_l_in: std_logic_vector(3 downto 0);signalhour_h_in: std_logic_vector(3 downto 0);signalhour_l_in: std_logic_vector(3 downto 0);
signalclk_s,clk_m,clk_h: std_logic;begin proce(rst,clk)begin if rst='0' then
sec_h_in'0');
sec_l_in'0');
clk_m
sec_l_in
ifsec_h_in=5 then
sec_h_in
clk_m
else
sec_h_in
clk_m
end if;else sec_l_in
clk_m
end if;end if;end proce;
proce(rst,clk_m)begin if rst='0' then
--min_h_in'0');
min_l_in'0');--clk_h
min_l_in
min_h_in
clk_m
end if;else min_l_in
end if;end if;end proce;
proce(rst,clk_n)begin if rst='0' then
--hour_h_in'0');
hour_l_in'0');--clk_h
hour_l_in
hour_h_in
clk_n
end if;else hour_l_in
end if;end if;end proce;
proce(sec_l_in)begin casesec_l_in is
when “0000” =>sec_lsec_lsec_lsec_lsec_lsec_lsec_lsec_lsec_lsec_lsec_l
proce(sec_h_in)begin casesec_h_in is
when “0000” =>sec_hsec_hsec_hsec_hsec_hsec_hsec_hsec_hsec_hsec_hsec_h
proce(min_l_in)begin casemin_l_in is
when “0000” =>min_lmin_lmin_l
when “0011” =>min_lmin_lmin_lmin_lmin_lmin_lmin_lmin_l
proce(min_h_in)begin casemin_h_in is
when “0000” =>min_hmin _h min _hmin _hmin _h min _hmin _hmin _hmin _hmin _hmin _h
end case;end proce;
proce(hour_l_in)begin casehour_l_in is
when “0000” =>hour_lhour_lhour_lhour_lhour_lhour_lhour_lhour_lhour_lhour_lhour_l
proce(hour_h_in)begin casehour_h_in is
when “0000” =>hour_hhour_hhour_hhour_h hour _h hour _h hour _h hour _h hour _hhour_h hour _h
四、VHDL仿真结果
五、课程设计心得
通过这次课程设计,有效得巩固了课本所学的知识,而且通过上机仿真不断发现问题并及时改正,加深了我们对该课程设计的印象。这次课程设计,进一步加深了我对EDA的了解,使我对isp有了更深的了解,使我对应用软件的方法设计硬件系统有了更加浓厚的兴趣。除此之外,我懂得了理论与实际相结合的重要性,只有理论知识是远远不够的,只有把所学的理论知识与实践相结合,从实践中得出结论,才能真正提高自己的实际动手能力和独立思考的能力。
总之,这次课程设计让我学会了很多,对今后的生活工作用处也颇深。