摘 要
电子智能密码锁的使用体现了人们消费水平、保安意识和科技水平的提高 ,而且避免了携带甚至丢失钥匙的麻烦。目前设计智能密码锁的方法很多 ,例如用传统的 PCB 板设计、用PLC设计或者用单片机设计。而用VHDL可以更加快速、 灵活地设计出符合各种要求的智能密码锁,优于其他设计方法 ,使设计过程达到高度自动化。EDA 技术设计电子系统具有用软件的方式设计硬件;设计过程中可用有关软件进行各种仿真,系统可现场编程、在线升级,整个系统可集成在一个芯片上等特点;不但设计周期短、设计成本低,而且将提高产品或设备的性能,缩小产品体积、提高产品的技术含量,提高产品的附加值。
本文采用VHDL对一个六位的智能智能密码锁进行仿真,基于QuartusII软件开发平台,使用VHDL语言,运用自顶向下的设计方法,根据整个系统性能的描述和要求完成更改密码、报警等功能,在闭锁时,若输入密码正确,智能密码锁打开,此时可以重置或修改密码。若输入错误,LED报警,可加入点阵动态显示密码错误的警示信息,此时可以通过键盘按键来关闭警报,系统运行正常。
关键词:电子智能密码锁;VHDL,FPGA;EP1C3T144C8;
ABSTRACT
The use of electronic cipher locks reflects the improvement of people's consumption level, security awareness and scientific and technological level, and avoids the trouble of carrying or even losing keys. There are many ways to design cipher locks at present, such as using traditional PCB boards. Design with PLC or single chip computer. But with VHDL can design more quickly and flexibly to meet the various requirements of the code lock, better than other design methods, Make the design process achieve a high degree of automation. EDA technology design electronic system with software design method, the design process can be used to carry out various simulation software, the system can be field programming, onlineUpgrade, the whole system can be integrated on a chip, not only the design cycle is short, the design cost is low, but also will improve the performance of the product or equipment, reduce the volume of the product, increase the technical content of the product, and increase the added value of the product.
This paper uses the VHDL to a six bit password lock intelligent simulation based on QuartusII software development platform, using VHDL language, using the top-down design method, according to the performance of the whole system is described and required to change the password, alarm and other functions, in the lock, if the correct password, password lock, or can be reset at this time modify the password. If the input error, LED alarm, can be added to the dot matrix dynamic display alerts the wrong password, then through the keyboard button to shut off the alarm system is in normal operation.
Key words: electronic code lock (VHDL) FPGAA EP1C3T144C8;
目 录
第1章 绪论 1
1.1 智能密码锁的研究背景及意义 1
1.2 智能密码锁的研究现状及发展趋势 2
1.3 本课题的主要研究内容 2
1.4 本章小结 3
第2章 设计平台介绍 4
2.1 FPGA简介 4
2.1.1 FPGA工作原理 4
2.1.2 FPGA基本特点 4
2.2 Quartus II简介 5
2.3 VHDL介绍 5
2.4 本章小结 7
第3章 智能密码锁设计 8
3.1 按键模块 9
3.2 消抖模块 13
3.3 分频模块 14
3.4 密码控制模块 18
3.5 初始密码寄存器模块 21
3.6 密码译码模块 22
3.7 本章小结 27
第4章 仿真和硬件验证 24
4.1 模块仿真 25
4.1.1 分频模块 25
4.1.2 消抖模块 25
4.1.3 键盘扫描模块 26
4.1.4 密码控制模块 26
4.1.5 密码译码模块 28
4.2 硬件验证 28
4.2.1 暗文密码输入 28
4.2.2 明文密码输入 29
4.2.3 密码输入正确 29
4.2.4 密码输入错误 30
4.3 本章小结 30
第5章 结论 31
参考文献 32
致谢 33
附录 34
附录1 硬件原理图 34
附录2 系统顶层文件图 35
附录3 硬件实物图 36
附录4 部分模块代码 37