2023年全國(guó)碩士研究生考試考研英語(yǔ)一試題真題(含答案詳解+作文范文)_第1頁(yè)
已閱讀1頁(yè),還剩20頁(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、<p><b>  課程設(shè)計(jì)說(shuō)明書(shū)</b></p><p>  題目 8個(gè)LED循環(huán)顯示、計(jì)數(shù)器的設(shè)計(jì) </p><p>  起止日期 2009.12.18-2010.1.4 </p><p>  電子設(shè)計(jì)自動(dòng)化設(shè)計(jì)任務(wù)書(shū)</p><p>  系(部):電子與通信工程系 專(zhuān)業(yè):電氣工程及其自動(dòng)化

2、 指導(dǎo)教師:</p><p><b>  目錄</b></p><p>  課程設(shè)計(jì)目的 ……………………………………………………………… 5</p><p>  課程設(shè)計(jì)題目……………………………………………………………… 5</p><p>  設(shè)計(jì)內(nèi)容…………………………………………………………

3、………… 5</p><p>  3.1 設(shè)計(jì)思路 ……………………………………………………………… 5</p><p>  3.2 設(shè)計(jì)步驟 ……………………………………………………………… 5</p><p>  4、程序中各引腳的分配 ……………………………………………………… 12</p><p>  5、程序結(jié)

4、構(gòu)框圖………………………………………………………………… 13</p><p>  6、完整程序 …………………………………………………………………… 14</p><p>  7、課程設(shè)計(jì)總結(jié)……………………………………………………………… 21</p><p>  參考文獻(xiàn)……………………………………………………………………… 22<

5、/p><p><b>  課程設(shè)計(jì)目的</b></p><p>  系統(tǒng)提供一個(gè)50MHZ的時(shí)鐘,要求用VHDL語(yǔ)言設(shè)計(jì)一個(gè)8位計(jì)數(shù)器,同時(shí)有一個(gè)8位led循環(huán)顯示燈,當(dāng)燈亮一次,數(shù)碼管上就記一次數(shù)。通過(guò)做此計(jì)數(shù)器,知道分頻的概念,并且知道如何分頻,同時(shí)知道什么是數(shù)碼管的動(dòng)態(tài)顯示,怎么做出數(shù)碼管的動(dòng)態(tài)顯示。</p><p><b>  課

6、程設(shè)計(jì)題目</b></p><p>  8個(gè)LED循環(huán)顯示、計(jì)數(shù)器的設(shè)計(jì)。</p><p><b>  設(shè)計(jì)內(nèi)容</b></p><p><b>  設(shè)計(jì)思路:</b></p><p>  由于要設(shè)計(jì)一個(gè)8個(gè)led燈循環(huán)顯示的計(jì)數(shù)器。則重要的設(shè)計(jì)部分在于讓led燈循環(huán)顯示,同時(shí)在顯示的同

7、時(shí)數(shù)碼管的數(shù)加1;要讓led燈亮的同時(shí),數(shù)碼管上面的數(shù)字加1,則需要在同一個(gè)脈沖下完成計(jì)數(shù)器加一,led等循環(huán)亮一位。</p><p>  由于系統(tǒng)給定的時(shí)鐘是50Mhz,顯然數(shù)碼管和led燈不能正常工作,這就涉及到要將50mhz頻率分頻,將頻率變小,使計(jì)數(shù)器和led燈能正常工作;</p><p>  Led燈設(shè)計(jì)思路:led燈要實(shí)現(xiàn)循環(huán)顯示,即第一個(gè)燈亮之后,在出現(xiàn)一個(gè)上升沿脈沖后,第二

8、個(gè)燈亮,第一個(gè)燈滅,來(lái)一個(gè)脈沖移動(dòng)一個(gè),并實(shí)現(xiàn)循環(huán),為了實(shí)現(xiàn)循環(huán),設(shè)計(jì)思路是講來(lái)一次脈沖將最高位補(bǔ)到最低位,次最高位變成最高位。</p><p>  數(shù)碼管的設(shè)計(jì)思路:由于數(shù)碼管要求是動(dòng)態(tài)顯示,顯然還要分出一個(gè)置位工作掃描頻率,由于人的視覺(jué)暫留,頻率應(yīng)該大于24hz,為了數(shù)碼管顯示效果,我分出了1000hz的頻率來(lái)掃描8位數(shù)碼管的工作。</p><p>  分頻的設(shè)計(jì)思路:分頻是為了將50

9、mhz的頻率減小,即在50mhz(clk)出現(xiàn)n個(gè)上升沿之前另一個(gè)clk1不翻轉(zhuǎn),而在n個(gè)上升沿時(shí)翻轉(zhuǎn),在2n之前一直保持翻轉(zhuǎn)后的狀態(tài),到2n時(shí),計(jì)數(shù)器清零,同時(shí)再實(shí)現(xiàn)翻轉(zhuǎn),這樣就能做出任意較小的頻率實(shí)現(xiàn)設(shè)計(jì)。</p><p><b>  2、設(shè)計(jì)步驟:</b></p><p>  首先設(shè)計(jì)分頻計(jì)數(shù)器,由于要有一個(gè)數(shù)碼管置位工作掃描頻率,還要有一個(gè)實(shí)現(xiàn)計(jì)數(shù)個(gè)和led燈

10、循環(huán)顯示的頻率,即分頻要分出兩個(gè)不同的頻率:</p><p><b>  分頻程序入下:</b></p><p>  process(clk)</p><p>  variable cout:integer:=0;</p><p><b>  begin </b></p><p&

11、gt;  IF clk'event and clk='1' then</p><p>  cout:=cout+1;</p><p>  if cout<=25000 then clk1<='0';</p><p>  elsif cout<50000 then clk1<='1';&l

12、t;/p><p>  else cout:=0;</p><p><b>  end if; </b></p><p><b>  end if; </b></p><p>  end process; </p><p>  process(clk)</p>&l

13、t;p>  variable cout:integer:=0;</p><p><b>  BEGIN</b></p><p>  IF clk'event and clk='1' then</p><p>  cout:=cout+1;</p><p>  IF cout<=1250

14、000 then clk2<='0';</p><p>  elsif cout<25000000 then clk2<='1';</p><p>  else cout:=0;</p><p><b>  end if; </b></p><p>  在進(jìn)程中,clk

15、為原始頻率50mhz,以上兩個(gè)進(jìn)程是為了分出2hz頻率和1000hz頻率,其中count是進(jìn)程中的一個(gè)變量,用來(lái)出現(xiàn)上升沿脈沖計(jì)數(shù)。其中clk1是分出來(lái)的1000hz;頻率,clk2是分出來(lái)的2hz的led燈移動(dòng)和數(shù)碼管計(jì)數(shù)的頻率;</p><p>  在頻率分出來(lái)后,就可以設(shè)計(jì)led燈的循環(huán)顯示了,led燈循環(huán)顯示的程序如下:</p><p>  process(rst,start,cl

16、k2)</p><p>  variable reg8:std_logic_vector(7 downto 0);</p><p>  variable fg:integer:=1;</p><p><b>  begin</b></p><p>  if rst='1' then</p>

17、<p>  reg8:=(others=>'1');</p><p><b>  fg:=1;</b></p><p>  elsif clk2'event and clk2='1' then</p><p>  if start='1' then</p>

18、<p>  if fg=1 then reg8:="11111110";</p><p><b>  fg:=0;</b></p><p>  else reg8:=reg8(6 downto 0)&reg8(7);</p><p><b>  end if;</b></p>

19、;<p><b>  end if;</b></p><p><b>  end if;</b></p><p>  din8<=reg8;</p><p>  end process;</p><p>  程序中,rst是復(fù)位信號(hào),功能是在在出現(xiàn)rst=1是,將led回到最初始

20、狀態(tài),從程序中看是燈全滅掉,當(dāng)rst=0是,回復(fù)循環(huán)顯示;start是一個(gè)開(kāi)始信號(hào),只有start=1是,計(jì)數(shù)才開(kāi)始工作;din8是一個(gè)八位的二進(jìn)制數(shù),在硬件上直接和8個(gè)led燈連接;fg是設(shè)計(jì)的一個(gè)標(biāo)志位,目的是為了在開(kāi)始來(lái)第一個(gè)脈沖時(shí),使第一個(gè)led燈變亮,并將fg賦值為零,來(lái)第二個(gè)脈沖時(shí),就開(kāi)始循環(huán);</p><p>  當(dāng)rst=0并且start=1時(shí),Led的波形圖如下:</p><

21、p>  從圖中看出,在rst為0,start為1時(shí),則led燈的顯示就會(huì)出現(xiàn)出現(xiàn)循環(huán)顯示,din由11111110到01111111,之后又回到11111110開(kāi)始循環(huán);</p><p>  在rst=1是,將會(huì)復(fù)位,即din=“11111111”,波形如下:</p><p>  從圖中明顯能看出,在rst為1時(shí),本該進(jìn)行循環(huán)的程序在rst=1時(shí),將使din全部置一了,即實(shí)現(xiàn)你rst

22、的功能。</p><p>  在做start的功能時(shí),start的功能是,在rst=0,start=1時(shí),將會(huì)做led燈的循環(huán),在rst=0,start=1時(shí),將使其暫停循環(huán)功能,并保持當(dāng)前狀態(tài)不變,波形圖如下:</p><p>  如圖所示,在start=0時(shí),din就停留在11110111,此二進(jìn)制數(shù)正好十進(jìn)制是239,一直保持此狀態(tài),在start=1是,則開(kāi)始循環(huán)的工作。</p

23、><p>  做完以上程序的設(shè)計(jì),即要實(shí)現(xiàn)數(shù)碼管的動(dòng)態(tài)顯示,首先要做的就是數(shù)碼管的動(dòng)態(tài)顯示,即要不間斷的掃面8個(gè)數(shù)碼管的工作位,掃描置位程序如下:</p><p>  process(clk1)</p><p><b>  begin</b></p><p>  if clk1'event and clk1='

24、;1' then</p><p>  if wei=7 then wei<="000";</p><p>  else wei<=wei+1;</p><p><b>  end if;</b></p><p><b>  end if;</b></p&

25、gt;<p>  end process;</p><p>  process(wei)</p><p><b>  begin</b></p><p>  case wei is</p><p>  when "000" => selout<="00000001&

26、quot;;</p><p>  when "001" => selout<="00000010";</p><p>  when "010" => selout<="00000100";</p><p>  when "011" =>

27、selout<="00001000";</p><p>  when "100" => selout<="00010000";</p><p>  when "101" => selout<="00100000";</p><p>  w

28、hen "110" => selout<="01000000";</p><p>  when "111" => selout<="10000000";</p><p>  when others=>null;</p><p><b>  end

29、case;</b></p><p>  end process;</p><p>  clk1是分出來(lái)的1khz頻率,wei是設(shè)置的一個(gè)三位二進(jìn)制數(shù),從000-111,每一個(gè)狀態(tài)都是置一個(gè)數(shù)碼管工作,selout是一個(gè)7位二進(jìn)制數(shù),是個(gè)硬件上數(shù)碼管的工作位一一對(duì)應(yīng)。</p><p>  在做好置位后,余下的就是數(shù)碼管顯示計(jì)數(shù)的問(wèn)題了,數(shù)碼管顯示的是一個(gè)8

30、位十進(jìn)制的數(shù),功能能實(shí)現(xiàn)進(jìn)位,數(shù)碼管計(jì)數(shù)的程序如下:</p><p>  process(rst,start,clk2)</p><p>  variable ao0:std_logic_vector(3 downto 0);</p><p>  variable ao1:std_logic_vector(3 downto 0);</p><p&

31、gt;  variable ao2:std_logic_vector(3 downto 0);</p><p>  variable ao3:std_logic_vector(3 downto 0);</p><p>  variable ao4:std_logic_vector(3 downto 0);</p><p>  variable ao5:std_log

32、ic_vector(3 downto 0);</p><p>  variable ao6:std_logic_vector(3 downto 0);</p><p>  variable ao7:std_logic_vector(3 downto 0);</p><p><b>  begin</b></p><p>

33、  if rst='1' then </p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others

34、=>'0');</p><p>  ao4:=(others=>'0');</p><p>  ao5:=(others=>'0');</p><p>  ao6:=(others=>'0'); </p><p>  ao7:=(others=>&#

35、39;0');</p><p>  elsif clk2'event and clk2='1' then</p><p>  if start='1' then</p><p>  if ao0<=9 then</p><p>  ao0:=ao0+1;</p><p&

36、gt;<b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 and ao6=9 and ao7=9 then</p><p>  ao0:=(others=>'0');

37、</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0');</p&g

38、t;<p>  ao5:=(others=>'0');</p><p>  ao6:=(others=>'0');</p><p>  ao7:=(others=>'0'); </p><p>  else null;</p><p><b>  end

39、 if; </b></p><p>  if ao0>9 then </p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 and ao6=9 then</p><p>  ao7:=ao7+1;</p><p>  ao0:=(others=>

40、'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0&#

41、39;);</p><p>  ao5:=(others=>'0');</p><p>  ao6:=(others=>'0');</p><p>  else null;</p><p><b>  end if;</b></p><p><b&

42、gt;  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 then </p><p>  ao6:=ao6+1;</p><p>  ao0:=(others=>'0&

43、#39;);</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0');&l

44、t;/p><p>  ao5:=(others=>'0');</p><p>  else null;</p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 the

45、n</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 then</p><p>  ao5:=ao5+1;</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p>

46、<p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0');</p><p>  else null;</p><p><b>  end if;&

47、lt;/b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 then</p><p>  ao4:=ao4+1; </p><p>  ao0:=(

48、others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  else null;<

49、/p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 then</p><p>  ao3:=ao3+1;</p

50、><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  else null;</p><p><b>  en

51、d if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 then</p><p>  ao2:=ao2+1;</p><p>  ao0:=(others=>'0&

52、#39;);</p><p>  ao1:=(others=>'0');</p><p>  else ao1:=ao1+1;</p><p>  ao0:=(others=>'0');</p><p>  end if; </p><p>  end if; &

53、lt;/p><p><b>  end if;</b></p><p><b>  end if;</b></p><p><b>  end if;</b></p><p><b>  co0<=ao0;</b></p><p>

54、;<b>  co1<=ao1;</b></p><p><b>  co2<=ao2;</b></p><p><b>  co3<=ao3;</b></p><p><b>  co4<=ao4;</b></p><p><

55、;b>  co5<=ao5;</b></p><p><b>  co6<=ao6;</b></p><p><b>  co7<=ao7;</b></p><p>  end process;</p><p>  程序中co0-co7是對(duì)應(yīng)數(shù)碼管上從低位到高位的

56、十進(jìn)制數(shù),ao0-ao7是程序中定義的中間變量;程序中的rst是復(fù)位信號(hào),start是開(kāi)始信號(hào),在此的rst和start和led循環(huán)顯示中的rst和start是同一信號(hào),這樣才能讓led燈和數(shù)碼管同步工作;</p><p>  計(jì)數(shù)器的波形顯示如下:</p><p>  由上圖看出,在start=1 并且rst=0時(shí),在出現(xiàn)上升沿時(shí),co0加1,當(dāng)co0到9時(shí),在下一個(gè)上升沿將產(chǎn)生進(jìn)位,使

57、co1變成1,co0變成0。</p><p>  在rst=1時(shí),將產(chǎn)生復(fù)位,致使co0-co7全部置0,由波形可得:</p><p>  顯然,當(dāng)產(chǎn)生復(fù)位信號(hào)時(shí),全部置零了,說(shuō)明程序的設(shè)計(jì)能達(dá)到預(yù)先設(shè)計(jì)的效果。</p><p>  在rst=0,start=0時(shí),根據(jù)設(shè)計(jì),應(yīng)該是數(shù)碼管的數(shù)應(yīng)該保持現(xiàn)有的狀態(tài)不變,并且在start=1后,應(yīng)該能繼續(xù)計(jì)數(shù),實(shí)際波形如下

58、:</p><p>  由圖可以得出,在rst=0 并且start=0是,co1=5,co0=3,之后,在start=1時(shí),繼續(xù)開(kāi)始了計(jì)數(shù),說(shuō)明實(shí)現(xiàn)設(shè)計(jì)的能滿足設(shè)計(jì)要求。</p><p>  最后一部分就是做出數(shù)碼管顯示十進(jìn)制數(shù),由于每個(gè)數(shù)碼管的顯示都基本一樣,就只有選擇數(shù)碼管的條件不同,在此只寫(xiě)出一個(gè)數(shù)碼管的顯示程序:</p><p>  process(wei,

59、co0,co1,co2,co3,co4,co5,co6,co7)</p><p><b>  begin</b></p><p>  if wei="000" then</p><p>  case co0 is</p><p>  when "0000" => led7s1

60、<="1000000";</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>  when &qu

61、ot;0011" => led7s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010";</

62、p><p>  when "0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" => led7s1<

63、="0000000";</p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;</b></p><p>

64、<b>  end if;</b></p><p>  end process;</p><p>  在wei=“000”時(shí),將執(zhí)行由co0的狀態(tài)來(lái)顯示個(gè)位上的數(shù),co0-co9對(duì)應(yīng)顯示十進(jìn)制數(shù)上的0-9;led7s1是一個(gè)七位二進(jìn)制數(shù),從低位到高位分別對(duì)應(yīng)數(shù)碼管的a,b,c,d,e,f,g管腳;十位,千位,萬(wàn)位等等的顯示皆如此。</p><p&g

65、t;  四、程序中各引腳的分配如下:</p><p><b>  五、程序結(jié)構(gòu)框圖:</b></p><p>  完整的程序如下:library ieee; </p><p>  use ieee.std_logic_1164.all; </p><p>  use ieee.std_logic_unsigned.all

66、;</p><p>  entity jishu is</p><p>  port(clk,rst,start:in std_logic;</p><p>  din8:out std_logic_vector(7 downto 0);</p><p>  selout:out std_logic_vector(7 downto 0);&l

67、t;/p><p>  led7s1:out std_logic_vector(6 downto 0));</p><p><b>  end;</b></p><p>  architecture one of jishu is</p><p>  signal clk1,clk2:std_logic;</p>

68、<p>  signal wei:std_logic_vector(2 downto 0);</p><p>  signal co0:std_logic_vector(3 downto 0);</p><p>  signal co1:std_logic_vector(3 downto 0);</p><p>  signal co2:std_logi

69、c_vector(3 downto 0);</p><p>  signal co3:std_logic_vector(3 downto 0);</p><p>  signal co4:std_logic_vector(3 downto 0);</p><p>  signal co5:std_logic_vector(3 downto 0);</p>

70、<p>  signal co6:std_logic_vector(3 downto 0);</p><p>  signal co7:std_logic_vector(3 downto 0);</p><p><b>  begin</b></p><p>  process(clk)</p><p> 

71、 variable cout:integer:=0;</p><p><b>  begin </b></p><p>  IF clk'event and clk='1' then</p><p>  cout:=cout+1;</p><p>  if cout<=25000 then

72、clk1<='0';</p><p>  elsif cout<50000 then clk1<='1';</p><p>  else cout:=0;</p><p><b>  end if; </b></p><p><b>  end if; <

73、;/b></p><p>  end process; </p><p>  process(clk)</p><p>  variable cout:integer:=0;</p><p><b>  BEGIN</b></p><p>  IF clk'event and clk

74、='1' then</p><p>  cout:=cout+1;</p><p>  IF cout<=1250000 then clk2<='0';</p><p>  elsif cout<25000000 then clk2<='1';</p><p>  els

75、e cout:=0;</p><p><b>  end if; </b></p><p><b>  end if; </b></p><p>  end process;</p><p>  process(rst,start,clk2)</p><p>  varia

76、ble reg8:std_logic_vector(7 downto 0);</p><p>  variable fg:integer:=1;</p><p><b>  begin</b></p><p>  if rst='1' then</p><p>  reg8:=(others=>&#

77、39;1');</p><p><b>  fg:=1;</b></p><p>  elsif clk2'event and clk2='1' then</p><p>  if start='1' then</p><p>  if fg=1 then reg8:=&

78、quot;11111110";</p><p><b>  fg:=fg-1;</b></p><p>  else reg8:=reg8(6 downto 0)&reg8(7);</p><p><b>  end if;</b></p><p><b>  end i

79、f;</b></p><p><b>  end if;</b></p><p>  din8<=reg8;</p><p>  end process;</p><p>  process(clk1)</p><p><b>  begin</b><

80、/p><p>  if clk1'event and clk1='1' then</p><p>  if wei=7 then wei<="000";</p><p>  else wei<=wei+1;</p><p><b>  end if;</b></p

81、><p><b>  end if;</b></p><p>  end process;</p><p>  process(wei)</p><p><b>  begin</b></p><p>  case wei is</p><p>  whe

82、n "000" => selout<="00000001";</p><p>  when "001" => selout<="00000010";</p><p>  when "010" => selout<="00000100";

83、</p><p>  when "011" => selout<="00001000";</p><p>  when "100" => selout<="00010000";</p><p>  when "101" => selout

84、<="00100000";</p><p>  when "110" => selout<="01000000";</p><p>  when "111" => selout<="10000000";</p><p>  when ot

85、hers=>null;</p><p><b>  end case;</b></p><p>  end process;</p><p>  process(rst,start,clk2)</p><p>  variable ao0:std_logic_vector(3 downto 0);</p>

86、;<p>  variable ao1:std_logic_vector(3 downto 0);</p><p>  variable ao2:std_logic_vector(3 downto 0);</p><p>  variable ao3:std_logic_vector(3 downto 0);</p><p>  variable ao

87、4:std_logic_vector(3 downto 0);</p><p>  variable ao5:std_logic_vector(3 downto 0);</p><p>  variable ao6:std_logic_vector(3 downto 0);</p><p>  variable ao7:std_logic_vector(3 down

88、to 0);</p><p><b>  begin</b></p><p>  if rst='1' then </p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p>&l

89、t;p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0');</p><p>  ao5:=(others=>'0');</p><p> 

90、 ao6:=(others=>'0'); </p><p>  ao7:=(others=>'0');</p><p>  elsif clk2'event and clk2='1' then</p><p>  if start='1' then</p><p&

91、gt;  if ao0<=9 then</p><p>  ao0:=ao0+1;</p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 and

92、 ao6=9 and ao7=9 then</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>

93、'0');</p><p>  ao4:=(others=>'0');</p><p>  ao5:=(others=>'0');</p><p>  ao6:=(others=>'0');</p><p>  ao7:=(others=>'0&#

94、39;); </p><p>  else null;</p><p><b>  end if; </b></p><p>  if ao0>9 then </p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 and ao6=9 then

95、</p><p>  ao7:=ao7+1;</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:

96、=(others=>'0');</p><p>  ao4:=(others=>'0');</p><p>  ao5:=(others=>'0');</p><p>  ao6:=(others=>'0');</p><p>  else null;&l

97、t;/p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 and ao5=9 then </p&

98、gt;<p>  ao6:=ao6+1;</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(other

99、s=>'0');</p><p>  ao4:=(others=>'0');</p><p>  ao5:=(others=>'0');</p><p>  else null;</p><p><b>  end if;</b></p>&

100、lt;p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao3=9 and ao4=9 then</p><p>  ao5:=ao5+1;</p><p>  ao0:=(others=>'

101、;0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><p>  ao3:=(others=>'0');</p><p>  ao4:=(others=>'0')

102、;</p><p>  else null;</p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 and ao2=9 and ao

103、3=9 then</p><p>  ao4:=ao4+1; </p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0');</p><

104、p>  ao3:=(others=>'0');</p><p>  else null;</p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p>&

105、lt;p>  if ao1=9 and ao2=9 then</p><p>  ao3:=ao3+1;</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  ao2:=(others=>'0

106、');</p><p>  else null;</p><p><b>  end if;</b></p><p><b>  end if;</b></p><p>  if ao0>9 then</p><p>  if ao1=9 then</p&

107、gt;<p>  ao2:=ao2+1;</p><p>  ao0:=(others=>'0');</p><p>  ao1:=(others=>'0');</p><p>  else ao1:=ao1+1;</p><p>  ao0:=(others=>'0&#

108、39;);</p><p>  end if; </p><p>  end if; </p><p><b>  end if;</b></p><p><b>  end if;</b></p><p><b>  end if;</b>

109、</p><p><b>  co0<=ao0;</b></p><p><b>  co1<=ao1;</b></p><p><b>  co2<=ao2;</b></p><p><b>  co3<=ao3;</b><

110、/p><p><b>  co4<=ao4;</b></p><p><b>  co5<=ao5;</b></p><p><b>  co6<=ao6;</b></p><p><b>  co7<=ao7;</b></p&g

111、t;<p>  end process;</p><p>  process(wei,co0,co1,co2,co3,co4,co5,co6,co7)</p><p><b>  begin</b></p><p>  if wei="000" then</p><p>  case c

112、o0 is</p><p>  when "0000" => led7s1<="1000000";</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" =>

113、led7s1<="0100100";</p><p>  when "0011" => led7s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  wh

114、en "0101" => led7s1<="0010010";</p><p>  when "0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000"

115、;</p><p>  when "1000" => led7s1<="0000000";</p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p>

116、<p><b>  end case;</b></p><p><b>  end if;</b></p><p>  if wei="001" then</p><p>  case co1 is</p><p>  when "0000" =

117、> led7s1<="1000000";</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>

118、;  when "0011" => led7s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010&

119、quot;;</p><p>  when "0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" =>

120、 led7s1<="0000000";</p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;</b></p>

121、<p><b>  end if;</b></p><p>  if wei="010" then</p><p>  case co2 is</p><p>  when "0000" => led7s1<="1000000";</p><

122、;p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>  when "0011" => led7s1<="011

123、0000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010";</p><p>  when "0110"

124、=> led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" => led7s1<="0000000";</p><p&g

125、t;  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;</b></p><p><b>  end if;</b></p>

126、<p>  if wei="011" then</p><p>  case co3 is</p><p>  when "0000" => led7s1<="1000000";</p><p>  when "0001" => led7s1<=&quo

127、t;1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>  when "0011" => led7s1<="0110000";</p><p>  when "0100&q

128、uot; => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010";</p><p>  when "0110" => led7s1<="0000010";</p>&l

129、t;p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" => led7s1<="0000000";</p><p>  when "1001" => led7s1<="00

130、10000";</p><p>  when others=> null;</p><p><b>  end case;</b></p><p><b>  end if;</b></p><p>  if wei="100" then</p>&

131、lt;p>  case co4 is</p><p>  when "0000" => led7s1<="1000000";</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0

132、010" => led7s1<="0100100";</p><p>  when "0011" => led7s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p>

133、;<p>  when "0101" => led7s1<="0010010";</p><p>  when "0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<=&qu

134、ot;1111000";</p><p>  when "1000" => led7s1<="0000000";</p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=>

135、 null;</p><p><b>  end case;</b></p><p><b>  end if;</b></p><p>  if wei="101" then</p><p>  case co5 is</p><p>  when &q

136、uot;0000" => led7s1<="1000000";</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";<

137、/p><p>  when "0011" => led7s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<

138、;="0010010";</p><p>  when "0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "

139、1000" => led7s1<="0000000";</p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;<

140、/b></p><p><b>  end if;</b></p><p>  if wei="110" then</p><p>  case co6 is</p><p>  when "0000" => led7s1<="1000000"

141、;</p><p>  when "0001" => led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>  when "0011" => led7

142、s1<="0110000";</p><p>  when "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010";</p><p>  when &

143、quot;0110" => led7s1<="0000010";</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" => led7s1<="0000000";<

144、;/p><p>  when "1001" => led7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;</b></p><p><b>  end if;</b

145、></p><p>  if wei="111" then</p><p>  case co7 is</p><p>  when "0000" => led7s1<="1000000";</p><p>  when "0001" =>

146、 led7s1<="1111001";</p><p>  when "0010" => led7s1<="0100100";</p><p>  when "0011" => led7s1<="0110000";</p><p>  w

147、hen "0100" => led7s1<="0011001";</p><p>  when "0101" => led7s1<="0010010";</p><p>  when "0110" => led7s1<="0000010"

148、;;</p><p>  when "0111" => led7s1<="1111000";</p><p>  when "1000" => led7s1<="0000000";</p><p>  when "1001" => led

149、7s1<="0010000";</p><p>  when others=> null;</p><p><b>  end case;</b></p><p><b>  end if; </b></p><p>  end process;</p>

150、<p><b>  end;</b></p><p><b>  六、課程設(shè)計(jì)總結(jié)</b></p><p>  通過(guò)本次EDA課程設(shè)計(jì),讓我更進(jìn)一步的熟悉了VHDL語(yǔ)言,了解了其中的語(yǔ)法,同時(shí),在做8個(gè)led燈循環(huán)顯示和數(shù)碼管的計(jì)數(shù)顯示的過(guò)程中,遇到了很多的困難,但從這些困哪中,我也受益匪淺,有困難才會(huì)提高,這樣自己才能學(xué)到更多的東西

溫馨提示

  • 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ù)僅提供信息存儲(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)論