EDA数字电子钟设计.docx

上传人:b****5 文档编号:3987927 上传时间:2022-11-26 格式:DOCX 页数:15 大小:411.54KB
下载 相关 举报
EDA数字电子钟设计.docx_第1页
第1页 / 共15页
EDA数字电子钟设计.docx_第2页
第2页 / 共15页
EDA数字电子钟设计.docx_第3页
第3页 / 共15页
EDA数字电子钟设计.docx_第4页
第4页 / 共15页
EDA数字电子钟设计.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

EDA数字电子钟设计.docx

《EDA数字电子钟设计.docx》由会员分享,可在线阅读,更多相关《EDA数字电子钟设计.docx(15页珍藏版)》请在冰豆网上搜索。

EDA数字电子钟设计.docx

EDA数字电子钟设计

XXXX

 

EDA论文

 

论文题目:

基于EDA的数字电子钟的实现

指导老师:

院系:

XXX

姓名:

学号:

班级:

XXX

 

2010年11月25日

 

摘要

Abstract

第一章:

绪论

1.1:

选题目的

1.2:

设计思路

第二章:

数字电子钟小系统

2.1:

整体设计方案框架图

2.2:

模块程序验证

2.3:

总程序框图

第三章:

硬件实现与总结

3.1:

硬件实现

3.2:

总结

致谢

参考文献

摘要

EDA技术[1]的设计语言为VHDL(硬件描述语言),实验载体为可编程器件CPLD或者FPGA,进行元件建模和仿真的目标器件为ASIC/SOC芯片。

它是一种自动化设计电子产品的过程。

在电子设计仿真的领域里,EDA技术的出现具有非常重要的现实意义。

EDA源自于计算机辅助设计、制造、测试以及辅助工程。

利用EDA工具,设计者们可以从概念、算法、协议等方面来设计电子系统。

值得一提的是,在整个电子系统的设计过程中,设计电路、分析性能、布置IC和PCB版图等步骤都可以在电脑上自动完成。

时钟我们的日常生活中必备的生活用品之一。

而数字时钟的出现更是给人们的生产生活带来了极大的便利。

EDA技术为数字类产品提供了一个非常简便实用的开发平台。

随着EDA技术的快速发展,数字时钟的应用的范围越来越广泛,并且它在功能、外观等方面也有了很大的改善和提高。

本文就是基于EDA技术和数字电路的基础知识,利用Quartus2软件、再现一个传统时钟功能和闹铃功能的数字时钟。

整个小系统包括传统数字时钟所拥有的计时模块、校时模块、译码显示模块。

关键词:

EDA;数字时钟;模块;闹钟

Abstract

EDAtechnologydesignlanguageforVHDL(hardwaredescriptionlanguage),experimentalcarrierforprogrammabledevices,componentsorFPGACPLDdevicemodelingandsimulationoftargetforASIC/SOCchip.Itisakindofautomationdesignelectronicproductprocess.Intheelectronicdesignsimulationfield,EDAtechniqueappearshasveryimportantpracticalsignificance.EDAoriginatedincomputeraideddesign,manufacture,testandtheauxiliaryprojects.UsingEDAtools,designerscanfromconcept,algorithm,agreement,etctodesignelectronicsystems.Beworthwhatcarryis,inthewholeelectronicsystemdesignprocess,thecircuitdesign,analyzingperformance,decorateICandPCBlayoutstepscanbeonthecomputerautomatically.

Clockisoneofthenecessariesinourdailylife.Anddigitalclockhasbroughtaboutlotsofconvenience.EDAtechnologyprovidesasimplerandmoreusefulplatformtomakeastudyofdigitalproducts.WiththedevelopmentofEDAtechnology,digitalclockhasimprovedalotinitsdesigningprocess,functions,appearanceandsoon.Nowadays,thispaperisbasedonEDAtechniqueanddigitalcircuit,byusingthebasicknowledgeofQuartus2software,reproduceatraditionalclockfunctionandalarmfunctionofdigitalclock.Thesystemincludestraditionaldigitalclockshavetimermodules,alarmclockmodule,decodingdisplaymodule.

Keywords:

EDA;digitalclock;modules;alarm

第一章:

绪论

1.1:

选题目的

