


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、EDA課程設(shè)計設(shè)計題目:基于 VHDL的8路彩燈控制器設(shè)計一、課程設(shè)計的目的1 .熟悉Quartus U軟件的使用方法,使用VHDL文本輸入設(shè)計法進(jìn)行任務(wù)設(shè)計。2增強自己實際動手能力,獨立解決問題的能力。3 .通過課程設(shè)計對所學(xué)的知識進(jìn)行更新及鞏固.二、課程設(shè)計的基本要求本次課程設(shè)計是設(shè)計一個8路彩燈控制器,能夠控制8路彩燈按照兩種節(jié)拍, 三種花型循環(huán)變化。設(shè)計完成后,通過仿真驗證與設(shè)計要求進(jìn)行對比, 檢驗設(shè)計 是否正確。三、課程設(shè)計的容編寫硬件描述語言VHDL程序,設(shè)計一個兩種節(jié)拍、三種花型循環(huán)變化的8路彩燈控制器,兩種節(jié)拍分別為 0.25s和0.5s。三種花型分別是:(1) 8路彩燈分成兩
2、半,從左至右順次漸漸點亮,全亮后則全滅。(2) 從中間到兩邊對稱地漸漸點亮,全亮后仍由中間向兩邊逐次熄滅。(3) 8路彩燈從左至右按次序依次點亮,全亮后逆次序依次熄滅。四、實驗環(huán)境PC 機(jī)一臺;軟件 Quartus n 6.0五、課程設(shè)計具體步驟及仿真結(jié)果1、系統(tǒng)總體設(shè)計框架結(jié)構(gòu)fenpiri2:u1分頻模塊:把時鐘脈沖二分頻,得到另一個時鐘脈沖,讓這兩種時鐘脈沖來 交替控制花型的速度。二選一模塊:選擇兩種頻率中的一個控制彩燈的花型。8 路彩燈的三種花型控制模塊:整個系統(tǒng)的樞紐,顯示彩燈亮的情況2、系統(tǒng)硬件單元電路設(shè)計1.分頻模塊設(shè)計 實驗程序: library ieee;use ieee.s
3、td_logic_1164.all;entity fenpin2 isport( clk:in std_logic; clkk:out std_logic);end fenpin2;architecture behav of fenpin2 is beginprocess(clk)variable clkk1:std_logic:='0 beginclkk1:= not clkk1;if clk'event and clk='1' then end if;clkk<=clkk1;end process;end behav;RTL電路圖:波形圖:2.二選一模
4、塊設(shè)計 實驗程序: library ieee; use ieee.std_logic_1164.all; entity mux21 is port(a,b,s:in std_logic;y:out std_logic);end mux21;architecture behave of mux21 is beginprocess(a,b,s)beginif s='0' then y<=a;else y<=b;end if;end process;end behave;RTL電路圖:波形圖:3.8 路彩燈的三種花型控制模塊設(shè)計 程序: library ieee;use
5、ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all; entity color8 is port(clk,rst :in std_logic;q:out std_logic_vector(7 downto 0); end;architecture a of color8 issignal s:std_logic_vector(4 downto 0); beginprocess(s,clk) beginif rst='1' then s<="00000"elsif clk'event a
6、nd clk= '1' thenif s="11111" then s<="00000"else s<=s+1; end if;case s iswhen "00000"=>q<="00000000"when "00001"=>q<="10001000"when "00010"=>q<="11001100"when "00011"=>q<=&
7、quot;11101110"when "00100"=>q<="11111111"when "00101"=>q<="00000000"when "00110"=>q<="00011000"when "00111"=>q<="00111100"when "01000"=>q<="01111110"when "01001
8、"=>q<="11111111"when "01010"=>q<="11100111"when "01011"=>q<="11000011"when "01100"=>q<="10000001"when "01101"=>q<="00000000"when "01110"=>q<="10000000&quo
9、t;when "01111"=>q<="11000000"when "10000"=>q<="11100000"when "10001"=>q<="11110000"when "10010"=>q<="11111000"when "10011"=>q<="11111100"when "10100"=>q<=
10、"11111110"when "10101"=>q<="11111111"when "10110"=>q<="11111110"when "10111"=>q<="11111100"when "11000"=>q<="11111000"when "11001"=>q<="11110000"when "1101
11、0"=>q<="11100000"when "11011"=>q<="11000000"when "11100"=>q<="10000000"when "11101"=>q<="00000000" when others=>null; end case;end if;end process; end;RTL電路圖:波形圖:4. 綜合程序 library ieee;use ieee.std_lo
12、gic_1164.all;entity fenpin2 isport( clk:in std_logic;clkk:out std_logic);end fenpin2;architecture behav of fenpin2 is beginprocess(clk)variable clkk1:std_logic:='0 beginclkk1:= not clkk1;if clk'event and clk='1' then end if;clkk<=clkk1;end process;end behav;library ieee;use ieee.s
13、td_logic_1164.all;entity mux21 isport(a,b,s:in std_logic;y:out std_logic);end mux21;architecture behave of mux21 is beginprocess(a,b,s)beginif s='0' then y<=a;else y<=b;end if;end process;end behave;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity color8
14、isport(clk,rst :in std_logic;q:out std_logic_vector(7 downto 0); end;architecture a of color8 is signal s:std_logic_vector(4 downto 0); begin process(s,clk) begin if rst='1' then s<="00000" elsif clk'event and clk= '1' then if s="11111" thens<="0000
15、0"else s<=s+1; end if; case s is when "00000"=>q<="00000000" when "00001"=>q<="10001000" when "00010"=>q<="11001100" when "00011"=>q<="11101110" when "00100"=>q<="1111
16、1111" when "00101"=>q<="00000000" when "00110"=>q<="00011000" when "00111"=>q<="00111100" when "01000"=>q<="01111110" when "01001"=>q<="11111111" when "01010&qu
17、ot;=>q<="11100111" when "01011"=>q<="11000011" when "01100"=>q<="10000001" when "01101"=>q<="00000000"when "01110"=>q<="10000000"when "01111"=>q<="11000000&quo
18、t;when "10000"=>q<="11100000"when "10001"=>q<="11110000"when "10010"=>q<="11111000"when "10011"=>q<="11111100"when "10100"=>q<="11111110"when "10101"=>q<=
19、"11111111"when "10110"=>q<="11111110"when "10111"=>q<="11111100"when "11000"=>q<="11111000"when "11001"=>q<="11110000"when "11010"=>q<="11100000"when "1101
20、1"=>q<="11000000"when "11100"=>q<="10000000"when "11101"=>q<="00000000"when others=>null;end case;end if;end process; end;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity balucaideng isport (clk,s,rst:in std_logic;q:out std_logic_vector(7
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 衛(wèi)生基礎(chǔ)知識試題及答案
- 外科各章試題及答案
- 通知公文試題及答案范文
- 土壤酸堿性試題及答案
- 2025年煤礦安全監(jiān)控系統(tǒng)改進(jìn)與策劃合作協(xié)議
- 2025年周轉(zhuǎn)住房租賃策劃與管理協(xié)議
- 2025年員工離職協(xié)議書策劃標(biāo)準(zhǔn)樣本
- 2025年策劃崗位人員調(diào)動協(xié)議
- 2025年土地出讓安全生產(chǎn)監(jiān)管協(xié)議范本
- 2025年專利權(quán)保密義務(wù)協(xié)議
- 2025年全國高考作文題+參考答案
- 2024年江蘇省常熟市事業(yè)單位公開招聘教師崗考試題帶答案分析
- 2025年新高考全國Ⅰ卷英語模擬試卷(含答案)
- 【MOOC】模擬電子電路實驗-東南大學(xué) 中國大學(xué)慕課MOOC答案
- 超星爾雅學(xué)習(xí)通《當(dāng)代大學(xué)生國家安全教育》章節(jié)測試答案
- ISO28000:2022供應(yīng)鏈安全管理體系
- 麗聲英語百科分級讀物第四級Animal Tricks課件
- 煤礦開采學(xué)基本概念
- 個人公證委托書
- 第五章溶膠凝膠法
- 最全復(fù)利系數(shù)表(共41頁)
評論
0/150
提交評論