大连海事大学
┊┊┊┊┊┊┊ 装┊┊┊┊┊┊┊ 订 ┊┊┊┊┊┊┊ 线┊┊┊┊┊
业 论 二○一四 年 六 月文 毕
┊┊
VHDL设计FPGA数字系统:电子万年历
专业班级: 电子信息工程10-2班 姓 名: 牛舒雅 指导老师: 严 飞
信息科学技术学院
摘 要
随着EDA(电子设计自动化)技术的发展和应用领域的扩大,EDA技术在电子信息、通信、自动化控制及计算机应用领域的重要性日益突出。钟表的数字化给人们生产生活带来了极大的方便,而且大大地扩展了钟表原先的报时功能,诸如定时自动报警、按时自动打铃、时间程序自动控制、定时广播、定时启闭路灯等。所有这些,都是以钟表数字化为基础的。因此,研究基于FPGA的电子万年历及扩大其应用,有非常现实的意义。EDA的关键技术之一是用形式化方法来描述数字系统的硬件电路、即用所谓的硬件描述语言来描述硬件电路。
本设计是用VHDL语言编程实现基于FPGA的电子万年历。在设计中,首先介绍了万年历的设计思路,确定各功能模块,而后在Quartus II开发环境中用VHDL语言对各模块进行编程,编译成功后完成仿真,并逐一调试程序使各模块达到设计目的。然后,将各模块生成的元器件连接起来,形成顶层原理图文件,进行系统仿真。最后,对顶层原理图进行引脚设定,并下载到试验箱验证,证明系统的可行性。
关键字:EDA;VHDL ;万年历 ; Quartus II
I
ABSTRACT
With the development of EDA (electronic design automation) technology and
expansion of application fields ,the importance of EDA technology in electronic information, communication, auto control, and computer applications is becoming increasingly prominent. EDA technology is the core of the modern electronic design techniques, which rely on powerful computers . In EDA tools software platform, computer automatically completes logic simplification,logical partitions, logic synthesis , logic optimization ,logical simulation and other functions until the electronic circuit system achieves the stated performance. However, the realization of these function bases on the description of the system using the hardware description language HDL (Hardware Description language) . One of the key technologies of the EDA is to use formal methods to describe digital systems hardware circuit, which uses the so-called hardware description language to describe the hardware circuit.
The design is the calendar based on VHDL language. Firstly, in which ,I introduce ideas about designing the calendar. In addition, I compile and simulate the program of different modules in the Quartus II development environment and debug one by one to make different modules meet objectives of the design. Secondly, I take advantage of all components,which is created according to program to generate top-level file . Finally, I make pin settings and download to the test chamber to prove the feasibility of the system.
Key words: EDA;VHDL ;calendar;Quartus II
I
目 录
第1章 绪论 .................................................................................................................... 1
1.1钟的起源 ............................................................................................................. 1 1.2钟的现状以及发展 ............................................................................................. 1 1.3电子万年历的简介 ............................................................................................. 1 1.4VHDL设计FPGA数字系统:电子万年历的设计要求 .................................. 2 1.5 本章小结 ............................................................................................................ 2 第2章 开发技术基础 .................................................................................................... 3
2.1 EDA技术简介 .................................................................................................... 3
2.1.1 EDA技术基本概述 .................................................................................. 3
2.1.2EDA技术发展与发展方向 ....................................................................... 3 2.2FPGA基本介绍 ................................................................................................... 4
2.2.1FPGA简介 ................................................................................................. 4 2.2.1FPGA组成 ................................................................................................. 5 2.3VHDL语言概述 .................................................................................................. 5
2.3.1VHDL语言特点 ........................................................................................ 6 2.3.2VHDL语言结构 ........................................................................................ 7 2.4Quartus II软件介绍 ............................................................................................. 7 2.5ZY11EDA13BE实验系统介绍 ........................................................................... 8
2.5.1 ZY11EDA13BE实验系统的特点 ............................................................ 8 2.5.2ZY11EDA13BE实验系统主板组成 ......................................................... 8 2.6本章小结 ............................................................................................................. 9 第3章 电子万年历的设计 .......................................................................................... 10
3.1设计思想 ........................................................................................................... 10 3.2 设计框图 ........................................................................................................ 11 3.3 设计流程图 .................................................................................................... 12 3.4 本章小结 ........................................................................................................ 15 第4章 电子万年历的设计、仿真与展示 ................................................................ 16
4.1 模块分析 ........................................................................................................ 16
4.1.1 秒与分的计数器模块 .......................................................................... 16
4.1.3 日计数器模块 ........................................................................................ 18 4.1.4月计数器模块 ......................................................................................... 21 4.1.5年低位计数器模块 ................................................................................. 22 4.1.6年高位计数器模块 ................................................................................. 23 4.1.7校准模块 ................................................................................................. 24 4.1.8 显示以及显示内容切换模块 ................................................................ 26 4.2顶层原理图 ....................................................................................................... 27 4.3 管脚锁定 .......................................................................................................... 29 4.4电子万年历的展示 ........................................................................................... 29
II