




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
六十秒倒計時一、分化設計要求二、設計計劃路線三、軟件設計四、調試五、實現一、分化設計要求1、實現數碼管連續顯示數字2、實現在數碼管上顯示組合003、在數碼管上逆序顯示00至59這60種組合4、實現60種組合每秒鐘按相應數字顯示5、由于硬件要求是數碼管所有相同段并聯,所以要求利用計數分時掃描的方法二、設計計劃路線1、采用層次性設計中自頂向下混合設計。釋義:所謂自頂向下的設計方法,是指設計電子系統先從系統最抽象的層次出發,作高層次仿真,經過仿真驗證后再經整體規劃(FloorPlanning)將系統行為操作分為多個子系統。由剛才的設計要求可知我們需要譯碼輸出模塊,以顯示數不斷變化的數字,并需要計數器產生60種相對于譯碼器的輸入信號,我們這里采用減計數器模塊,計數器需要1Hz脈沖,所以要有3MHz轉1Hz的分頻器計數分時掃描模塊由于以下硬件電路的接法,所以采用計數分時,即用計數器的不同計數區段來區分每一顯示位的顯示,要求每位顯示時間小于24分之1秒,這樣在視覺上可以達到組數碼管同時顯示不同的數;(利用視覺暫留)3、軟件設計LIBRARYieee;USEieee.std_logic_1164.all;useieee.std_logic_unsigned.all;--EntityDeclarationENTITYcounter60IS --{{ALTERA_IO_BEGIN}}DONOTREMOVETHISLINE! PORT ( reset:INSTD_LOGIC; en:INSTD_LOGIC; clk1h:INSTD_LOGIC; q:OUTSTD_LOGIC_VECTOR(5downto0) ); --{{ALTERA_IO_END}}DONOTREMOVETHISLINE!
ENDcounter60;減計數器模塊ARCHITECTUREcounter60_architectureOFcounter60ISsignalq1:STD_LOGIC_VECTOR(5downto0);
BEGINprocess(clk1h,en,reset)beginifen='1'thenif(clk1h'eventandclk1h='1')then
ifq1>0thenq1<=q1-1;elseq1<="111011";endif;endif;
endif;endprocess;q<=q1;ENDcounter60_architecture;LIBRARYieee;USEieee.std_logic_1164.all;useieee.std_logic_unsigned.all;useieee.std_logic_arith.all;--EntityDeclarationENTITYfpqIS PORT ( clk3m:INSTD_LOGIC; clk1:OUTSTD_LOGIC );
ENDfpq;ARCHITECTUREfpq_architectureOFfpqIS signalfp1:std_logic; signaltout:integerrange0to30000;signaltout1:integerrange0to100;signaltout2:std_logic;
BEGINprocess(clk3m)beginif(clk3m'eventandclk3m='1')theniftout>=29999thentout<=0;elsetout<=tout+1;endif;iftout<=14999thentout2<='1';elsetout2<='0';endif;endif;endprocess;process(tout2)beginif(tout2'eventandtout2='1')theniftout1>=99thentout1<=0;elsetout1<=tout1+1;endif;iftout1<=49thenfp1<='1';elsefp1<='0';
endif;endif;endprocess;clk1<=fp1;ENDfpq_architecture;分頻器模塊LIBRARYieee;USEieee.std_logic_1164.all;useieee.std_logic_unsigned.all;--EntityDeclarationENTITYjishu1000IS --{{ALTERA_IO_BEGIN}}DONOTREMOVETHISLINE! PORT ( rst:INSTD_LOGIC; clk100m:INSTD_LOGIC; kai:INSTD_LOGIC; s:OUTSTD_LOGIC_VECTOR(9downto0) ); --{{ALTERA_IO_END}}DONOTREMOVETHISLINE!
ENDjishu1000;--ArchitectureBodyARCHITECTUREjishu1000_architectureOFjishu1000IS
signals1:std_logic_vector(9downto0);
BEGINprocess(clk100m,rst,kai)beginifkai='1'then
ifclk100m'eventandclk100m='1'thenifs1<"0100000000"thens1<=s1+1;elses1<="0000000000";endif;endif;endif;endprocess;s<=s1;ENDjishu1000_architecture;加計數器LIBRARYieee;USEieee.std_logic_1164.all;useieee.std_logic_unsigned.all;ENTITYyimaIS PORT ( i:INSTD_LOGIC_VECTOR(5downto0); de:OUTSTD_LOGIC_VECTOR(6downto0); rj:outSTD_LOGIC; rj60:outstd_logic; jishu100:inSTD_LOGIC_VECTOR(9downto0);
dig:OUTSTD_LOGIC_VECTOR(1downto0) );
ENDyima;ARCHITECTUREyima_architectureOFyimaISsignalrj1:STD_LOGIC;signalr:std_logic;beginprocess(i,jishu100)begincaseiiswhen"111011"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")then
de<="0010000";dig<="10";--9endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;when"111010"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="0000000";dig<="10";--8endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;when"111001"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="1111000";dig<="10";--7endif;
when"110111"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="0010010";dig<="10";--5endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;
when"110110"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="0011001";dig<="10";--4endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5
endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;when"111000"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="0000010";dig<="10";--6endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;
when"110101"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")thende<="0110000";dig<="10";--3endif;endif;if(jishu100<="0010000000")thende<="0010010";dig<="01";--5endif;when"110100"=>if(jishu100>="0010000000")thenif(jishu100<="0100000000")then
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 【正版授權】 IEC TS 62271-313:2025 EXV EN High-voltage switchgear and controlgear - Part 313: Direct current circuit-breakers
- 【正版授權】 IEC 63505:2025 EN Guidelines for measuring the threshold voltage (VT) of SiC MOSFETs
- 【正版授權】 IEC TS 62565-5-3:2025 EN Nanomanufacturing – Product specification – Part 5-3: Nanoenabled energy storage – Blank detail specification: silicon nanosized materials for the n
- 2025年英語專業八級考試試卷及答案
- 2025年藝術設計專業期末考試試卷及答案
- 2025年新媒體藝術專業考試題及答案
- 2025年市場分析與預測能力測試卷及答案
- 2025年成人高考學歷考試試題及答案
- 2025年公共衛生應急管理課程考試試題及答案
- 2025年區域經濟發展研究專業考試試卷及答案
- 跨境電商合伙投資協議書
- 2024年網格員考試題庫及答案1套
- 國開(遼寧)2024年《中國傳統文化概觀》形考1-4答案
- 狀元展廳方案策劃
- 土壤農化分析實驗智慧樹知到期末考試答案章節答案2024年甘肅農業大學
- 鳶飛魚躍:〈四書〉經典導讀智慧樹知到期末考試答案章節答案2024年四川大學
- 空壓機日常維護保養點檢記錄表
- MOOC 統計學-南京審計大學 中國大學慕課答案
- 福建省廈門市集美區2023屆小升初語文試卷(含解析)
- 毛澤東詩詞鑒賞
- 電機與拖動(高職)全套教學課件
評論
0/150
提交評論