基于FPGA的电子密码锁电路设计

  • 格式:doc
  • 大小:891.50 KB
  • 文档页数:38

四川师范大学成都学院专科毕业设计

基于FPGA的电子密码锁电路设计

学生姓名 XXX

学 号 XXXXXXXXXXXX

所 在 系 通信工程系

专业名称 计算机通信

班 级 09级计算机通信班

指导教师 XXXXXXX

四川师范大学成都学院

二○一二年五月

四川师范大学成都学院专科毕业设计

I

基于FPGA的电子密码锁电路设计

学生:杨琴 指导教师: 张莹

内容摘要:本文主要介绍了一种运用可编程逻辑器件(FPGA)技术来编程实现电子密码锁的设计方法。在整个系统设计实现中采用FPGA器件作为控制器,所有算法完全由硬件电路来实现,使得系统的工作可靠性大大提高。该密码锁具有的功能是可以设置4位密码,通过数字键盘进行输入并在数码管上进行显示。同时,该密码锁还设计了一个万能密码,在忘记了密码的情况下可使用万能密码来开锁。

本文的内容主要包含以下几个部分:EDA技术的介绍,电子密码锁总体设计,系统详细设计,系统仿真和结束语。文中重点介绍了应用EDA技术和硬件描述语言,在Quartus

II工作平台上完成电子密码锁系统总体设计的详细过程。通过时序仿真,验证了整个设计的正确性以及系统的完整性。

关键词:电子密码锁 可编程逻辑器件 EDA技术

四川师范大学成都学院专科毕业设计

II

Circuit Design of Digital Lock Based on FPGA

Abstract: The article mainly introduce the technology of designing a digital

lock with the utility of FPGA. All the calculation are totally finished by the

hardware ,based on the FPGA, so as to improve the reliability of the system.

We just change the control and interface circuit of FPGA when there is something

needed to change in the designing because of the field programme function. It’s tremendously increase the efficiency because we only need to download the

newest design into the FPGA by the help of EDA without modifying the external

circuit design . Therefore, FPGA will not only improve the reliability , but

the conveniences of promotion. There are four password for digital lock and

we can also set a universal password in case of forgetting the password.

The article mainly includes several parts :The introduction of EDA, the

overall design of digital lock, the design in detail of system, emulation and

conclusion . Through the introduction of EDA, we know the software requirement

of production the digital lock . In the overall design and detail design of

digital lock , it introduce in detail the theory and the system designing .The

article designed a digital lock and made it be in form with FPGA .

Key Word: EDA verall Password Digital Lock Chip

.

四川师范大学成都学院专科毕业设计

III

目 录

前言 ............................................................................................................................................ 1

1 设计背景知识介绍 .............................................................................................................. 1

1.1 常用EDA软件介绍 ...................................................................................................... 1

1.2 FPGA硬件设计描述 ..................................................................................................... 2

1.3 QUARTUSⅡ综述及设计流程 ......................................................................................... 5

2 电子密码锁系统总体设计 .................................................................................................. 5

2.1 电子密码锁系统设计要求 ............................................................................................ 5

2.2 方案的提出 .................................................................................................................... 5

2.3 系统设计和各功能模块的描述 .................................................................................... 6

3 系统详细设计 ...................................................................................................................... 8

3.1 电子密码锁输入模块 .................................................................................................... 8

3.1.1 时序产生电路 ......................................................................................................... 8

3.1.2 按键消抖电路 ........................................................................................................... 8

3.1.3 键盘扫描电路 ........................................................................................................... 9

3.1.4 键盘译码电路 ....................................................................................................... 10

3.1.5 键盘输入模块的实现 ........................................................................................... 10

3.2 电子密码锁控制模块 .................................................................................................. 11

3.2.1 控制模块的功能描述 ........................................................................................... 11

3.2.2 控制模块的实现 ................................................................................................... 11

3.3 电子密码锁显示模块 .................................................................................................. 12

3.3.1 数码管显示原理 ................................................................................................... 12

3.3.2 译码显示的实现 ................................................................................................... 13