freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于verilog的fpga的電子密碼鎖的設(shè)計-全文預(yù)覽

2024-12-06 05:27 上一頁面

下一頁面
  

【正文】 于輸入 4 位密碼 always(posedge clk1 or negedge resetb) begin if(!resetb) sub_state=first。 else alarm_count=0。 alarmed=839。 alarmed=839。 alarmed=839。 alarmed=839。 endcase end //狀態(tài)轉(zhuǎn)換 always(posedge clk1 or negedge resetb) begin if(!resetb) main_state=waits。 else next_state=pass。amp。 if(CNT_R2 4000000) begin clk1 = 1。 //輸入狀態(tài)寄存器: error 和 correct reg error。b100。b000, second=339。 reg [2:0]sub_state。//下一個狀態(tài) //主有限狀態(tài)轉(zhuǎn)換機的三個狀態(tài): waits、 pass、 alarm parameter waits=339。 ( ~four1 ))。 ( ~three1 ))。 ( ~two1 ))。 ( ~zero1 ))。 ( ~one1 ))。b0001000100010001。 reg [7:0] passed。 reg [18:0] CNT_R1。////////////yiwei//// reg [7:0] dig。 // 鍵盤按下標(biāo)志 reg [3:0] key。 //輸入時鐘信號 output [7:0]passed。 reg zero,one,two,three,four。b1011。b1000,nine=439。b0100,five=439。密碼顯示采用的是記錄密碼的寄存器的數(shù)據(jù),顯示掃描的掃描時間設(shè)置為 1ms 左右,這樣顯示不會出現(xiàn)閃爍或者殘影。 密碼記錄與比較 程序設(shè)定了一個寄存器用來記錄輸入的密碼。其中主要包 括:輸出控制部分、警報計時部分、鎖打開后的計時部分、比較密碼部分、記錄密碼部分和記錄錯誤次數(shù)的部分 密碼的輸入 本次密碼鎖的密碼輸入采用 FPGA 芯片上的 8 位單個按鍵 ,考慮到按鍵數(shù)目不夠,采用了一位按鍵作為功能轉(zhuǎn)換按鍵;即前 5 位按鍵輸入 0~4,同時按下功能轉(zhuǎn)換按鍵時,按鍵 0~4 即轉(zhuǎn)換為按鍵 5~9,這就彌補了按鍵數(shù)目的不足。 格雷編碼時,相鄰狀態(tài)每次只有一個比特位產(chǎn)生變化,這樣減少了瞬變的次數(shù),也減少了產(chǎn)生毛刺和一些狀態(tài)的可能。其原理如下兩圖: 圖 型狀態(tài)機輸出原理 圖 Moore 型狀態(tài)機輸出原理 設(shè)計流程 本次密碼鎖的設(shè)計,有限狀態(tài)機應(yīng)該包括以下狀態(tài):密碼為輸入前的等待狀態(tài)、輸入密碼時的等待狀態(tài)、輸入密碼正確時的通過狀態(tài)、輸入密碼錯誤時的警報狀態(tài)。寄存器用于存儲狀態(tài),組合電路用于狀態(tài)譯碼和產(chǎn)生輸出信號。 三、芯片主控設(shè)計 FPGA 有限狀態(tài)機 本設(shè)計是通過 FPGA 有限狀態(tài)機來實現(xiàn),設(shè)計有限狀態(tài)機最開始的工作時要確定電路,包括哪些狀態(tài),比如某個電路包括四個狀態(tài), S0,S1,S2,S3。系統(tǒng)原理框圖如圖 所示: 圖 系 統(tǒng)框圖 總體實現(xiàn)原理 本系統(tǒng)有 8 個按鍵, K0,K1,K2,K3,K4,K5 代表數(shù)字 09 共 10 個數(shù)字和 1 個確認(rèn)鍵, 1 個復(fù)位鍵。 關(guān)鍵詞 :現(xiàn)場可編程門陣列; VHDL 語言;電子密碼鎖 The Report Of Electronic Code Lock Design Abstract: FPGAbased design of the electronic code lock is a small digital system. It has many unique advantages: good privacy and security , it do not need the key but remember password to unlock, and so on while it pare to ordinary mechanical locks. At present, the electronic code lock is most used of SCM technology .In practice, however, the process easy run to fly. So the reliability of this system is poor. The paper introduced a field programmable gate arrays FPGA devices to design electronic password lock. The VHDL language is used to describe the system and achieved in EP3C10E144C8. Though the simulation tests, using FPGAbased design of the electronic code lock can achieve the expected goal. Of course, some of the details of the system in the design of the need to constantly refined and improved, in particular the expansion of the system have a good design and practica
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1