EDA数字电子钟设计_第1页
EDA数字电子钟设计_第2页
EDA数字电子钟设计_第3页
EDA数字电子钟设计_第4页
EDA数字电子钟设计_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、xxxxeda论文论文题目:基于eda的数字电子钟的实现l-hii指导老师:院系:xxx姓名学号:班级:xxx2010年11月25日目录摘要abstract第一章:绪论1.1:选题目的1. 2:设计思路第二章:数字电子钟小系统 2.1:整体设计方案框架图 2.2:模块程序验证2. 3:总程序框图第三章:硬件实现与总结3.1:硬件实现3.2:总结致谢参考文献摘要eda技术的设计语言为田叽(硬件描述语言),实验载体为可编程器件cpld或者 fpga,进行元件建模和仿真的目标器件为astc/soc芯片。它是一种自动化设计屯子产 品的过程。在电子设计仿真的领域里,eda技术的出现具有非常重要的现实意义

2、。eda 源自于计算机辅助设计、制造、测试以及辅助工程。利用eda工具,设计者们可以从概 念、算法、协议等方面来设计电子系统。值得一提的是,在整个电子系统的设计过程中, 设计电路、分析性能、布置ic和pcb版图等步骤都可以在电脑上自动完成。吋钟我们的日常生活中必备的生活用品之一。而数字吋钟的岀现更是给人们的生产 生活带來了极大的便利。eda技术为数字类产品提供了一个非常简便实用的开发平台。 随着eda技术的快速发展,数字时钟的应用的范围越来越广泛,并且它在功能、外观等 方面也有了很大的改善和提高。本文就是基于eda技术和数字电路的基础知识,利用 quartus2软件、再现一个传统时钟功能和闹铃

3、功能的数字时钟。整个小系统包括传统 数字时钟所拥有的计吋模块、校吋模块、译码显示模块。关键词:eda;数字时钟;模块;闹钟abstracteda technology dcsign languagc for viidl (hardware description lamguagc), experimental carrier for programmable devices, components or fpga cpld device modeling and simulation of target for asic/soc chip. it is a kind of automation

4、 design electronic product process. in the electronic design simulation field, eda technique appears has very important practicaj significance- eda originated in computer aided design,memufeicture, test and the auxiliary projeets. using eda tools, designers can from concept, algorithm, agreement, et

5、c to design electronic systems. be worth what carry is, in the whole electronic system design process, the circuit design, analyzing performance, decorate ic and pcb layout steps can be on the computer automatically.clock is one of the necessaries in our daily life- and digital clock has brought abo

6、ut lots of convenience. eda technology provides a simpler and more useful platform to make a study of digital products. with the development of eda technology, digital clock has improved a lot in its designing process, functions, appearanee and so on. nowadays, this paper is based on eda technique a

7、nd digital circuit, by using the basic knowledge of quartus2 software, reproduce a traditional clock function and alarm function of digital clock. the systein includes traditional digital clocks have timer modules, alarm clock module, decoding display module.keywords: eda; digital clock; modules; al

8、arm第一章:绪论1.1:选题目的时钟是我们口常生活屮常见的一种电子产品,它的岀现给我们的生活带來了极大 的便利,在大学这两年里所学的有关电子的知识尤其是eda给了我一个平台去再现原始 的、传统的数字电子钟,也为深入去了解、思考创新数字电子钟有一个基础。目前,现代时钟正朝着高精度、多功能、小体积、低功耗等方向发展。在这种趋 势下,数字吋钟以其小巧的外形、便宜的价格、走时准确、功能强大等优点迅速成为钟 表市场上的主流产品。由此可见,研究数字时钟的扩展及其应用,有着非常重要的现实 意义。因此,本论文即利用eda技术(本论文仅涉及vhdl语言编程及硬件实现)以 及数字电路技术等基础知识设计了一个传统

9、钟表功能(如计时、闹铃等)数字时钟小系 统。1.2:设计思路要实现一个数字吋钟小系统,整个系统由主要模块电路模块和外部输入输岀以及显 示模块组成。首先分别实现单个模块的功能,然后再通过级联组合的方式实现对整个系 统的设计。其中,主要模块有四个。它包括脉冲信号产生模块、时间计数模块(计数模块乂分 为分计数模块、秒计数模块、时计数模块)、译码显示模块、复位模块。各个模块先用 eda技术中的vhdl语言编程仿真,再生成各个小模块的模拟元件,再元件例化,根据 设计连接电路实现数字电子钟小系统。第二章:数字电子钟小系统2.1:整体设计方案框架图复位模块校时模块时钟脉冲2.2:模块程序验证1、秒计吋器(s

10、econd 1)library ieee;use ieee.std jogic_l 164.all;use ieee.std_logic_unsigned.all;entity second isport(clk,reset:in std_logic;sec 1 ,sec2:out stdogic_vector(3 downto 0); carry:out stdogic);end second;architecture rtl of second issignal secl_t,sec2_t:stdogic_vector(3 downto 0); beginprocess(clk,reset

11、)beginif reset二tthensecl_tv 二”0000“; sec2_t<=h0000u;elsif clkfevent and clk=rrthen ifsecl_t="1001nthen secl_t<=hooooh;ifsec2_t=h0101nthen sec2_t<=h0000n;else sec2_t<=sec2_t+l; end if;elsesecl_t<=secl_t+l;end if;if secl_t=t001” and sec2_t=,0101,then carry<-t;elsecarry <-0*;e

12、nd if;end if;end process;secl<=secl_t; sec2<=sec2_t;end rtl;程序生成波形和硬器件:secondolk r«f«tsedp.,0s«o2p.ocanyinstl也 second vhd5 second, vwldianzizhong bdfmaster time19. 15 ns jjpointe0 ps interva -19. is ns str同秒计时器一样3、时计时器(hourl)library ieee;use ieee.std_logic_l 164.all;use ieee.std