时钟是我们日常生活中常见的一种电子产品,它的出现给我们的生活带来了极大的便利,在大学这两年里所学的有关电子的知识尤其是EDA给了我一个平台去再现原始的、传统的数字电子钟,也为深入去了解、思考创新数字电子钟有一个基础。

目前,现代时钟正朝着高精度、多功能、小体积、低功耗等方向发展。

在这种趋势下,数字时钟以其小巧的外形、便宜的价格、走时准确、功能强大等优点迅速成为钟表市场上的主流产品。

由此可见,研究数字时钟的扩展及其应用,有着非常重要的现实意义。

因此,本论文即利用EDA技术(本论文仅涉及VHDL语言编程及硬件实现)以及数字电路技术等基础知识设计了一个传统钟表功能(如计时、闹铃等)数字时钟小系统。

1.2:

设计思路

要实现一个数字时钟小系统,整个系统由主要模块电路模块和外部输入输出以及显示模块组成。

首先分别实现单个模块的功能,然后再通过级联组合的方式实现对整个系统的设计。

其中,主要模块有四个。

它包括脉冲信号产生模块、时间计数模块(计数模块又分为分计数模块、秒计数模块、时计数模块)、译码显示模块、复位模块。

各个模块先用EDA技术中的VHDL语言编程仿真,再生成各个小模块的模拟元件,再元件例化,根据设计连接电路实现数字电子钟小系统。

 

第二章:

数字电子钟小系统

2.1:

整体设计方案框架图

 

2.2:

模块程序验证

1、秒计时器(second1)

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitysecondis

port(clk,reset:

instd_logic;

sec1,sec2:

outstd_logic_vector(3downto0);

carry:

outstd_logic);

endsecond;

architecturert1ofsecondis

signalsec1_t,sec2_t:

std_logic_vector(3downto0);

begin

process(clk,reset)

begin

ifreset='1'then

sec1_t<="0000";

sec2_t<="0000";

elsifclk'eventandclk='1'then

ifsec1_t="1001"then

sec1_t<="0000";

ifsec2_t="0101"then

sec2_t<="0000";

else

sec2_t<=sec2_t+1;

endif;

else

sec1_t<=sec1_t+1;

endif;

ifsec1_t="1001"andsec2_t="0101"then

carry<='1';

else

carry<='0';

endif;

endif;

endprocess;

sec1<=sec1_t;

sec2<=sec2_t;

endrt1;

程序生成波形和硬器件:

同秒计时器一样

3、时计时器(hour1)

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityhouris

port(clk,reset:

instd_logic;

hour1,hour2:

outstd_logic_vector(3downto0));

endhour;

architecturert1ofhouris

signalhour1_t,hour2_t:

std_logic_vector(3downto0);

begin

process(clk,reset)

begin

ifreset='1'then

hour1_t<="0000";

hour2_t<="0000";

elsifclk'eventandclk='1'then

ifhour1_t="0011"andhour2_t="0010"then

hour1_t<="0000";

hour2_t<="0000";

else

ifhour1_t="1001"then

hour1_t<="0000";

ifhour2_t="0010"then

hour2_t<="0000";

else

hour2_t<=hour2_t+1;

endif;

else

hour1_t<=hour1_t+1;

endif;

endif;

endif;

endprocess;

hour1<=hour1_t;

hour2<=hour2_t;

endrt1;

程序生成波形和硬器件:

4、分频器(fp)

libraryIEEE;

useIEEE.std_logic_1164.all;

useIEEE.std_logic_arith.all;

useIEEE.std_logic_unsigned.all;

entityfpis

port(rst,clk:

inSTD_LOGIC;

what:

outSTD_LOGIC);

endfp;

architectureaoffpis

signalcount100:

integerrange0to99;

signaltt:

std_logic;

begin

process(rst,clk)

begin

ifrst='1'thencount100<=0;

elsifrising_edge(clk)then

count100<=count100+1;tt<=tt;

ifcount100=99thencount100<=0;tt<=nottt;

endif;

endif;

what<=tt;

endprocess;

enda;

程序生成波形和硬器件:

5、mux6_1scan

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitymux6_1scanis

port(clkscan,reset:

instd_logic;

in1,in2,in3,in4,in5,in6:

instd_logic_vector(3downto0);

data:

outstd_logic_vector(3downto0);

sel:

outstd_logic_vector(2downto0));

endmux6_1scan;

architecturert1ofmux6_1scanis

signalcount:

std_logic_vector(2downto0);

