pld應(yīng)用程序舉例_第1頁
pld應(yīng)用程序舉例_第2頁
pld應(yīng)用程序舉例_第3頁
pld應(yīng)用程序舉例_第4頁
pld應(yīng)用程序舉例_第5頁
已閱讀5頁,還剩30頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

library

PLDuseieee.std_logic_1164.all;entityduanmaisport(fff:outbit_vector(1to5);aaa:outbit_vector(1to5));architecturekkofduanmaisfff(1toaaa(1toPLDlibraryuseieee.std_logic_1164.all;entityjwisport(in1,in2:inintegerrange0to15;architectureggofjwsignalhe:integerrange0towithhe"0110000"when1|11|21|31|41,"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;withheselectb<="0000000"when0<=heandhe<=9,else"0110000"when10<=heand"1101101"when20<=heand"1111001"when30<=heand"0110011"when40<=heand"0000000"whenothers;PLDlibraryuseieee.std_logic_1164.all;entityguozi3isport(in1,in2:instd_logic_vector(1to4);a,b:outstd_logic_vector(1to8));architectureggofguozi3iswithin1select"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;within2selectb<="0110000"when"0001","1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;PLD順序語句編程(0加到libraryuseieee.std_logic_1164.all;entityjinchenisport(in1:instd_logic;a:outstd_logic_vector(1toarchitectureggofjinchenissignalss:integerrange0to9;waituntilin1='1';ifss=10thenendendprocess;withssselecta<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;PLD矢 10個控制2個數(shù)碼libraryuseieee.std_logic_1164.all;entitykongzhi2isport(a:outbit_vector(1to7); bit_vector(1to10));architectureffofkongzhi2isa<="1111110"whenb="1000000000"else"0110000"when "1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1110011"whenPLD晶振50Mlibraryuseieee.std_logic_1164.all;entityjinzhengisport(in50m:instd_logic;a:outstd_logic_vector(1to7));architectureggofjinzhengissignalin1:std_logic;signalss:integerrange0tosignalcount:integerrange0to25000000;in1<=notin1;endif;endwaituntilin1='1';ifss=10thenendendprocess;withssselecta<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenPLD晶振50M自動跳變程序(0到libraryuseieee.std_logic_1164.all;entityjiadxxisport(in50m:instd_logic;a,b:outstd_logic_vector(1to7));architectureggofjiadxxissignalin1:std_logic;signalt,g:integerrange0tosignalcount:integerrange0to5925000000;in1<=notin1;endif;endwaituntilin1='1';ifg=9 ifg=5thenift=5endif;endendprocess;withga<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;withtselectb<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;PLD(1-8數(shù)碼管顯示)第六個顯示libraryuseieee.std_logic_1164.all;entityjiadxxisport(a:outstd_logic_vector(1to7);b:outstd_logic_vector(1to3)); --顯示的數(shù) --顯示的位“第6位PLD動態(tài)間隔1libraryuseentityjiadxxisport(in50m:instd_logic;b:outstd_logic_vector(1to3);a:outstd_logic_vector(1to7));architectureggofjiadxx count:integerrange0tosignalcount_one:integerrange0to1;signalone_hz:std_logic;one_hz<=notone_hz;endif;endwaituntilone_hz='1';ifcount_one=0thenendendPLD動態(tài)顯示 libraryuseentitydz1121isport(in50m:instd_logic;a:outstd_logic_vector(1to7);b:outstd_logic_vector(1to3));architectureggofningyiissignalin1:std_logic;signalcount_c:integerrange0tosignalcount:integerrange0to2500;ifcount=2500in1<=notin1;endif;endwaituntilin1='1';ifcount_c=1thenendif;endprocess; count_cselecta<="1111110"when0,"0110000"when"0000000"whenwithcount_cselectb<="000"when0,"001"when"111"whenothers;PLD數(shù)碼管顯示libraryuseentityxian0-7isport(in50m:instd_logic;a:outstd_logic_vector(1to7);b:outstd_logic_vector(1to3));architectureggofxian0-7issignalin1:std_logic;signalcount_c:integerrange0tosignalcount:integerrange0to2500;waituntilifcount=2500thenin1<=notin1;endendwaituntilin1='1';casecount_cwhen whenwhenwhenwhenwhenwhenwhenifcount_c=7thenendif;endcase;endprocess;library

PLDuseieee.std_logic_1164.all;entityshizonisport(in50m:std_logic;a:outstd_logic_vector(1to7);--b:outstd_logic_vector(1to3));--architectureffofshizonsignalcount:integerrange0to250;--整數(shù)定signalcount_s:integerrange0to25000;--半signalg1,g2,s1,s2,b1,b2:std_logic_vector(1to7);--變量范圍signalone_hz:std_logic;--定義1signalsignalx:integerrange0to7;-signalgg1,gg2,ss1,ss2,bb1,bb2:integerrange0to9;ifcount=250one_hz<=notone_hz;endif;endwaituntilin50m='1';ifcount_s=25000thenone_s<=notone_s;endif;endwaituntilone_hz='1';casexwhenwhenwhen2=>b<="010";whenwhen4=>b<="100";a<=s2;when5=>b<="101";whenwhen7=>b<="111";endcase;endprocess;waituntilone_s='1';ifgg1=9thenifgg2=5thenifss1=9thenifss2=5thenifbb1=9thenendif;ifbb1=3andbb2=2thenendif;endif;endendif;endendwithgg1selectg1<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;withgg2selectg2<="1111110"when0,"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"0000000"whenothers;withss1selects1<="1111110"when0,"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;withss2selects2<="1111110"when0,"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"0000000"whenwithbb1selectb1<="1111110"when"0110000"when"1101101"when"1111001"when"0110011"when"1011011"when"1011111"when"1110000"when"1111111"when"1111011"when"0000000"whenothers;withbb2selectb2<="1111110"when0,"0110000"when"1101101"when"0000000"whenPLD單個音符編程 低2音libraryieee;useentityypyyisport(in50m:instd_logic;a:outarchitectureggofypyyissignalin1:std_logic;signalcount:integerrange0to25000000;ifcount=85034thenin1<=notin1;endendprocess;PLDlibraryuseentityypyyisport(in50m:instd_logic;a:outarchitectureggofypyyissignalin1:std_logic;signalin2:std_logic;signalcount:integerrange0tosignalcount_1:integerrange0tosignalys1s:integerrange0tosignaljia1:integerrange0to1;waituntilifcount=85034thenin1<=notin1;endendwaituntilin50m='1';ifcount_1=63775thenin2<=notin2;endendwaituntilin50m='1';ifys1s=50000000endif;ifjia1=0thenendif;endprocess;PLD1-7音符編程(if語句libraryuseentityypyyisport(in50m:instd_logic;a:outarchitectureggofypyyissignalin1:std_logic;signalin2:std_logic;signalin3:std_logic;signalin4:std_logic;signalin5:std_logic;signalin6:std_logic;signalsignalcount:integerrange0tosignalcount_1:integerrange0tosignalcount_2:integerrange0tosigna

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論