《電子技術(shù)應(yīng)用》
您所在的位置:首頁 > 可編程邏輯 > 業(yè)界動(dòng)態(tài) > 基于FPGA的保密型密碼輸入器設(shè)計(jì)

基于FPGA的保密型密碼輸入器設(shè)計(jì)

2009-07-08
作者:樊國梁1,張曉燕2,曹 杰1

??? 摘? 要: 為了改善現(xiàn)有密碼輸入器容易造成密碼泄露的缺點(diǎn),設(shè)計(jì)了保密型密碼輸入器。闡述了保密型密碼輸入器的工作原理,給出具體設(shè)計(jì)、計(jì)算機(jī)仿真。經(jīng)過實(shí)驗(yàn)分析和計(jì)算機(jī)仿真,該電路能夠最大限度地保護(hù)用戶密碼并且容易在工程中應(yīng)用。?

??? 關(guān)鍵詞: 密碼保護(hù);鍵位;仿真;VHDL?

?

??? 在生活中人們?cè)絹碓筋l繁地使用各種各樣的密碼來管理私人信息和資金賬戶。密碼作為個(gè)人信息的保密鎖,在銀行、網(wǎng)絡(luò)等公共場(chǎng)合應(yīng)用廣泛,普遍采用各種加密算法進(jìn)行處理,有效地提高了安全可靠性。但是在一些場(chǎng)合,如ATM柜員機(jī)、商場(chǎng)刷卡消費(fèi)時(shí),由于數(shù)字鍵盤排列具有一定的規(guī)律性,當(dāng)用戶輸入密碼時(shí),即使旁人站在一米線以外,也能通過輸入者手指的移動(dòng)順序猜出密碼,這使得原本安全可靠的密碼泄漏,使密碼輸入器變得不再安全。?

??? 目前國內(nèi)外對(duì)于密碼輸入器的改進(jìn)大都局限在外形設(shè)計(jì)上[1],如加罩、將鍵盤方型布局改為V型等,這些措施不能從根本上解決密碼泄漏問題,并且給密碼輸入者帶來操作上的不便。本文利用VHDL語言設(shè)計(jì)了一種新型保密型密碼輸入器,使鍵盤上0~9的10個(gè)數(shù)字每次輸入時(shí)隨機(jī)排列,不再具有規(guī)律性,從而使輸入密碼時(shí)手指按下的按鍵順序和目前普通的密碼輸入器按下的順序不同,這樣就可以避免他人記下按鍵順序再根據(jù)鍵盤數(shù)字的排列規(guī)律猜出用戶輸入的密碼。?

1 設(shè)計(jì)思想?

??? 保密型密碼輸入器的最大特點(diǎn)就是它可以改變現(xiàn)有密碼輸入器鍵值排列順序,在每一個(gè)按鍵上安裝一個(gè)數(shù)碼管,每次輸入密碼時(shí),0~9的鍵值隨機(jī)排列顯示,同時(shí)還要完成以下功能:?

??? (1)產(chǎn)生0~9共10個(gè)隨機(jī)排列且不重復(fù)的數(shù)組,用來確定鍵盤上數(shù)字的排列順序;?

??? (2)將隨機(jī)數(shù)組轉(zhuǎn)化成數(shù)碼管上要顯示的鍵值,并順序輸出到相應(yīng)按鍵的數(shù)碼管上;?

??? (3)對(duì)鍵盤進(jìn)行掃描,根據(jù)按下的鍵位信息與顯示到按鍵上的鍵值判斷出輸入的密碼;?

??? (4)將密碼信息輸出。?

??? 根據(jù)以上功能,可以分四個(gè)模塊進(jìn)行設(shè)計(jì):分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路" title="分頻電路">分頻電路、消除抖動(dòng)電路、鍵盤譯碼電路、主體控制電路。?

2 電路設(shè)計(jì)?

2.1 分頻電路?

??? 芯片中每一個(gè)模塊都要有一定的時(shí)鐘信號(hào)才能工作,而且在外部鍵盤電路和動(dòng)態(tài)掃描數(shù)碼顯示管上都要加一定頻率的時(shí)鐘信號(hào)。利用分頻電路將從外部輸入的4 MHz的時(shí)鐘clk_4m經(jīng)過分頻后輸出各部分電路所需的時(shí)鐘脈沖。在程序中設(shè)定一個(gè)20位的信號(hào)q,在clk_4m到上升沿時(shí)q自加1,這樣可以取q的其中幾位來達(dá)到分頻的目地。?

??? 頻率計(jì)算公式為:其中q(n)為從右起第n位信號(hào)。例如取q(1)即得到4分頻后的時(shí)鐘1 MHz。?

