PLD段码显示libraryieee;useieee.std_logic_1164.all;entityduanmaisport(fff:outbit_vector(1to5);aaa:outbit_vector(1to5));end;architecturekkofduanmaisbeginfff(1to5)=11111;aaa(1to5)=11111;end;PLD三个数加法编程libraryieee;useieee.std_logic_1164.all;entityjwisport(in1,in2:inintegerrange0to15;a,b:outstd_logic_vector(1to7));end;architectureggofjwissignalhe:integerrange0to45;beginhe=in1+in2;withheselecta=1111110when0|10|20|30|40,0110000when1|11|21|31|41,1101101when2|12|22|32|42,1111001when3|13|23|33|43,0110011when4|14|24|34|44,1011011when5|15|25|35|45,1011111when6|16|26|36,1110000when7|17|27|37,1111111when8|18|28|38,1111011when9|19|29|39,0000000whenothers;withheselectb=0000000when0=heandhe=9,else0110000when10=heandhe=19,else1101101when20=heandhe=29,else1111001when30=heandhe=39,else0110011when40=heandhe=39,else0000000whenothers;end;PLD八个按键两个灯libraryieee;useieee.std_logic_1164.all;entityguozi3isport(in1,in2:instd_logic_vector(1to4);a,b:outstd_logic_vector(1to8));end;architectureggofguozi3isbeginwithin1select0110000when0001,1101101when0010,1111001when0011,0110011when0100,1011011when0101,1011111when0110,1110000when0111,1111111when1000,1111011when1001,0000000whenothers;within2selectb=0110000when0001,1101101when0010,1111001when0011,0110011when0100,1011011when0101,1011111when0110,1110000when0111,1111111when1000,1111011when1001,0000000whenothers;end;PLD顺序语句编程(0加到9)libraryieee;useieee.std_logic_1164.all;entityjinchenisport(in1:instd_logic;a:outstd_logic_vector(1to7));end;architectureggofjinchenissignalss:integerrange0to9;beginprocessbeginwaituntilin1='1';ss=ss+1;ifss=10thenss=0;endif;endprocess;withssselecta=1111110when0,0110000when1,1101101when2,1111001when3,0110011when4,1011011when5,1011111when6,1110000when7,1111111when8,1111011when9,0000000whenothers;end;PLD矢量10个控制2个数码管libraryieee;useieee.std_logic_1164.all;entitykongzhi2isport(a:outbit_vector(1to7);b:inbit_vector(1to10));end;architectureffofkongzhi2isbegina=1111110whenb=1000000000else0110000whenb=0100000000else1101101whenb=0010000000else1111001whenb=1001000000else0110011whenb=1000100000else1011011whenb=1000010000else1011111whenb=1000001000else1110000whenb=1000000100else1111111whenb=1000000010else1110011whenb=1000000001else0000000;end;PLD晶振50M控制数码管libraryieee;useieee.std_logic_1164.all;entityjinzhengisport(in50m:instd_logic;a:outstd_logic_vector(1to7));end;architectureggofjinzhengissignalin1:std_logic;signalss:integerrange0to9;signalcount:integerrange0to25000000;beginprocessbeginwaituntilin50m='1';count=count+1;ifcount=25000000thencount=0;in1=notin1;endif;endprocess;processbeginwaituntilin1='1';ss=ss+1;ifss=10thenss=0;endif;endprocess;withssselecta=1111110when0,0110000when1,1101101when2,1111001when3,0110011when4,1011011when5,1011111when6,1110000when7,1111111when8,1111011when9,0000000whenothers;end;PLD晶振50M自动跳变程序(0到59)libraryieee;useieee.std_logic_1164.all;entityjiadxxisport(in50m:instd_logic;a,b:outstd_logic_vector(1to7));end;architectureggofjiadxxissignalin1:std_logic;signalt,g:integerrange0to9;signalcount:integerrange0to5925000000;beginprocessbeginwaituntilin50m='1';count=count+1;ifcount=25000000thencount=0;in1=notin1;endif;endprocess;processbeginwaituntilin1='1';g=g+1;ifg=9thenifg=5then改变变量g=0;t=t+1;ift=5thent=0;endif;endif;endprocess;withgselecta=1111110when0,0110000when1,1101101when2,1111001when3,0110011when4,1011011when5,1011111when6,1110000when7,1111111when8,1111011when9,0000000whenothers;withtselectb=1111110when0,0110000when1,1101101when2,1111001when3,0110011when4,1011011when5,1011111when6,1110000when7,1111111when8,1111011when9,0000000whenothers;end;PLD(1-8数码管显示)第六个显示0libraryieee;useieee.std_logic_1164.all;entityjiadxxisport(a:outstd_logic_vector(1to7);b:outstd_logic_vector(1to3));end;architecturekkofjiadxxisbegina=1111110;--显示的数“0”b=010;--显示的位“第6位”end;PLD动态间隔1秒闪烁libraryieee;useieee.std_logic_1164.all;entityjiadxxisport(in50m:instd_logic;b:outstd_logic_vector(1to3);a:outstd_logic_vector(1to7));end;architectureggofjiadxxissignalcount:integerrange0to25000000;signalcount_one:integerrange0to1;signalone_hz:std_logic;beginprocessbeginwaituntilin50m='1';count=count+1;ifcount=25000000thencount=0;one_hz=notone_hz;endif;endprocess;processbeginwaituntilone_hz='1';count_one=count_one+1;ifcount_one=0thenb=000;elseb=001;endif;endprocess;a=1111110;end;PLD动态显示01libraryieee;useieee.std_logic_1164.all;entitydz1121isport(in50m:instd_logic;a:outstd_logic_vector(1to7);b:outstd_logic_vector(1to3));end;architectureggofningyiissignalin1:std_logic;signalcount_c:integerrange0to3;signalcount:integerrange0to2500;beginprocessbeginwaituntilin50m='1';count=count+1;ifcount=2500thencount=0;in1=notin1;endif;endprocess;processbeginwaituntilin1='1';count_c=count_c+1;ifcount_c=1thencount_c=0;endif;endprocess;withcount_cselecta=1111110when0,0110000when1,0000000whenothers;withcount_cselectb=000when0,001when1,111whenothers;end;PLD数码管显示0-7libraryieee;useieee.std_logic_1164.all;entityxian0-7isport(in50m:instd_logic;a:outstd_logic_vector(1to7);b:outstd_logic_vector(1t