【正文】
年 月 日 備 注 西安郵電大學(xué)畢業(yè)論文 (設(shè)計(jì) )成績(jī)?cè)u(píng)定表 (續(xù)表 ) 目錄 摘要 I ABSTRACT II 引言 1 1 電子密碼鎖原理 2 編碼總量的確定 2 2 誤碼輸入保護(hù)措施 2 3 2 系統(tǒng)分析 4 FPGA 簡(jiǎn)介 4 FPGA 5 5 Verilog 硬件描述語(yǔ)言 6 模塊的描述方式 6 3 系統(tǒng)設(shè)計(jì) 7 7 頂層實(shí)體說(shuō)明的 Verilog 語(yǔ)言程序 7 頂層結(jié)構(gòu)體的設(shè)計(jì) 8 底層模塊的分析、實(shí)現(xiàn)與仿真 10 10 編碼電路 10 比較電路 11 預(yù)置密碼電路 11 計(jì)數(shù)器選擇電路 12 控制指示燈電路 12 分頻電路 12 七段顯示譯碼電路 13 控制器模塊的分析 14 系統(tǒng)的 RTL 分析 15 4 總結(jié) 17 致謝 18 參考文獻(xiàn) 19 附錄 Verilog 程序 20 1. 預(yù)置密碼電路程序 20 2. 比較電路的程序清單 20 3. 七段顯示譯碼電路程序清單 22 4. 分頻電路的程序清單 23 5. 數(shù)碼管顯示電路程序清單 23 6. 確認(rèn)輸入程序清單 24 7. 開(kāi)鎖指示程序清單 24 8. 密碼清除程序清單 25 9. 鍵盤(pán)掃描程序清單 26 I 摘要 隨著電子技術(shù)的發(fā)展 , 越來(lái)越多的 機(jī)械式密碼鎖 被 電子密碼鎖 所替代 , 同時(shí) 電子密碼鎖 自身也在不斷的更新?lián)Q代 ,基于單片機(jī)技術(shù)的 電子密碼鎖 設(shè)計(jì) 較 多同時(shí)也有 PCB 板和 PLC 的 設(shè)計(jì)。 基于單片機(jī)的密碼鎖因?yàn)?程序 經(jīng)常 跑飛 , 在用戶(hù)使用中密碼鎖的可靠性降低 。 于是乎 優(yōu)于其他設(shè)計(jì) 的基于 FPGA 用 Verilog 硬件語(yǔ)言描述的電子密碼鎖設(shè)計(jì)方法誕生了 。 本設(shè)計(jì)使用 Verilog 語(yǔ)言程序描述 各個(gè) 模塊以及 每個(gè) 模塊之間的連接關(guān)系 ,這里將電子密碼鎖電路為 4 個(gè)模塊 ,它們分別是 輸入輸出模塊、主控模塊、顯示模塊和報(bào)警模塊。 硬件語(yǔ)言 Verilog 編寫(xiě)完成后利用 Quartus II 進(jìn)行仿真論證并將程序下載到 FPGA 中完成硬件調(diào)試 實(shí)現(xiàn)電子密碼鎖的設(shè)計(jì)與實(shí)現(xiàn)。在密碼開(kāi)鎖的基礎(chǔ)上增 加了 數(shù)碼顯示控制與 鍵盤(pán)防抖 以及誤碼 報(bào)警 等使系統(tǒng)易于操作 , 體現(xiàn)了設(shè)計(jì)為 服務(wù)的目的 ,所以 , 本設(shè)計(jì)具有 一定 的推廣價(jià)值。 關(guān)鍵詞: FPGA EDA Quartus II 硬件語(yǔ)言 II ABSTRACT With the development of electronic technology, more and more mechanical bination lock were replaced by a electronic bination lock, electronic bination lock itself also is constantly upgrading, based on single chip microputer technology electronic bination lock design at the same time, there are more PCB board and the design of the PLC. Because bination lock based on MCU program often run fly, the reliability of the bination lock in the users to use. Result is superior to the other design based on FPGA with Verilog hardware description language design method of electronic bination lock was born. This design use Verilog language program describes the connection relationship between the various modules and each module, electronic bination lock circuit into four modules, here they are input and output module, main control module, display module and alarm module. The Verilog hardware language writing is pleted using the Quartus II simulation demonstrates and download the program to plete the debugging of hardware electronic bination lock in the FPGA design and implementation. On the basis of the password lock increased digital display control with stabilization and keyboard error alarm, etc. Make the system easy to operate, embodies the design for the purpose of service, so, this design has a certain popularization value. Key words: FPGA EDA Quartus II Electronic Password Lock 基于 FPGA電子密碼鎖設(shè)計(jì)與實(shí)現(xiàn) 1 引言 隨著 社會(huì)的發(fā)展人們對(duì)鎖的要求越來(lái)越高, 早在公元前 3000 年的中國(guó)仰韶文化遺址中就留存有裝在木結(jié)構(gòu)框架建筑上的木鎖,一把好鎖傳統(tǒng)鎖由于結(jié)構(gòu)限制已經(jīng)很難滿(mǎn)足當(dāng)前社會(huì)的需求管理和防盜 ,特別是在一些無(wú)人監(jiān)視在公共場(chǎng)所 ,如辦公室、寫(xiě)字樓、賓館、倉(cāng)庫(kù)和其他地方。 鎖也逃不過(guò) 電子技術(shù)的發(fā)展 ,于是電子鎖誕生了 。目前 市場(chǎng)上基于單片機(jī)技術(shù) 的電子密碼鎖較多 ,軟件由 編碼器和解碼器 完成,在用戶(hù)體驗(yàn)中 程序 經(jīng)常 跑飛 ,系統(tǒng) 可靠性較差 。 FPGA