【正文】
吳小所老師認(rèn)真負(fù)責(zé)的工作態(tài)度,嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神和深厚的理論水平都使我受益匪淺。speaker=a or b or s。end process。beginsig1k=d。 no output when 1=tone=01100000101。 when 129=tone_index=6。 when 113=tone_index=6。 when 97=tone_index=5。 when 81=tone_index=0。 when 65=tone_index=10。 when 49=tone_index=3。 when 33=tone_index=9。 when 17=tone_index=12。 when 1=tone_index=3。 if(clk10_count=163fff) then clk10=not clk10。139。count1:=1。architecture behave of baoshi issignal clk05s:std_logic。 odata : OUT STD_LOGIC_VECTOR(6 downto 0) )。 when 0010=led=10100100。 addr_1s=CONV_STD_LOGIC_VECTOR(count,4)。 if count=2 then flag=39。主要完成小時(shí)高位1和2之間的變換,同時(shí)當(dāng)小時(shí)高位為2是,將是flag為高電平,當(dāng)為1是,flag為低電平。 addr_1s=CONV_STD_LOGIC_VECTOR(count,4)。 os : OUT STD_LOGIC )。 end if。 addr_1s : OUT STD_LOGIC_vector(3 downto 0)。 count:=0。 end if。(2) 小時(shí)低位按鍵控制程序如下:LIBRARY ieee。(1)分低位按鍵控制程序如下:LIBRARY ieee。 count:=30。該模塊有一個(gè)時(shí)鐘輸入端口,輸入時(shí)鐘信號(hào)是分頻出來(lái)的500HZ的時(shí)鐘;有一個(gè)輸入端口與行線相連,用于輸入行線狀態(tài);一個(gè)輸出端口,用于輸出有按鍵按下的信號(hào)。計(jì)滿后各計(jì)數(shù)器清零,重新計(jì)數(shù)。用這種方式描述的項(xiàng)目最后所能達(dá)到的性能與設(shè)計(jì)人員的水平、經(jīng)驗(yàn)以及綜合軟件有很大的關(guān)系。這一步驟適用于大型設(shè)計(jì),因?yàn)閷?duì)于大型設(shè)計(jì)來(lái)說(shuō),在綜合前對(duì)源代碼仿真,就可以大大減少設(shè)計(jì)重復(fù)的次數(shù)和時(shí)間。緩沖器的輸出分成兩路:一路可以直接送到MUX,另一路經(jīng)延CLBCLBCLBCLBCLBBCLBCLBCLBCLBCLBCLBCLBCLBBCLBCLBCLB可編程開(kāi)關(guān)矩輸入輸出模塊互連資源圖21 CLB基本結(jié)構(gòu)時(shí)幾納秒(或者不延時(shí))送到輸入通路D觸發(fā)器,再送到數(shù)據(jù)選擇器。CLB中3個(gè)邏輯函數(shù)發(fā)生器分別是G、F和H,相應(yīng)的輸出是G’ 、F’和H’。多功能數(shù)字鐘不管在性能還是在樣式上都發(fā)生了質(zhì)的變化,有電子鬧鐘、數(shù)字鬧鐘等等。 課題相關(guān)技術(shù)的發(fā)展當(dāng)今電子產(chǎn)品正向功能多元化,體積最小化,功耗最低化的方向發(fā)展。 have proof functions and the whole point timekeeping function. The use of EDA design technology, hardwaredescription language VHDL description logic means for the system design documents, in QuartusII tools environment, a topdown design, by the various modules together build a FPGAbased digital clock.The main system chips used EP1C3T144C8N, make up of the clock module, control module, time module, data decoding module, display and broadcast module. After piling the design and simulation procedures, the programmable logic device to download verification, the system can plete the hours and minutes respectively, using keys to modify digital clock. Keywords : digital clock。本設(shè)計(jì)采用的VHDL是一種全方位的硬件描述語(yǔ)言,具有極強(qiáng)的描述能力,能支持系統(tǒng)行為級(jí)、寄存器傳輸級(jí)和邏輯門(mén)級(jí)三個(gè)不同層次的設(shè)計(jì);支持結(jié)構(gòu)、數(shù)據(jù)流、行為三種描述形式的混合描述、覆蓋面廣、抽象能力強(qiáng),因此在實(shí)際應(yīng)用中越來(lái)越廣泛。最終形成集成電子系統(tǒng)或?qū)S眉尚酒囊婚T(mén)新技術(shù)。CPLD/PGFA幾乎能完成任何數(shù)字器件的功能,上至高性能CPU,下至簡(jiǎn)單的74電路。這3個(gè)函數(shù)發(fā)生器結(jié)合起來(lái),可實(shí)現(xiàn)多達(dá)9變量的邏輯函數(shù)??删幊袒ミB資源IR可以將FPGA內(nèi)部的CLB和CLB之間、CLB和IOB之間連接起來(lái),構(gòu)成各種具有復(fù)雜功能的系統(tǒng)。一般的設(shè)計(jì),也可略去這一步驟。電路原理圖方式描述比較直觀和高效,對(duì)綜合軟件的要求不高。譯碼顯示電路由七段譯碼器完成,顯示由數(shù)碼管構(gòu)成。 inkey : IN STD_LOGIC。end if。END addram。 oaddr : OUT STD_LOGIC_VECTOR(3 downto 0) )。說(shuō)明:當(dāng)flag為高電平時(shí),即小時(shí)高位為2,小時(shí)低位只能在0到3之間變動(dòng);當(dāng)flag為低電平時(shí),即小時(shí)高位為1,小時(shí)低位可以在0到9之間變動(dòng)。end if。039。(3)小時(shí)低位計(jì)數(shù)模塊該模塊框圖如圖410所示。 then count:=CONV_INTEGER(iset_addr)。 addr_1s=CONV_STD_LOGIC_VECTOR(count,4)。ENTITY hh IS PORT ( clk_1s : IN STD_LOGIC。elsif rising_edge(clk_1s) then if count=2 then flag=39。4譯碼顯示模塊該模塊完成對(duì)計(jì)數(shù)器編碼信息的譯碼工作,驅(qū)動(dòng)數(shù)碼管顯示相應(yīng)的數(shù)字。 when 0111=led=11111000。即將至整點(diǎn)時(shí),前四秒低音,最后一秒高音。 signal tone_index : integer range 0 to 15。beginif rising_edge(clk) thencount:=count+1。 ELSE clkm=39。event and clk10=39。 when 6=tone_index=5。 when 22=tone_index=10。 when 38=tone_index=6。 when 54=tone_index=6。 when 70=tone_index=9。 when 86=tone_index=5。 when 102=tone_index=9。 when 118=tone_index=3。 when 134=tone_index=5。 1290 when 7=tone=10101011100。if mh=0101 and ml=1001 and(t=117 or t=115 or t=113 or t=111) then c=39。 if(tone2047) then s=not s。并能根據(jù)仿真結(jié)果分析設(shè)計(jì)的存在的問(wèn)題和缺陷,從而進(jìn)行程序的調(diào)試和完善。而這些進(jìn)步都離不開(kāi)老師和同學(xué)的幫助。故提出改進(jìn)方案為用一個(gè)按鍵控制數(shù)碼管的片選,再用兩個(gè)按鍵控制計(jì)數(shù)的加減。039。039。 1668 when 15=tone=11011000000。 when others=tone_index=0。 when 124=tone_index=8。 when 108=tone_index=9。 when 92=tone_index=6。 when 76=tone_index=5。 when 60=tone_index=5。 when 44=tone_index=8。 when 28=tone_index=9。 when 12=tone_index=6。 end process。 END PROCESS。end if。beginif rising_edge(iclk)thencount1:=count1+1。entity baoshi isport(mh,ml,hh,hl:in std_logic_vector(3 downto 0)。 end behave。 END drive。 count:=count+1。ARCHITECTURE hh_architecture OF hh ISBEGINk1:process(clk_1s,iset)variable count:integer range 0 to 2:=0。 end if。 count:=0。ENTITY hl IS PORT ( clk_1s : IN STD_LOGIC。 addr_1s=CONV_STD_LOGIC_VECTOR(count,4)。USE 。 os : OUT STD_LOGIC )。 then if count=3 then count=0000。 end if。按鍵控制模塊的框圖如圖47所示。 then count:=0。分頻電路的邏輯框圖如圖42所示。由于計(jì)數(shù)的起始時(shí)間不可能與標(biāo)準(zhǔn)時(shí)間(如北京時(shí)間)一致,故需要在電路上加一個(gè)校時(shí)電路,同時(shí)標(biāo)準(zhǔn)的1HZ時(shí)間信號(hào)必須做到準(zhǔn)確穩(wěn)定。 FPGA開(kāi)發(fā)編程原理硬件設(shè)計(jì)需要根據(jù)各種性能指標(biāo)、成本、開(kāi)發(fā)周期等因素,確定最佳的實(shí)現(xiàn)方案,畫(huà)出系統(tǒng)框圖,選擇芯片,設(shè)計(jì)PCB并最終形成樣機(jī)。系統(tǒng)劃分①編譯器③