版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
EDA試驗(yàn)——數(shù)字時(shí)鐘實(shí)驗(yàn)?zāi)康氖煜ぴ贓DA平臺(tái)上進(jìn)行數(shù)字電路集成設(shè)計(jì)的整個(gè)流程。掌握MaxPlus軟件下的簡(jiǎn)單的圖形、VHDL文本等輸入的設(shè)計(jì)方法。學(xué)習(xí)使用JTAG借口下載邏輯電路到可編程芯片,并能調(diào)試到芯片正常工作。實(shí)驗(yàn)原理本實(shí)驗(yàn)是實(shí)現(xiàn)數(shù)字電子鐘,直接用數(shù)字顯示時(shí)間的計(jì)時(shí)裝置。分別設(shè)計(jì)出時(shí)間設(shè)置電路,走時(shí)電路,打鈴控制電路,顯示電路。三.實(shí)驗(yàn)設(shè)計(jì)(1)在這個(gè)設(shè)計(jì)中我使用VHDL設(shè)計(jì)時(shí)間設(shè)置電路:LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;USEIEEE.STD_LOGIC_ARITH.ALL;ENTITYcontrolISPORT(reset:INSTD_LOGIC;begend:INSTD_LOGIC;keyup:INSTD_LOGIC;enter:INSTD_LOGIC;settime:OUTSTD_LOGIC;hourhset:OUThourlset:OUTminhset:OUTminlset:OUTsechset:OUTseclset:OUTENDcontrol;ARCHITECTUREarchiOFcontrolISTYPESTATEIS(sethh,sethl,setmh,setml,setsh,setsl,ini);SIGNALadjsta:STATE;SIGNALsetmark:STD_LOGIC;SIGNALseclow,minlow,hourlow:INTEGERSIGNALsechigh,minhigh:INTEGERSIGNALhourhigh:INTEGERBEGINseclset<=seclow;sechset<=sechigh;minlset<=minlow;minhset<=minhigh;hourlset<=hourlow;hourhset<=hourhigh;settime<=setmark;mark:PROCESS(begend)beginifreset='1'thensetmark<='0';elsifbegend'eventandbegend='1'thenifsetmark='1'then setmark<='0'; else setmark<='1'; endif;endif;ENDPROCESS;normal_run:PROCESS(enter,reset)BEGINIFreset='1'THENadjsta<=ini;ELSIFenter='1'ANDenter'eventTHENcaseadjstaISWHENini=>adjsta<=sethh;WHENsethh=>adjsta<=sethl;WHENsethl=>adjsta<=setmh;WHENsetmh=>adjsta<=setml;WHENsetml=>adjsta<=setsh;WHENsetsh=>adjsta<=setsl;WHENsetsl=>adjsta<=sethh;endcase;ENDIF;ENDPROCESS;time_adjust:PROCESS(keyup)BEGINifreset='1'then hourhigh<=0; hourlow<=0; minhigh<=0; minlow<=0; sechigh<=0; seclow<=0; elsifkeyup='1'ANDkeyup'eventTHEN caseadjstaIS WHENsethh=> hourhigh<=hourhigh+1; WHENsethl=> hourlow<=hourlow+1; WHENsetmh=> minhigh<=minhigh+1; WHENsetml=> minlow<=minlow+1; WHENsetsh=> sechigh<=sechigh+1; WHENsetsl=> seclow<=seclow+1; WHENini=>NULL; endcase; endif;ENDPROCESS;ENDarchi;走時(shí)電路:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;useieee.std_logic_arith.all;entityclockisport(clk:instd_logic; settime:instd_logic; hourhset:inintegerrange0to2; hourlset:inintegerrange0to9; minhset:inintegerrange0to5; minlset:inintegerrange0to9; sechset:inintegerrange0to5; seclset:inintegerrange0to9; hourhdis:outintegerrange0to2; hourldis:outintegerrange0to9; minhdis:outintegerrange0to5; minldis:outintegerrange0to9; sechdis:outintegerrange0to5; secldis:outintegerrange0to9);endclock;architecturearchiofclockis signalseclow,minlow,hourlow:integerrange0to9; signalsechigh,minhigh:integerrange0to5; signalhourhigh:integerrange0to2;begin secldis<=seclow; sechdis<=sechigh; minldis<=minlow; minhdis<=minhigh; hourldis<=hourlow; hourhdis<=hourhigh;normal_run: process(clk,settime) begin ifsettime='1'then seclow<=seclset; sechigh<=sechset; minlow<=minlset; minhigh<=minhset; hourlow<=hourlset; hourhigh<=hourhset; else ifclk='1'andclk'eventthen ifseclow=9thenseclow<=0; ifsechigh=5thensechigh<=0; ifminlow=9thenminlow<=0; ifminhigh=5thenminhigh<=0; ifhourlow=9then hourlow<=0; hourhigh<=hourhigh+1; elsifhourlow=3andhourhigh=2then hourhigh<=0; hourlow<=0; elsehourlow<=hourlow+1; endif; elseminhigh<=minhigh+1; endif; elseminlow<=minlow+1; endif; elsesechigh<=sechigh+1; endif; elseseclow<=seclow+1; endif; endif; endif; endprocess;endarchi;打鈴控制電路:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;useieee.std_logic_arith.all;entityringisport(reset:instd_logic; alarm:outstd_logic; hourhdis:inintegerrange0to2; hourldis:inintegerrange0to9; minhdis:inintegerrange0to5; minldis:inintegerrange0to9; sechdis:inintegerrange0to5; secldis:inintegerrange0to9);endring;architecturearchiofringis constantre:integer:=2; constantstop:integer:=50;signalcnt:integerrange0to60;begin process(secldis) begin cnt<=sechdis*10+secldis; ifreset='1'thenalarm<='0'; elsif(minhdis=5andminldis=9)then ifcnt>stopandcnt<re+stopthenalarm<='0'; elsifcnt>re+stopandcnt<re*2+stopthenalarm<='1'; elsifcnt>2*re+stopandcnt<4*re+stopthenalarm<='0'; elsealarm<='1'; endif; elsealarm<='0'; endif; endprocess;endarchi;顯示電路:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;useieee.std_logic_arith.all;entityringisport(reset:instd_logic; alarm:outstd_logic; hourhdis:inintegerrange0to2; hourldis:inintegerrange0to9; minhdis:inintegerrange0to5; minldis:inintegerrange0to9; sechdis:inintegerrange0to5; secldis:inintegerrange0to9);endring;architecturearchiofringis constantre:integer:=2; constantstop:integer:=50;signalcnt:integerrange0to60;begin process(secldis) begin cnt<=sechdis*10+secldis; ifreset='1'thenalarm<='0'; elsif(minhdis=5andminldis=9)then ifcnt>stopandcnt<re+stopthenalarm<='0'; elsifcnt>re+stopandcnt<re*2+stopthenalarm<='1'; elsifcnt>2*re+stopandcnt<4*re+stopthenalarm<='0'; elsealarm<='1'; endif; elsealarm<='0'; endif; endprocess;endarchi;
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 滬科版八年級(jí)物理全一冊(cè)《2.1聲音的產(chǎn)生與傳播》同步測(cè)試題含答案
- 高一化學(xué)第四單元非金屬及其化合物第四講氨硝酸硫酸練習(xí)題
- 2024屆河南省淇縣某中學(xué)高考模擬試卷(化學(xué)試題文)試卷含解析
- 2024高中地理第4章區(qū)域經(jīng)濟(jì)發(fā)展第2節(jié)第2課時(shí)問(wèn)題和對(duì)策學(xué)案新人教版必修3
- 2024高中語(yǔ)文第四單元?jiǎng)?chuàng)造形象詩(shī)文有別賞析示例過(guò)小孤山大孤山學(xué)案新人教版選修中國(guó)古代詩(shī)歌散文欣賞
- DB37-T 5307-2024 住宅小區(qū)供水設(shè)施建設(shè)標(biāo)準(zhǔn)
- 肩周炎中醫(yī)診療指南
- 深圳城市的發(fā)展歷程
- 2025版:勞動(dòng)合同法企業(yè)合規(guī)培訓(xùn)及風(fēng)險(xiǎn)評(píng)估合同3篇
- 三講課件知識(shí)課件
- 2025年工程合作協(xié)議書(shū)
- 2025年山東省東營(yíng)市東營(yíng)區(qū)融媒體中心招聘全媒體采編播專(zhuān)業(yè)技術(shù)人員10人歷年高頻重點(diǎn)提升(共500題)附帶答案詳解
- 2025年宜賓人才限公司招聘高頻重點(diǎn)提升(共500題)附帶答案詳解
- KAT1-2023井下探放水技術(shù)規(guī)范
- 駕駛證學(xué)法減分(學(xué)法免分)題庫(kù)及答案200題完整版
- 2024年四川省瀘州市中考英語(yǔ)試題含解析
- 2025屆河南省九師聯(lián)盟商開(kāi)大聯(lián)考高一數(shù)學(xué)第一學(xué)期期末學(xué)業(yè)質(zhì)量監(jiān)測(cè)模擬試題含解析
- 撫養(yǎng)權(quán)起訴狀(31篇)
- 2024年“一崗雙責(zé)”制度(五篇)
- 美容美發(fā)店突發(fā)停電應(yīng)急預(yù)案
- 彈性力學(xué)材料模型:分層材料的熱彈性行為教程
評(píng)論
0/150
提交評(píng)論