【正文】
由于本人學(xué)識有限,加之時(shí)間倉促,文中不免有錯(cuò)誤和待改進(jìn)之處,真誠歡迎各位師長、同學(xué)提出寶貴意見。而這些進(jìn)步都離不開老師和同學(xué)的幫助。對于我以后的工作和學(xué)習(xí)都是一種巨大的幫助,感謝他耐心的輔導(dǎo)。無論在理論上還是在實(shí)踐中,都給與我很大的幫助。 致謝在論文完成之際,我首先要向指導(dǎo)老師吳小所老師表示最真摯的謝意。本設(shè)計(jì)是采用硬件描述語言和FPGA芯片相結(jié)合進(jìn)行的數(shù)字鐘的研究,從中可以看出EDA技術(shù)的發(fā)展在一定程度上實(shí)現(xiàn)了硬件設(shè)計(jì)的軟件化。故提出改進(jìn)方案為用一個(gè)按鍵控制數(shù)碼管的片選,再用兩個(gè)按鍵控制計(jì)數(shù)的加減??偟膩碚f,通過這次的設(shè)計(jì)實(shí)驗(yàn)更進(jìn)一步地增強(qiáng)了實(shí)驗(yàn)的動手能力,對數(shù)字鐘的工作原理也有了更加透徹的理解。再加上器件對信號的延時(shí)等問題,實(shí)際下載硬件電路上后會出現(xiàn)一系列的問題,因此仿真圖和電路連接圖還是有一定區(qū)別的。并能根據(jù)仿真結(jié)果分析設(shè)計(jì)的存在的問題和缺陷,從而進(jìn)行程序的調(diào)試和完善。在此次的數(shù)字鐘設(shè)計(jì)過程中,更進(jìn)一步地熟悉有關(guān)數(shù)字電路的知識和具體應(yīng)用。end behave。b=clk05s and not(c)。 end process。039。 end if。 else tone_count=tone_count+1。 if(tone2047) then s=not s。139。 process(clkm) control the frequence of the speaker begin if hh=0001 and hl=0010 and mh=0011 and ml=0000 then if(clkm39。end if。139。039。end if。 else c=39。if mh=0101 and ml=1001 and(t=117 or t=115 or t=113 or t=111) then c=39。 else t:=t+1。sig500=c。process(clk05s)variable t:integer range 0 to 120:=0。 others:no output end case。 1668 when 15=tone=11011000000。 1542 when 12=tone=11001010110。 1410 when 9=tone=10111001000。 1290 when 7=tone=10101011100。 1036 when 5=tone=10010101101。 773 when 2=tone=01110010000。 process(tone_index) begin case tone_index is when 0=tone=11111111111。 end if。 when others=tone_index=0。 when 138=tone_index=0。 when 136=tone_index=5。 when 134=tone_index=5。 when 132=tone_index=5。 when 130=tone_index=8。 when 128=tone_index=5。 when 126=tone_index=5。 when 124=tone_index=8。 when 122=tone_index=8。 when 120=tone_index=8。 when 118=tone_index=3。 when 116=tone_index=3。 when 114=tone_index=5。 when 112=tone_index=8。 when 110=tone_index=9。 when 108=tone_index=9。 when 106=tone_index=10。 when 104=tone_index=12。 when 102=tone_index=9。 when 100=tone_index=8。 when 98=tone_index=6。 when 96=tone_index=6。 when 94=tone_index=6。 when 92=tone_index=6。 when 90=tone_index=9。 when 88=tone_index=6。 when 86=tone_index=5。 when 84=tone_index=5。 when 82=tone_index=0。 when 80=tone_index=5。 when 78=tone_index=5。 when 76=tone_index=5。 when 74=tone_index=5。 when 72=tone_index=6。 when 70=tone_index=9。 when 68=tone_index=7。 when 66=tone_index=10。 when 64=tone_index=10。 when 62=tone_index=0。 when 60=tone_index=5。 when 58=tone_index=5。 when 56=tone_index=5。 when 54=tone_index=6。 when 52=tone_index=6。 when 50=tone_index=8。 when 48=tone_index=3。 when 46=tone_index=9。 when 44=tone_index=8。 when 42=tone_index=5。 when 40=tone_index=5。 when 38=tone_index=6。 when 36=tone_index=7。 when 34=tone_index=9。 when 32=tone_index=9。 when 30=tone_index=0。 when 28=tone_index=9。 when 26=tone_index=9。 when 24=tone_index=9。 when 22=tone_index=10。 when 20=tone_index=13。 when 18=tone_index=12。 when 16=tone_index=12。 when 14=tone_index=5。 when 12=tone_index=6。 when 10=tone_index=8。 when 8=tone_index=8。 when 6=tone_index=5。 when 4=tone_index=5。 when 2=tone_index=3。) then case time is when 0=tone_index=3。event and clk10=39。 end process。 end if。) then if(time=150) then time=0。event and clk10=39。 end process。 end if。) then clk10_count=clk10_count+1。event and clkm=39。 END PROCESS。 END IF。 END IF。 ELSE clkm=39。 ELSE IF t17 THEN clkm=39。 AND iclk39。 BEGIN IF iclk=39。end process。end if。039。139。beginif rising_edge(clk) thencount:=count+1。end process。end if。039。139。beginif rising_edge(iclk)thencount1:=count1+1。 signal clk10 : std_logic。 signal time : integer range 0 to 150。 signal tone_index : integer range 0 to 15。 signal tone : std_logic_vector(10 downto 0)。signal c,d,clk1k:std_logic。end baoshi。sig500,sig1k:out std_logic。entity baoshi isport(mh,ml,hh,hl:in std_logic_vector(3 downto 0)。use 。模塊元件如圖414:圖414整點(diǎn)報(bào)時(shí)模塊元件程序如下:library ieee。即將至整點(diǎn)時(shí),前四秒低音,最后一秒高音。END conv_architecture。 END conv。ENTITY conv IS PORT (