北郵數(shù)電綜合實(shí)驗(yàn)報(bào)告_第1頁(yè)
北郵數(shù)電綜合實(shí)驗(yàn)報(bào)告_第2頁(yè)
北郵數(shù)電綜合實(shí)驗(yàn)報(bào)告_第3頁(yè)
北郵數(shù)電綜合實(shí)驗(yàn)報(bào)告_第4頁(yè)
北郵數(shù)電綜合實(shí)驗(yàn)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩29頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、北京郵電大學(xué)電子工程學(xué)院2012級(jí)數(shù)字電路與邏輯設(shè)計(jì)實(shí)驗(yàn)報(bào)告點(diǎn)陣賽車(chē)游戲班內(nèi)序號(hào):姓名:7ooh0s目錄任務(wù)要求3系統(tǒng)設(shè)計(jì)4設(shè)計(jì)思路4設(shè)計(jì)框圖4分塊介紹6仿真波形6vhdl源程序10功能說(shuō)明25元器件清單25故障及問(wèn)題分析27實(shí)驗(yàn)總結(jié)27任務(wù)要求題目六、點(diǎn)陣賽車(chē)游戲基本要求:1、用8x8點(diǎn)陣進(jìn)行5秒倒計(jì)吋顯示,如下圖所示。oooooooo oooooooo ooeoooe ooeoooe ooeooo* oooooooo oooooooooooooooo oooooooo oooeoooo oootoooo oooo oooooooo oooooooooooooooo oooooooo ooe

2、eeee ooeoooe ooooo oooe oooooooo oooooooo0000000000000000000000000000000000000000oooooeoo oooooeoo ooetetoo00*00000 ooeooooo 00*00000 oooo2、當(dāng)5秒倒計(jì)時(shí)結(jié)束后,點(diǎn)陣顯示下圖所示的賽道和賽車(chē)的初始位置,賽車(chē)游 戲開(kāi)始,并開(kāi)始計(jì)吋,用兩個(gè)數(shù)碼管顯示吋間。圖中的紅色表示賽道,黃色 表示賽車(chē)的初始位置,箭頭表示賽車(chē)行進(jìn)的方向。oo®ooooo ooo®oooo ooooeooo oooooeee ooooo oooeoooo ooooeooo

3、ooooooo3、用盯n1btn3三個(gè)按鍵分別控制賽車(chē)的左移、前進(jìn)、右移,最終使賽車(chē)在 不碰撞賽道的情況下走完全程(即圖2中的綠色位置),游戲結(jié)束,點(diǎn)陣顯示“v”圖案,數(shù)碼管顯示走完全程所耗費(fèi)的時(shí)間。4、當(dāng)游戲時(shí)間超過(guò)59秒,或者賽車(chē)在行進(jìn)過(guò)程中碰撞賽道,游戲失敗,點(diǎn)陣 顯示"x"圖案。5、通過(guò)按鍵盯no進(jìn)行復(fù)位,控制點(diǎn)陣返回到圖1所示的初始狀態(tài)。提高要求:1、有多種游戲賽道可選,5秒倒計(jì)時(shí)顯示后賽道隨機(jī)出現(xiàn)。2、賽車(chē)的初始位置隨機(jī)出現(xiàn)。3、在賽車(chē)行進(jìn)過(guò)程中,賽道中隨機(jī)出現(xiàn)障礙物(用8x8點(diǎn)陣中的一個(gè)led 表示),通過(guò)btn1btn3三個(gè)按鍵的控制躲避障礙物,走完全程。若

4、賽 車(chē)碰到障礙物和賽道,則游戲失敗。系統(tǒng)設(shè)計(jì)設(shè)計(jì)思路程序采用自頂向下設(shè)計(jì)的思路,先將主程序啟動(dòng),然后依次啟動(dòng)子程序,主 程序?yàn)辄c(diǎn)陣倒計(jì)時(shí)部分,子程序包括數(shù)碼管顯示部分、點(diǎn)陣賽道顯示部分、賽車(chē) 移動(dòng)部分、邏輯判斷部分。設(shè)計(jì)框圖系統(tǒng)結(jié)構(gòu)圖 iaisv分塊說(shuō)明(1) 輸入部分:設(shè)計(jì)方案中有七個(gè)輸入端,時(shí)鐘信號(hào)輸入elk接外部時(shí)鐘,為計(jì)數(shù)器提 供有效的時(shí)鐘邊沿進(jìn)行計(jì)數(shù);復(fù)位信號(hào)輸入reset為低電平有效,當(dāng)reset=o時(shí),計(jì) 數(shù)器攵位到初始狀態(tài)“000”,同時(shí)賽道恢攵最初狀態(tài),當(dāng)resets時(shí),計(jì)數(shù)器正常計(jì) 數(shù);啟動(dòng)信號(hào)輸入start為高電平有效,當(dāng)start=l吋,倒計(jì)吋部分啟動(dòng)。另有四個(gè) 輸入端

