摘要摘要EDA技术的应用引起了电子产品系统开发的革命性变革。利用先进的EDA工具,基于硬件描述语言,可以进行系统级数字逻辑电路的设计。本文简述了VHDL语言的功能及其特点,并以4位串行手机键盘电子密码锁设计为例,介绍了一种在QuartusⅡ6.0开发软件下,基于VHDL硬件描述语言的复杂可编程逻辑器件(CPLD)的新型电子密码锁设计方法,阐述了其工作原理和软硬件设计方法。该密码锁通过扫描电路、键盘译码电路、弹跳消除电路、控制电路和七段译码电路等实现了密码输入、数码清除、密码激活、电锁解除、密码更改和误码报警等功能。本论文对该密码锁的程序进行了功能和时序仿真,结果表明该密码锁的功能满足设计要求,能够实现正常开锁、上锁和修改密码。该密码锁体积小、功耗低、易于维护和升级,有很好的市场前景。关键词:EDA,VHDL,FPGA,QuartusⅡ,电子密码锁IABSTRACTABSTRACTElectronicproductandsystemdevelopmentarebeingchangedrevolutionarilywithEDAtechnology.WecandesignallkindsofdigitallogicalcircuitswithadvancedEDAtoolsandVHDL.ThepaperintroducesthefunctionandcharacteristicofprogrammingofVHDLlanguagebriefly.Takingthedesignoftheserial4-bitelectroncodedlockforexample,thispaperintroducesanewwaytodesignelectroncodedlockwithCPLDandQuartusⅡ6.0asdevelopmentsoftwareandVHDLashardwaredescriptionlanguage.Itsoperatingprinciplesandthedesigningmethodsofhardwareandsoftwareareexplainedinthisarticle.Thiscodedlockcanperformthefollowingfunctions,suchascodeinput,codeclear,codeactivating,codereleasing,codecorrectingandwrongcodealarmingbyscanningcircuit,keyboarddecodecircuit,bounceeliminatingcircuit,controlcircuit.Thefunctionalandtimingsimulationsaremade.Theresultsshowthatthedesignspecificationoftheelectroniccodedlockismetandtheunlock/lockandcodecorrectingcanberealized.Thisnewelectroncodedlockhassmallsize,lowpower.Itsmaintenanceandupgradeareveryconvenient.Andithasabetterapplicationprospect.Keywords:EDA,VHDL,FPGA,QuartusⅡ,ElectroncodedlockII目录目录第1章引言.....................................................................................................................11.1课题背景.............................................................................................................11.2国内外研究现状.................................................................................................21.3课题主要研究工作.............................................................................................2第2章EDA技术与VHDL语言简介............................................................................32.1EDA技术............................................................................................................32.1.1EDA技术的发展......................................................................................32.1.2EDA技术的基本设计方法......................................................................52.2VHDL简介.........................................................................................................62.2.1VHDL语言...............................................................................................62.2.2VHDL语言的特点...................................................................................9第3章CPLD/FPGA硬件平台.....................................................................................103.1可编程逻辑器件的发展历史及概述...............................................................103.2FPGA/CPLD概述...................................................................................