13、_logic_unsigned.all;entity hour isport (clk,reset:in stdogic; hourl,hour2:out std_logic_vector(3 downto 0);end hour;architecture rtl of hour issignal hour 1 _t,hour2_t:stdogic_vector(3 downto 0); beginprocess(clk,reset)beginif reset-tthenhourl_t<=noooom;hour2_t<=h0000n;elsif clkevent and elk-

14、pthenifhourl_t=hooir' and hour2_t=,0010,then hourl_t<=hoooon;hour2_t<=,0000h;elseif hourl_t=" 1001 "then hourl_t<=,0000h;ifhour2_t=u0010nthen hour2_t<=h0000m;elsehour2_t<=hour2_t+1;end if;elsehourl _t<=hourl _t+1;end if;end if;end if;end process;hourl<=hourl_t;hour

15、2<=hour2_t;end rtl;程序生成波形和硬器件:houroik hourip.o nstt hour2p.oinst3怡 dianzizhcng .bdf碍 hour.vhdyi hour vwf19. 15 ns points s3. 2 nz intorva 34 05 nz st winn ustar tima>0. 0 ns140 0 nz180 c4、分频器(fp)library ieee;use ieee.std_logic_l 164.all;use leee.std_logic_arith.all;use leee.std jogic_unsigned.

16、all; entity fp isport (rst,clk : in std_logic;what: out std_logic);end fp;architecture a of fp issignal count 100 : integer range 0 to 99;signal tt:std_logic;beginprocess (rst,clk)beginif rst=' 1' then count 100<=0;elsif rising_edge(clk) thencount 100<= co un tloo + 1 ;tt<=tt;if cou

17、n1100=99 then count 100<=0;tt<=not tt; end if;end if;what<=tt;end process;end a;程序生成波形和硬器件:0 ip vwf辰 fp.vhd帕 dianzizhong bdf5 mux6_lscanlibrary ieee;use ieee.skl_logic_1164.all;use ieee.std_logic_unsigned.all;entity mux6_lscan isport(clkscan,reset:in stdogic;in 1 jn2,in3,in4,in5,in6:in std_

18、logic_vector(3 downto 0); data:out std_logic_vector(3 downto 0);sel:out stdogic_vector(2 downto 0);end mux6_lscan;architecture rtl of mux6_lscan issignal count:stdogic_vector(2 downto 0); beginprocess(clkscan,reset)beginif reset='rthencount<=n000h;elsif clkscan'event and clkscan=tthen if

19、count=" 101 "thencount<=n000h;elsecount<=count+l;end if;end if;end process;process(count)begincase count iswhen n000h=>data<=inl;when "001 "=>data<=in2;when 'r01 o'->data<=in3;when h011 "=>data<=in4;when h100*->data<=in5;when other

20、s=>data<=in6; end case;end process;sel<=count;end rtl;程序生成波形和硬器件:趨 danzehong.bd也 rnulscanvhdhcan.ywfmaster tineb 1value at19 15 ns3 seid.19 15 ns jjpointe 72.8 ns inters 53.65 ns star6.译码显示模块的vhdl程序(segment7. vhd)1i brary ieee;use ieee.std_logic_1164.dll;entity segment7 isport(ddta:in std l

21、ogic vector(3 downto 0); dout:out std_logi c_vector(6 downto 0);end segment7;architecture behav of segment7 is beginprocess(data)begincase data iswhen 0000=>dout“ll 11110;when /z000r,=>dout<=zz0110000,z;when 0010=>doutu 1101101;when 0011二dout=1111001;when 0100二dout=0110011;when z/010rz=&

22、gt;dout<=z,10110irz;when /z0110/,=>dout<=zz10111irz;when 0111=>doutu1110010; when 1000二doutulllllll; when "1001"二dout<="1111011" when others二dout二"0000000"end case;end process;end behav;程序纶成波形和硬器件:| 羅 $eflmenl7.vhdp danzizheng .bdl诃 segment7.vwfwaster tin

23、e19.15 ns pointe 4 j ns interva15 15 ns star:segment?r d3tap,.0dout(6.0value at19 15 ns田 data0 doulu 1b xxmix)ps40.0 ns-19.15 nsj80.0 nsil20.° 皿imminst5四、系统设计将上述5个程序作为底层文件,存放在同一个文件夹屮,然后按下面的图将这儿个文件连接起来, 并用元件例化语句编写顶层文件的程序,如下:library ieee;use ieee.std_logic_h64.au;entity zdbs isport(hour 1 ,hour2,

24、min 1 ,min2,sec 1 ,sec2:in std_logic_vector(3 downto 0); ql,qo:in stdjogic;q:out std_logic);end zdbs;architecture one of zdbs is signal q3,q4:stdogic;beginprocess(min 1 ,min2,sec 1 ,sec2)beginif hour2=n0000nand hour 1 <n011 lnthen q3<=,0,;q4<=,0,;elsifmin2=m010r,and min 1 二too 1 “and sec2=n

25、0101mthenif secl=h0000hor secl=m0010nor seel=”0100" or secl=,0110l,or secl=n1000,thenq3<=r; q3<=,0,;end if;end if;if hour2=,0000,and hourl v”0111 “thenq3<='0r;q4<='0r;elsif min2=m0000,and minl=“oooo”and sec2=u0000nand secl=noooohthenq4v 二 t;elseq4v='0;end if;end process;q<=(q3 and q0)or(q4 and q 1);end one;程序生成波形和硬器件:罐)dianzizhong .bdf| zdbs.vhdzdbs. vwfmaster time |9 is xtw 土 | point© 114 88 n 盲 ini

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论