begin

process(clkscan,reset)

begin

ifreset='1'then

count<="000";

elsifclkscan'eventandclkscan='1'then

ifcount="101"then

count<="000";

else

count<=count+1;

endif;

endif;

endprocess;

process(count)

begin

casecountis

when"000"=>data<=in1;

when"001"=>data<=in2;

when"010"=>data<=in3;

when"011"=>data<=in4;

when"100"=>data<=in5;

whenothers=>data<=in6;

endcase;

endprocess;

sel<=count;

endrt1;

程序生成波形和硬器件:

6.译码显示模块的VHDL程序(segment7.vhd)

libraryieee;

useieee.std_logic_1164.all;

entitysegment7is

port(data:

instd_logic_vector(3downto0);

dout:

outstd_logic_vector(6downto0));

endsegment7;

architecturebehavofsegment7is

begin

process(data)

begin

casedatais

when"0000"=>dout<="1111110";

when"0001"=>dout<="0110000";

when"0010"=>dout<="1101101";

when"0011"=>dout<="1111001";

when"0100"=>dout<="0110011";

when"0101"=>dout<="1011011";

when"0110"=>dout<="1011111";

when"0111"=>dout<="1110010";

when"1000"=>dout<="1111111";

when"1001"=>dout<="1111011";

whenothers=>dout<="0000000";

endcase;

endprocess;

endbehav;

程序生成波形和硬器件:

7.校时模块图

四、系统设计

将上述5个程序作为底层文件,存放在同一个文件夹中,然后按下面的图将这几个文件连接起来,并用元件例化语句编写顶层文件的程序,如下:

libraryieee;

useieee.std_logic_1164.all;

entityzdbsis

port(hour1,hour2,min1,min2,sec1,sec2:

instd_logic_vector(3downto0);

q1,q0:

instd_logic;

q:

outstd_logic);

endzdbs;

architectureoneofzdbsis

signalq3,q4:

std_logic;

begin

process(min1,min2,sec1,sec2)

begin

ifhour2="0000"andhour1<"0111"then

q3<='0';

q4<='0';

elsifmin2="0101"andmin1="1001"andsec2="0101"then

ifsec1="0000"orsec1="0010"orsec1="0100"orsec1="0110"orsec1="1000"then

q3<='1';

else

q3<='0';

endif;

endif;

ifhour2="0000"andhour1<"0111"then

q3<='0';

q4<='0';

elsifmin2="0000"andmin1="0000"andsec2="0000"andsec1="0000"then

q4<='1';

else

q4<='0';

endif;

endprocess;

q<=(q3andq0)or(q4andq1);

endone;

程序生成波形和硬器件:

2.3:

总程序框图

第三章:

硬件实现与总结

3.1:

硬件实现

3.2:

总结

在这次设计过程中,我在老师和老师的指导下逐步加深了了解,其间也曾经遇到很多问题,不论是程序设计方面的,还是调试方面的问题。

最后,通过不断的尝试和老师、同学的指导,这些问题终于一一得到解决。

计数器老师已经在EDA和数电课堂上讲解过了,所以设计起来并不困难。

我已经知道了分/秒使用M60,小时使用M24。

并且在设计中,我发现了一个小小的问题,在校时分时秒也在计数,在校时时分时分也在计数,因此,我在校时和脉冲输入后加一个与门,这样问题就得到解决,在校时时不在同时计数,实现起来十分容易。

 

致谢

大三第一个学期转眼间就已成为过去,在过去的一学期里,@@老师严谨的工作态度和和睦的为人处事态度给我留下了深刻印象。

在学习EDA这门课程中,老师的帮助是离不开的,各式上课的方式也都很受同学的关注,老师文雅、亲切的谈吐风格更为同学喜爱。

因此,在这里,我忠心的谢谢老师对我的耐心教育和悉心指导,尤其在部分实验上的悉心指导和帮助,同时也感谢同学们对我论文提出的意见和帮助。

最后祝愿老师工作顺心、健康快乐,祝愿同学们学业有成、百尺竿头更进一步。

 

参考文献:

1.江国强.EDA技术与应用.北京:

电子工业出版社

2.阎石等.数字电子技术[M].北京:

高等教育出版社

3.徐晓玲,田亚菲,崔伟.基于EDA仿真的电子时钟系统设计[A].兰州大学,2009.

 

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 数学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1