5、控制賽車(chē)移動(dòng),分別對(duì)應(yīng)左移、右移、前進(jìn)、后退。(2) 處理部分:設(shè)計(jì)方案中此部分包含2個(gè)模塊:邏輯判斷模塊:判斷代表賽車(chē)的點(diǎn)所在的行與列是否在賽道范圉內(nèi),如不在則輸出 失敗信號(hào),如在賽道內(nèi)進(jìn)行下一步判斷。按鍵掃頻模塊:通過(guò)分頻器調(diào)整一個(gè)時(shí)鐘信號(hào),對(duì)賽車(chē)移動(dòng)的控制按鍵進(jìn)行判斷, 是否移動(dòng)賽車(chē)。(3) 輸岀部分:由譯碼電路,數(shù)碼管根據(jù)ag以及catl-cat6的輸出顯示數(shù)字圖形,點(diǎn)陣 根據(jù)rowo-7, cul(r)0-7,cul(g)0-7的輸出顯示賽道及賽車(chē),利用人眼的視覺(jué)延緩效應(yīng), 當(dāng)時(shí)鐘信號(hào)elk的頻率50hz,實(shí)驗(yàn)屮取100hz以上較佳,但同時(shí)不可過(guò)大,最大至lj l-2khz,就可看到

6、預(yù)期實(shí)驗(yàn)結(jié)果。仿真波形倒計(jì)時(shí)“5”m4 at 10 «fl at b3 iy «e 1% yft m ! a»10 «t?m «p m xru>l <u«i? tn «tuoj re«cl| q16仍卜437«taia心<«!4scai ra rnkdctexdon1i-l_l1 1i1i_rn1l nn_iiii ,t n倒計(jì)時(shí)“4”:豐=吳 i * ©卜卜卜卜卩卜卜|卜|圈|閭8卜卜卜卜器卜卜3卜可二卜習(xí)三;:;:&|卜卜|5卜”-a e eeo1 - i

7、 2 1 1 i 1 2. jt"t"2 ; : 9 :睪耳n?.?millc c c* *y 6cer3 e*l20 2【二 2e oh* 2* =* 232 8 s§卡“25耆s2 -jrphmtbmfnd*tl tfkfsawxai18:f豈-mmxjrukkxkkxxkxjkxxxmxwoo111h«vuu5rw寄呂黒bbbbb竊陽(yáng)涕竊竊雷禺bbb固定賽道:28sup9fw土 pcrtw203 0)mia茨父!>7 ztn<u(3)ca«) eu(s) mbs數(shù)碼管計(jì)時(shí):od tiaim4«t« tine

