catalogue
1 thread theory 1
1. 1 Present situation and development at home and abroad 1
1.2 principle of electronic password lock II
1.3 introduction of electronic code lock 4 system
1.4 system design requirements 4
1.5 research purpose and significance of this topic 5
2 field programmable gate array FPGA 6
2. Basic structure of1FPGA 6
2.2 advantages of FPGA10
2.3 FPGA design process 1 1
2.4 Top-down design method 17
2.5 modular design of FPGA 18
3 VHDL hardware description language
3. The basic structure of1VHDL language 20
3.2 Structure Description 2 1
3.3 Top-down design method 22
Design and Simulation of Electronic Code Lock 24
4. 1 hardware device 24
4.2 Design of several main functional modules
4.3 Computer Simulation 32
Binding language 38
Reference 39
Appendix 1 English original 4 1
Appendix 2 Chinese translation 50
Appendix 3 Source Program 57
Present situation and development of 1. 1 at home and abroad
With the improvement of people's living standards and the strengthening of safety awareness, the requirements for safety are getting higher and higher. Since ancient times, the lock has been the iron general guarding the door, and people have high requirements for it, which is not only safe and reliable against theft, but also convenient to use, which is also the theme developed by lock makers for a long time. With the development of electronic technology, various electronic products came into being, and electronic code lock is one of them. According to relevant data, the research of electronic password lock began in 1930s and has been used in some special places for a long time. This kind of lock is to complete the unlocking process by inputting a set of passwords through the keyboard. The original intention of studying this kind of lock is to improve the security of the lock. Because the electronic lock has a large number of keys (passwords), it can be used with mechanical locks, and it can avoid the security risks caused by key imitation. Electronic locks only need to remember a set of passwords and do not need to carry metal keys, which saves people the trouble of carrying metal keys and is appreciated by more and more people. There are many types of electronic locks, including digital locks, fingerprint locks, magnetic card locks, ic card locks, biological locks and so on. But it is more practical to use the key-type electronic password lock.
After 1980s, with the appearance of ASIC for electronic lock, the volume of electronic lock has been reduced, the reliability has been improved and the cost has been higher. It is suitable for occasions with high safety requirements and needs power supply to provide energy. The use is still limited to a certain range, so it is difficult to popularize, so the research on it has not made significant progress.
At present, in western developed countries, the technology of electronic code lock is relatively advanced and perfect. Electronic password lock has been widely used in intelligent access control system, and access control management is realized through various safer and more reliable technologies. In China, the overall level of electronic locks is still around the 1970s, and the cost of electronic password locks is still very high. Push-button electronic lock is still the main product in the market. Push-button electronic locks and card-button electronic locks have been introduced to the international advanced level, and now there are several factories in China that produce and supply the market. However, the domestic self-developed electronic locks have not yet formed a market structure and are not widely used. Many domestic enterprises have also introduced the world's advanced technology, and their development prospects are very impressive. I hope that through continuous efforts, electronic password locks can also be widely used in China [1].
At present, most of the electronic password locks used are based on single chip microcomputer technology, with single chip microcomputer as the main device, and the generation of its encoder and decoder is software [2]. In practical application, the reliability of the system is poor because the program is easy to run out of control. The electronic password lock based on FPGA device of field programmable gate array is constructed by FPGA device, and all algorithms are completely realized by hardware circuit, which greatly improves the reliability of the system. Because FPGA has field programmable function, when the design needs to be changed, only the control and interface circuits in FPGA need to be changed, and the updated design can be downloaded to FPGA through EDA tools without changing the design of external circuits, which greatly improves the design efficiency.
1.3 Brief Introduction of Electronic Code Lock System
The universal electronic password lock is mainly composed of three parts: digital password input circuit, password lock control circuit and password lock display circuit.
(1) The password lock input circuit includes several small functional circuits, such as timing generation circuit, keyboard scanning circuit, keyboard bounce elimination circuit and keyboard decoding circuit.
(2) The password lock control circuit includes several small functional circuits, such as key data buffer storage circuit, password clearing, changing, storing and activating electric lock circuit (register clearing signal generating circuit), password checking circuit (numerical comparison circuit), unlocking circuit (opening/closing circuit) and so on.
(3) The password display circuit mainly converts the BCD code of the display data into the corresponding code. For example, if the seven-segment digital tube display circuit is selected, the BCD code of the data to be displayed is mainly converted into the seven-segment display drive code of the digitizer [4].
1.4 system design requirements
Design a universal electronic password lock with high security and low cost. Specific functional requirements are as follows:
(1) digital input: every time you press the numeric key, you enter a numerical value and display it on the display. The previously entered data is sequentially shifted to the left by one numerical position.
(2) Digital Clear: Press this key to clear all previously entered values to "0000".
(3) Password change: Press this key and the current number will be set as the new password.
(4) Activate the electric lock: press this key to lock the password lock.
(5) Unlock the electric lock: Press this key to check whether the entered password is correct, and unlock it if the password is correct.
1.5 research purpose and significance of this topic
With the improvement of people's living standards, the requirements for home anti-theft technology are getting higher and higher. Traditional mechanical locks are often broken because of their simple structure, and electronic locks are welcomed by users because of their high confidentiality, good flexibility and high safety factor. At present, the electronic password lock based on single chip microcomputer technology is mainly on the market, but its reliability is poor. FPGA is a field programmable gate array, which is the product of further development on the basis of programmable devices such as PAL, GAL and EPLD. It is a very large scale integrated circuit with the ability to reconfigure the circuit. Usually FPGA has tens of thousands of rewrites, which means that hardware design is as flexible and convenient as software design. Compared with the electronic password lock based on single chip microcomputer technology, the reliability of the system is improved by using FPGA devices, and the replacement and upgrade of the electronic password lock are more convenient and simple because of the field programmable function of FPGA [3].
Through this design, we can master the design method of FPGA system, be familiar with the use of software and hardware description language related to FPGA design, understand the system composition of electronic password lock, and use FPGA to realize the design and implementation of electronic password lock, which can deepen our understanding of specialty, enhance our hands-on ability, accumulate practical experience, and lay a good foundation for future work.
refer to
[1] Li Lianhua. Design of electronic password lock based on FPGA. China Science and Technology Information, 2006, (0 1):64.
[2] Xu Qi. Design of electronic password lock based on FPGA. Science and technology information, 2006, (10):240-24 1
, Liu, Zhu. Electronic password lock based on FPGA. Electronic technology, 2005, (0 1):26-28.
Zhao Yidan, Xu Xiaolin, Zhou Zhenfeng. System principle, design steps and flow chart of electronic password lock. Journal of Jiaxing University, 2003,15 (S1):103-105.
Lu Chongyang, Lu Donghua. FPGA technology and its development trend. Microelectronics Technology, 2003, (0 1):5-7.
Wang Xiaoyong. Basic principle and application of FPGA. Ship Electronic Engineering, 2005, (02):82-85.
[7] Cheng Yaolin. Analysis of system design method of FPGA. Modern Electronic Technology, 2005, (19):90-93
1. The pioneering spirit represents the enterprisin