??? 程序中各信號(hào)頻率為:信號(hào)clk_keyboard1是鍵盤行掃描信號(hào),與鍵盤列掃描信號(hào)一同識(shí)別按鍵,它的頻率設(shè)定為8 Hz;信號(hào)clk_debounce是消除抖動(dòng)電路的采樣頻率,為128 Hz。信號(hào)clk_disp1是數(shù)碼管掃描信號(hào),它的頻率要高于人眼的最大可分辨頻率24 Hz,設(shè)定為128 Hz。信號(hào)clk_scan是鍵盤的行掃描信號(hào),一共有四位分別代表鍵盤上的四行,最低位clk_scan(0)代表第一行,最高位clk_scan(3)代表第四行,低電平有效,它與clk_keyboard1相對(duì)應(yīng),即clk_keyboard1代表的二進(jìn)制數(shù)。?

2.2 消除抖動(dòng)電路?

??? 在輸入密碼時(shí)由于手抖動(dòng)或按鍵接觸時(shí)產(chǎn)生抖動(dòng)造成輸入信號(hào)不連續(xù),利用消抖電路將信號(hào)變化成一個(gè)連續(xù)的信號(hào),防止被誤認(rèn)為是多次輸入。?

??? 以分頻電路輸入的消抖電路時(shí)鐘信號(hào)為采樣信號(hào),檢查每個(gè)采樣信號(hào)的上升沿處輸入的信號(hào)key是什么狀態(tài)。當(dāng)key信號(hào)改變并且連續(xù)兩次采樣結(jié)果相同時(shí)才輸出改變后的信號(hào)dif_out,否則將維持原來的輸出信號(hào)。?

??? 從圖1中可以看出,key輸入多次的低電平,模擬輸入時(shí)的抖動(dòng)。當(dāng)這些低電平的寬度未達(dá)到兩個(gè)上升沿的寬度時(shí),輸出信號(hào)沒有改變;當(dāng)寬度超過兩個(gè)上升沿的寬度時(shí),輸出信號(hào)才發(fā)生改變,且輸出的低電平信號(hào)的寬度為一個(gè)采樣寬度。?

?

?

圖1? 消除抖動(dòng)電路的仿真

?

2.3 鍵盤譯碼電路?

??? 將鍵盤按鍵信息根據(jù)clk_keyboard1中0的位置判斷行位置,根據(jù)信號(hào)c中0的位置判斷列位置,從而確定按鍵位置,然后將這些鍵位的信息以四位二進(jìn)制碼的形式輸出。?

??? 用clk_debounce1為觸發(fā)信號(hào),每當(dāng)clk_debounce1在上升沿時(shí),將clk_keyboard1和c合并送給內(nèi)部信號(hào)z,由程序判斷是哪一個(gè)鍵被按下。flag_numb為輸出信號(hào)的標(biāo)記信號(hào),它是在clk_debounce1的下降沿才變化,使得flag_numb信號(hào)比out_numb落后半個(gè)周期。這樣確保在flag_numb信號(hào)為1時(shí),輸出的out_numb信號(hào)是0~9中的一個(gè)。鍵盤掃描參數(shù)表由表1所示。?

?

?

??? 如圖2所示,輸入0~9共10個(gè)按鍵信號(hào),信號(hào)out_numb經(jīng)過譯碼后正確地輸出相應(yīng)按鍵,并且flag_numb的上升沿位于out_numb信號(hào)的中間,可完全確保flag_numb上升沿觸發(fā)寄存器移位存儲(chǔ)的都是out_numb有用的信號(hào)。?

?

?

圖2? 鍵位譯碼電路的仿真

?

2.4 主體控制電路?

??? 該部分電路的主要功能為產(chǎn)生隨機(jī)的數(shù)組,用來確定S0~S9每個(gè)鍵位的鍵值。定義10個(gè)信號(hào)a~j,將0~9 10個(gè)數(shù)分別賦值給a~j,然后將a~j隨即排列組成一個(gè)數(shù)組,排在第1位的將是在0號(hào)鍵位上顯示的數(shù)字,排在最后的將是在9號(hào)鍵位上顯示的數(shù)字。表2定義了8個(gè)數(shù)組,定義的數(shù)組越多鍵盤上數(shù)字顯示的變化種類就越多。另外定義一個(gè)s信號(hào),當(dāng)開始輸入密碼信號(hào)start有效時(shí),s進(jìn)行累加,從而產(chǎn)生0~7的循環(huán),用來選擇8個(gè)數(shù)組中的一個(gè),進(jìn)而實(shí)現(xiàn)產(chǎn)生隨機(jī)數(shù)組的功能。?