8、bw19325 mito 52 vi1c804uts*ooiemv<lu19 kelkb 4a anb ooo心b b zb z”i bfb -d zzo】bib iiii ib«ti(3b"b-i(il>wei(0bcrnb 000cr4b ooarwi ooa qhi6? 96 zits m “iso ts ute二 j168 os simervilmb職口血常叫:nyjiejjjnwecealfflk 叫泗萼akdhgee申 iwnrnkcie 叫 ik邊叫ildhl 山譏 ilin 幾 1ue貴1mhj忌luauni 認(rèn)hill 譏 limlfuih 眉

9、 hillrtlie 航 mu 貴1h 誠(chéng) uhmtguij 業(yè)ulmfdhilf面a左移,圈出來(lái)的表示賽車(chē)位置,可見(jiàn)向左移動(dòng)了一格:u 679 nt203tirtfarvw2o3t$u«0endopt2(*ejjjpor206imi,卅一juli-jl2l. 11.刖進(jìn):右移:211 wtarvit211 stm c0 rwtll-r-c>l -(<1" “e-eucolam zmatei z chkctsm成功,顯示紅色的v:master tme b19325皿jj porter3718m)7.163s<m31 s3 “» 21 *19 45

10、 0ru(t j ru(b -ru(s)r4 ru(2 -re4(! ru(0"-r«v(5)-r*v(3) rw(2 rw(leiilhiilimhrlodoiooinjg|t"i11j_lr-i_jlj1t"ljl1f1jliunnvvnnnjnnr譏tnwv7nrm7tonv“jnrt inm屮minnwnnnnnl 也10tllx|o|!>lll|?i1 ! : 1rl"lt"n_廠)n r»u s/ed m *.w teat fonut. you c<o cccresa it into cvw form

11、at in orer to reduce file “« for sore de tails please rtfer to the hartal uh*£ax 0 «rror>« c warnings失敗,顯示紅色的x:metier twb*19325mpw2%4<nirtervw256 62 mbswendm2 m uib 00i oo2s5 彈2«0 fs «s263 02. “ (00h000 浙°°喚801 丁阪宛血血廠期昇衣 為100碳r<4(3nnd <tnj|j> &l

12、t;iii*id "tn"”"d r«dl -r«4(0r«4r<4t) s) “d-r«4<)rwm rtw«) rw(3) "b cohnndu ireiiawf 10 «av«d la *w test forwat. you cba eo«pr««« it mt« cvmf fo»i ia oratr co reduce flit “ for bo:« x rocccufol. 0 «rr

13、orf9 0 warning* 11« plea refer to tb« artu xi lelp vhdl源程序library ieee;use ieee.std logic 1164.all; use ieee.std_logic_unsigned.all;entity carlsport)clk:instd_logic;-pinl8start,reset:in std_logic;-btnutb:in std_logic;-btncul0-cul7(g)ashow:out std_logic_vector(23 downto 0);-row7-row0 cul0-c

14、ul7(r) 點(diǎn)陣顯示nstate:out std_logic_vector(5 downto 0);-cat5-cat0 數(shù)碼管狀態(tài)nshow:out std_logic_vector(7 downto o);-abcde館p 數(shù)碼管顯示end car;architecture main of car issignal ent: integer range 0 to 25000;signal cntl: integer range 0 to 25000000;signal cnt2 : integer range 0 to 5000000;signal clk_tmp : stdjogic;

15、signal clk_tmpl: stdjogic;signal tclk: std_logic;signal clk_tmp2 : stdjogic;signal row: std_logic_vector(7 downto 0);signal cul: stdogic_vector(15 downto 0);signal aclk: std_logic;signal useclk: std_logic;shared variable tend : integer range 0 to 1;signal tostart: stdjogic;shared variable sai: integ

16、er range 1 to 3;shared variable lab : integer rangeto 1;shared variable rrr: integer range 0 to 3000; shared variable rr: integer range 0 to 3000;signal preset: stdjogic; -邏輯判斷模塊重置 signal areset: std_logic;-點(diǎn)陣模塊重置signal nreset: std_logic; 數(shù)碼管重置signal treset: std_logic; signal pwork : stdjogic; signa

17、l awork : stdjogic; signal nwork : stdjogic; signal twork : std_logic; signal worked : std_logic;-計(jì)時(shí)器重置邏輯判斷模塊工作點(diǎn)陣工作-數(shù)碼管工作-計(jì)時(shí)器工作signal vic : stdjogic; 成功signal fai: std_logic; -失敗type nst is array(0 to 9)of std_logic_vector(7 downto 0);signal nshowed:nst;shared variable ashan:integer range 0 to 9; sh

18、ared variable shan :integer range 0 to 4;shared variable aashan :integer range 0 to 7;shared variable aalshan :integer range 0 to 3;shared variable alshan :integer range 0 to 9;shared variable x :integer range -2 to 5;shared variable y :integer range 0 to 7;shared variable ttime4 :integer range 0 to

19、 9;shared variable ttime3 :integer range 0 to 9;shared variable ttime2 :integer range 0 to 9;shared variable ttimel:integer range 0 to 9; shared variable ttime :integer range 0 to 9;beginnshowed(l)<="01100000"nshowed(2)<=,11011010"nshowed(3)<="11110010"nshowed(4)<

20、;=,01100110"nshowedfs'lohoho"nshowed(6)<="10111110,;nshowed(7)vdl00000“;nshowedfsk'lllllllo"nshowedfg'lllloho"nshowed(0)<=n11111100"ran saidao:process(clk)beginif(clk'event and clk='l')then if(rrr=3ooo)then rrr:=o;elserrr:=rrr+l;end if;if(r

21、rr<=looo)thensai:=l;elsif(rrr>1000 and rrr<=2000)then sai:=2;elsesai:=3;end if;end if;end process;ran car:process(clk)beginif(clk'event and clk='l')then訐(rr=3000)the nrr:=o;elserr:=rr+l;end if;if(rr<=1000)thenlab:=-l;elsif(rr>1000 and rr<=2000)then lab:=0;elselab:=l;end

22、 if;end if;end process;tdiv:process(clk,clk_tmp) 計(jì)時(shí)器分頻 begin訐(clk'event and clk='l') thenif cnt=24999 thencn t<=0; clk_tmp<= not clk_tmp; elsecn t<=cnt+l;end if;end if; tclk<=clk_tmp;end process;adiv:process(clk,clk_tmpl) -點(diǎn)陣分頻 begin訐(clk'event and clk='l') then訐

23、cntl=24999999 then cntl<=0;clk_tmpl<= not clk_tmpl; elsecntl<=cntl+l;end if;end if;aclk<=clk_tmpl;end process;usediv:process(clk,clk_tmp2)"按鍵控制判斷分頻 begin訐(clk'event and clk='l') then訐 cnt2=4999999 thencnt2<=0;clk_tmp2<= not clk_tmp2;elsecnt2<=cnt2+l;end if;end i

24、f;useclkv二clk_tmp2;end process;con trol:process(clk,reset,start)控制器begin訐(clk'event and clk=,l,) thenif (start='l') thentostart<='l'end if;if (reset='l, or tend=l) thenpreset<=,l,;areset<=,l,; nresedltresetvlltostartvoaworkv 二 o;elsepreset<=,0,;areset<=,0,; nre

25、setv=o;tresetv=o;if (tostart='l*)the nawork<='r; -啟動(dòng)點(diǎn)陣模塊end if;end if;end if;end process;a:process(aclkzareset)-點(diǎn)陣工作模塊beginif (areset='l') thenaalsha n:=0;else訐(aclk'event and aclk='l') thenif(vic='l'orfal='l')thenif(aalshan<=2)the naalsha n:=aalsha

26、n+1;end if;end if;end if;end if;end process;process(tclk,areset)beginif (areset='l') thenalsha n:=0;elseif (tclk*event and tclk='l') thenif(alshan=9)thenalsha n:=0;elsealsha n:=alsha n+1;end if;end if;end if;end process;process(aclk,awork, worked,areset)beginif (areset='l') t

27、henaasha n:=0;elseif (aclk'event and aclk=,l, and awork=,l, and worked='0') thenif(aasha n=7)the naasha n:=0;elseaasha n:二aasha n+l;end if;end if;end if;end process;process(tclk,areset)beginif (areset='l') thenasha n:二0;else訐(tclk'event and tclk='l') thenif(asha n 二 9

28、)the nasha n:二0;elseasha n:=asha n+1;end if;end if;end if;end process;process(clk,areset,awork)begin訐(areset='l') thenashow<="000000000000000000000000" tend:=0;worked<=,0,;twork<=,0l;pwork<=,0,;else訐(clk'event and clk='l') then訐(awork='l')thenif (wor

29、ked='0')thencase aashan iswhen 0=>case ashan iswhen l=>ashowv二tllllllllllllllloooooooo”; when0=>ashow<=,101111111111011100000000,;when 2二ashowvillolllllloooololoooooooo”;when 3=>ashowv二”111011111000010100000000”;when 4=>ashow<=,111101111011010100000000" when 5二ashow

30、v二”111110111001010100000000”; whengrashowvi'illlllolllllolmoooooooo”;when 7=>ashow<="111111111111111100000000" when8=ashowv:l:l:l:l:ll:ll:l:l:l:l:l:l:l:l00000000“;when9=>ashow<=,111111111111111100000000n;end case;when 1=>case ashan iswhen 1 二ashowv 二 t1111111111111110000

31、0000”; when0=>ashow<=',101111111111011100000000n; when 2=>ashow<=,110111111000010100000000,;when 3=>ashow<=,111011111000010100000000h; when 4二ashowv二”111101111011010100000000”; when5=>ashowvil:mi0211001010:100000000“; when6=>ashow<=',111111011111011100000000n; when

32、 7二ashowv二”1:1:11:1:111:11口:111.100000000”; when 8二ashowv二“l(fā)llllllllllllllloooooooo”; whengashowvdillllllllllllloooooooo”; end case;when 2=>case ashan iswhen "xshowvjoilllllloolllloooooooooo”; wheng>ashowv=”101:l11110010000000000000“; when 2二ashowv二t10111110010000000000000”; when3=>ash

33、ow<=',111011110011110000000000n; when 4=>ashow<="111101110000010000000000,;when5=>ashowvj111110110000010000000000”; when 6二ashowv二”111111010000010000000000”; when 7二ashowv二t11111100011110000000000”;when8=>ashow<=',111111111111111100000000n; when9=>ashowv=”l:ul:l:lll

34、:ll:h:111.10000000(r; end case;when 3=>case ashan iswhen 2>ashowvi0:lll:u110010010000000000“; when。二ashowv 二“uhlllllooloolooooooooocr; when 2=>ashowv二“l(fā)lollllloolooloooooooooo”; when 3二ashowv二t11011110011110000000000”; when4=>ashowv=t11101110000010000000000”; when 5=>ashowv=th1101:100

35、000:10000000000“; when 6=>ashow<="111111010000010000000000,; when 7=>ashowv二”121111100000010000000000”; whensashowdllllllllllllllloooooooo”; when9=>ashowv=t11111111111111100000000”; end case;when 4=>case ashan iswhen 1 二ashowv 二”011111110011110000000000”; whenorashowutolllllloooo

36、oloooooooooo"when 2=>ashow<="110111110000010000000000,;when 3=>ashow<=,111011110011110000000000h;when4=>ashowdll:l01110000010000000000“;when 5二ashowv二t11110110000010000000000”; when6=>ashowmil:u010000010000000000“;when 7=>ashow<=,111111100011110000000000,;whensoasho

37、wvjillllllllllllllloooooooo”; when9=>ashow<="111111111111111100000000"end case;when 5=>case ashan iswhen "xshowvjoilllllloolllloooooooooo”; wheng>ashowv=”101:l11110000010000000000“;when 2=>ashowm021:u10000010000000000“;when bqashowutholllloolllloooooooooo"when 4=&g

38、t;ashow<="111101110010000000000000,;when 5=>ashowv二“l(fā)llllolloolooooooooooooo”;when 6=>ashowv二t11111010010000000000000”;when 7二ashowv二t11111100011110000000000”; when8=>ashow<=',111111111111111100000000n; whenbashowvdlllllllllllllloooooooo”;end case;when 6=>case ashan iswhen

39、 "xshowvjoilllllloooolooooooooooo”;when 0二ashowv二”101111110000100000000000”;when2=>ashowm021:u10000100000000000“;when3=>ashowvil:110:u110000100000000000“;when4=>ashowv=”l:u10:1110000:100000000000”;when 5=>ashowv二“l(fā)llllolloooolooooooooooo”;when 6=>ashowv二t11111010000100000000000”;

40、when 7二ashowv二t11111100000100000000000”;when 8二ashowuthllllllllllllloooooooo”; whenbashowvdlllllllllllllloooooooo”;end case;when 7=> worked<='l'pwork<='l,;nwork<=,l,;twork<=,l'if (reset!/) thenpwork<=,0'nwork<=,0'twork<='0,;end if;end case;elseif (

41、fal二t)the ntwork<='0,;pwork<='0,;訐(aalsha nv=2)thencase alshan iswhen l=>ashow<二“olhlllllooooooloooooooo”; whenooashowvjiolllllloloooolooooooooo”;when 2二ashowvillollllloolooloooooooooo”;when 3=>ashowv=”l:1101:u1000:u00000000000”; whenqashowdlllolllooollooooooooooo”;when 5=>

42、ashow<="111110110010010000000000,;when 6=>ashowv=”11111101010000:l000000000”;when 7二ashowv二t111111o1oooooo1oooooooo”;when8=>ashow<=”l:1121:u112111:u:100000000”; whenbashowvdllllllhlllllloooooooo”;end case;elseten d:=l;end if;elsif(vic='l,)thentwork<='0,;pwork<='0,;

43、訐(aalsha nv=2)thencase alshan iswhen l=>ashow<二“olhlllloooooooooooooooo”; wheno 二ashowdolllllllooooooloooooooo”;when 2=>ashow<="110111111000000100000000,; when3=>ashowv=”l:1101:u11000000:100000000”; whenqashowdlllollloloooolooooooooo”;when 5=>ashow<="111110110010010000

44、000000,;when 6=>ashowv=”11111101000:1100000000000”;when 7=>ashow<="111111111111111100000000,;when8=>ashow<="111111111111111100000000h; whenbashowvdllllllhlllllloooooooo”;end case;elseten d:=l;end if;elsecase alshan iswhen "xshowvjollllllloooloooloooooooo”;wheno=>asho

45、wv 二 t01111110001000100000000”; when 2=>ashowv=”1101111:1000:l000100000000“; when 3=>ashow<="111011110010001000000000,; when4=>ashowv=hll:l0:l:l10100010000000000“; when 5=>ashow<=,111110111000100000000000" when 6二ashowv二t11111011000100000000000”; when7=>ashowu”l:in:u:1

46、01000:100000000000”; when 8=>ashow<=,111111111111111100000000,; when 9=>case x iswhen 0=>cul<=,0000000000100000,' when l=>cul<="oooooooooooloooon; when 2=>cul<=,0000000000001000n; when 3=>cul<="0000000000000100n; when 4二culv=“0000000000000010”; when 5=&

47、gt;cul<=n0000000000000001" when-l=>cul<=,0000000001000000h; when-2=>cul<=,0000000010000000h; end case;case y iswhen 0二rowv二t1111110”; when "rowvillllllol”; when 2=><=,11111011,'when 3=><=,11110111,' when 4=>row<=,11101111"when 5二rowutlolllll”;w

48、hen 6二howvilollllll”; when 7=>row<=,01111111"end case;ashowv二row&cul;end case;end if;end if;end if;end 訐;end if;end process;p:process(clk,preset, pworkuseclk 丄 rtb)"邏輯判斷模塊variable derx :integer range -1 to 1;variable dery :integer range -1 to 1;beginif(preset='l')the nx:=

49、lab;y:=0;vic<=,0,;fal<='0,;else訐(pwork=,l,)the niffuseclkvent and useclk=,l,)thenderx:=0;dery:=0;if(ttime<=5)the nif(l='l')thenderx:=-l;elsif(r='l,)thenderx:=l;elsif(f='l')thendery:=l;elsif(b='l')thendery:=-l;elseend if;y:=y+dery;x:=x+derx;if(not(y>=0 and

50、y<=2 and x>=-l and x<=l) or (y=3 and x>=0 andx<=2) or (y=4 and x>=l and x<=3) or (y>=5 and y<=6 and x>=2 and x<=4)then訐(y=7 and x>=2 and x<=4)thenvic<='l'elsefalv=l;end if;end 訐 ;elseend if;end if;end if;end if;end process;t:process(clk,tclk,treset,t

51、work) 一計(jì)時(shí)器模塊beginif (treset='l')then ttimel:=0;ttime2:=0;ttime3:=0;ttime4:=0;ttime:=0;elseif(twork='l,)the nif (tclk'event and tclk='l') thenttime4:=ttime4+l;if(ttime4>=10)the n ttime4:=0;ttime3:=ttime3+l;end if;if (ttime3>=10)the nttime3:=0; ttime2:=ttime2+l;end if;if

52、(ttime2>=10)then ttime2:=0; ttimel:=ttimel+l;end if;if (ttimel>=10)thenttimel:=0; ttime:=ttime+l;end if;end if;end if; end if;end process;n:process(tclk)-數(shù)碼管顯示模塊beginif (tclk'event and tclk='l') thenif(sha n二 4)the n sha n:=0;elsesha n:=sha n+1;end if;end if;end process;process(clk

53、,n reset, nwork)beginif (nreset='l') thenn state<=l,llllll,;nshow<=h00000000,1;else訐(clk'event and clk='l') then if(nwork='l')thencase shan iswhen 0二nstate<=,111011n;n show v二 n showed(ttimel);when 1=>n state<=,111110"n show v=n showed(ttime3);when 2=>n state<=,111101n;n show<=n showed(ttime2); when 3=> nstate<=,110111"n show v二 n showed(ttime); when 4=> nstate<=,111011" nshow<=,00000001u;end case;elsecase shan iswhen 0=>n state<=,

溫馨提示

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

評(píng)論

0/150

提交評(píng)論