?

?

??? 當(dāng)start信號(hào)有效時(shí),S經(jīng)過自加后就確定下來,選中一組隨機(jī)數(shù)組,程序就將數(shù)組的值保存起來,這個(gè)信號(hào)代表從0~9號(hào)鍵位的鍵值。然后順序送到按鍵的數(shù)碼管顯示出來,例如s=1時(shí),S0~S9對(duì)應(yīng)數(shù)組behfadjgic,即S0=1,S1=4,S2=7,S3=5,……,S9=2。?

??? 程序中定義一個(gè)24位的二進(jìn)制信號(hào)acc作為寄存器用來存放6個(gè)密碼數(shù)字,當(dāng)start有效就對(duì)寄存器清空(置1)和計(jì)數(shù)信號(hào)jishu置0。由鍵盤譯碼電路產(chǎn)生的標(biāo)志信號(hào)flag_numb的上升沿觸發(fā)寄存器向左移位,把鍵位信號(hào)out_numb1從acc的最低位輸入,并且每移一次計(jì)數(shù)信號(hào)jishu加1,這樣用戶輸入的前6位將被作為密碼保存在寄存器中,超過六6位,寄存器則不會(huì)記錄。?

??? 通過把寄存器acc中的鍵位信號(hào)和相應(yīng)的數(shù)組進(jìn)行對(duì)比,就可以找出按鍵對(duì)應(yīng)的6位密碼(mima),并可以將其輸出。?

??? 如圖3所示,當(dāng)start信號(hào)有效使得s=1時(shí),按輸入信號(hào)的規(guī)則加入1~9這9個(gè)按鍵信號(hào)和flag_numb標(biāo)志信號(hào)。可以看出在輸入1~9這9個(gè)鍵后,程序只存儲(chǔ)了前6個(gè),由s=1推算出按下的1號(hào)~6號(hào)鍵位代表的密碼為475039,這和仿真后輸出的結(jié)果一致。?

?

?

圖3? 控制電路的仿真

?

2.5 頂層模塊的設(shè)計(jì)?

??? 各模塊利用VHDL語言設(shè)計(jì),通過仿真,功能都正確,生成各自的功能符號(hào),然后在MAX+plusII平臺(tái)上利用原理圖設(shè)計(jì)方法調(diào)用各模塊,將其按照電路原理連接在一起,加上輸入、輸出信號(hào),構(gòu)成的模塊圖如圖4所示,由此可生成一個(gè)完整的程序。?

?

?

?

圖4? 頂層模塊圖

?

??? 本設(shè)計(jì)改變了傳統(tǒng)密碼輸入器的形式,將每一個(gè)鍵所代表的數(shù)字進(jìn)行隨機(jī)排列,防止用戶輸入密碼時(shí)被別人通過觀察手指移動(dòng)的位置而竊取密碼。并且該設(shè)計(jì)采用EPF10K10LC84-4芯片實(shí)現(xiàn),外圍電路簡(jiǎn)單,工作穩(wěn)定可靠,便于在銀行、商場(chǎng)等工程中應(yīng)用,并且作為內(nèi)蒙古大學(xué)本科生創(chuàng)新基金項(xiàng)目受到專家肯定。?

參考文獻(xiàn)?

[1] 李海波.銀行密碼輸入器改進(jìn)[J].青年科學(xué),2005(3):20-21.?

[2] 盧毅,賴杰.VHDL與數(shù)字電路設(shè)計(jì)[M].北京:科學(xué)出版社,2001.?

[3] 潘松,黃繼業(yè).EDA技術(shù)實(shí)用教程(第二版)[M].北京:科學(xué)出版社,2005.?

[4] 褚振勇,翁木云.FPGA設(shè)計(jì)及應(yīng)用[M].西安:西安電子科技大學(xué)出版社,2003.

本站內(nèi)容除特別聲明的原創(chuàng)文章之外,轉(zhuǎn)載內(nèi)容只為傳遞更多信息,并不代表本網(wǎng)站贊同其觀點(diǎn)。轉(zhuǎn)載的所有的文章、圖片、音/視頻文件等資料的版權(quán)歸版權(quán)所有權(quán)人所有。本站采用的非本站原創(chuàng)文章及圖片等內(nèi)容無法一一聯(lián)系確認(rèn)版權(quán)者。如涉及作品內(nèi)容、版權(quán)和其它問題,請(qǐng)及時(shí)通過電子郵件或電話通知我們,以便迅速采取適當(dāng)措施,避免給雙方造成不必要的經(jīng)濟(jì)損失。聯(lián)系電話:010-82306118;郵箱:aet@chinaaet.com。