VHDL點陣顯示_第1頁
VHDL點陣顯示_第2頁
VHDL點陣顯示_第3頁
VHDL點陣顯示_第4頁
VHDL點陣顯示_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、數(shù)字電路課程設(shè)計報告課程:基于FPGA的點陣顯示控制器的設(shè)計學院:電氣信息工程學院專業(yè):測控技術(shù)與儀器班級:姓名:學號:合作者姓名:日期:一、引言隨著我國經(jīng)濟的高速發(fā)展,對公共場合發(fā)布信息的需求日益增長,利用LED點陣滾動顯示漢字的出現(xiàn)正好適應(yīng)了這一市場需求,已經(jīng)成為信息傳播的一種重要手段。采川傳統(tǒng)方法設(shè)計的漢字滾動顯示器,通常需要使用單片機、存儲器和制約邏輯電路來進行PCB板級的系統(tǒng)集成。盡管這種方案有單片機軟件的支持較為靈活,但是由于受硬件資源的限制,未來對設(shè)計的變更和升級,總是難以避免要付出較多研發(fā)經(jīng)費和較長投放市場周期的代價。隨著電子設(shè)計自動化(EDA)技術(shù)的進展,基于可編程FPGA器

2、件進行系統(tǒng)芯片集成的新設(shè)計方法,也正在快速地到代基于PCB板的傳統(tǒng)設(shè)計方式。因此,基于FPGA和VHDL語言實現(xiàn)在8*8點陣上的漢字靜態(tài)或一屏顯示問題。二、課題要求(1)技術(shù)要求1根據(jù)電路特點,用層次設(shè)計概念。將此設(shè)計任務(wù)分成若干模塊,規(guī)定每一模塊的功能和各模塊之間的借口,透視加深層次化設(shè)計概念;2軟件的原件管理深層含義,以及模塊元件之間的連接概念,對于不同目錄下的同一設(shè)計,如何熔合;3適配劃分前后的仿真內(nèi)容有何不同概念,仿真信號對象有何不同,有更深一步了解。熟悉了FPGA設(shè)計的調(diào)試過程中手段的多樣化;4按適配劃分后的管腳定位,同相關(guān)功能塊硬件電路接口連線;(2)功能要求1在8*8點陣上顯示漢

3、字2可以靜態(tài)顯示或一屏顯示3利用撥碼開關(guān)來實現(xiàn)靜態(tài)顯示與一屏顯示切換(3)本人的工作三、設(shè)計方案(1)工作原理8*8點陣原理:按照要求可知,點陣模塊,共由8*8=64個發(fā)光二極管組成,如何在該點陣模塊上顯示漢字是本實驗的關(guān)鍵。先將要顯示的每幅圖像畫在8*8共64個小方格的矩形框中,再在有筆劃下落處的小方格里填上“1”,五筆劃處填上“0”,這樣就形成了與這個漢字所對應(yīng)的二進制數(shù)據(jù)在該矩形礦上的分布以“正”為例,點陣分布為:1000000010000001111100011000000111111111100010011000100110000000(2)原理框圖IIII離呻理器浮第一 0 8*8

4、點陣 顯示器三極管行驅(qū)動電路四、單元電路設(shè)計,仿真結(jié)果與分析(1)靜態(tài)顯示“正”libraryieee;useieee.std_logic_1164.all;useieee.std_logic_Unsigned.all;useieee.std_logic_ARITH.all;ENTITYpengisport(elk,en:instd_logic;lie:outstd_logic_vector(7downto0);一歹ijcom:outstd_logic_vector(7downto0);一行Endpeng;Architectureaofpengissignalstl:std_logic_vec

5、tor(7downto0);signalosc:std_logic;signalosd:std_logic;signald_ff:std_logic_vector(27downto0);signaldata:std_logic_vector(7downto0);signaldO,dl,d2,d3,d4,d5,d6,d7:std_logic_vector(7downto0);signallieO,liel,lie2,lie3,lie4,lie5,lie6,lie7:std_logic_vector(7downto0);Begincom<=data;lie二stl;dO二10000000dl

6、C10000001d2<=,/1111000r,d3二”10000001d4<=,iininr,d5<=z,1000100rd6爛10001001d7二10000000一字庫正First:processbeginwait until if(d_ff(27d_ff(27 elsed_ff(27 end if;clk=T'downtodowntodownto0)>=2e8)then0)(二0000000000000000000000000000;0)<=d_ff+l;osc<=notd_ff(10);endprocessfirst;second:proc

7、ess(osc)beginif(osc=T'andosceventanden=,)thenifstl(7downto0)=,00000000,zorstl(7downto0)=,01111111,zthenstl(7downto0)<=,z11111110,z;data<=d0;elsifstl(7downto0)=,/11111110,/thenstl(7downto0)<=/1111110rz;data<=dl;elsifstl(7downto0)=,/11111101,/thenstl(7downto0)<=,z111110irz;data<=

8、d2;elsifstl(7downto0)=,/11111011,/thenstl(7downto0)<=z,11110111,/;data<=d3;elsifstl(7downto0)=,z11110111,zthenstl(7downto0)二11101111”;data二d4;elsifstl(7downto0)11101111thenstl(7downto0)<=,/llOlllir'data<=d5;elsifstl(7downto0)=,/11011111,/thenstl(7downto0)<=/101111irz;data<=d6;e

9、lsifstl(7downto0)=,10111111,/thenstl(7downto0)<=,0111111lz,;data<=d7;endif;endendendif;processsecond;a;(2)一屏顯示“上下五千年”Libraryieee;Useieee.std_logic_1164.all;Useieee.std_logic_unsigned.all;Useieee.std_logic_arith.all;EntitywengisPort(Clk,en:instd_logic;lie:outstd_logic_vector(7downto0);一歹ijCom:o

10、utstd_logic_vector(7downto0);一行Endweng;Architectureaofwengissignalstl:std_logic_vector(7downto0);signalosc:std_logic;signalosd:std_logic;signald_ff:std_logic_vector(27downto0);signaldata:std_logic_vector(7downto0);signaldO,dl,d2,d3,d4,d5,d6,d7:std_logic_vector(7downto0);signallieO,liel,lie2,lie3,lie

11、4,lie5,lie6,lie7:std_logic_vector(6downto0);begincom二data;lie<=stl;D0<="lOOOOOOO'whenlie0(6downto0)二0000000else"OOOOOOOrwhenlie0(6downto0)二0000001else"lOOOOOOO'whenlie0(6downto0)=0000010else"OOOlOOOO'whenlie0(6downto0)=0000011else“00100100”whenlie0(6downto0)=000

12、0100else“00000000;Dl<="lOOOOOOO'whenlie0(6downto0)=0000000else"OOOOOOOrwhenlie0(6downto0)=0000001else"10001001"whenlie0(6downto0)="0000010else"OOOlOlOO'whenlie0(6downto0)="0000011”else"00111011"whenlie0(6downto0)=z,0000100z,else“00000000;D2<

13、="lOOOOOOO'whenlie0(6downto0)二0000000else"OOOOOOOrwhenlie0(6downto0)=0000001else"10001001"whenlie0(6downto0)=0000010else“00010100”whenlie0(6downto0)=0000011else"OOlOlOlO'whenlie0(6downto0)=0000100else“00000000;D3<="llllllirwhenlie0(6downto0)=0000000else"

14、llllllirwhenlie0(6downto0)=0000001else"llllllirwhenlie0(6downto0)=0000010else"llllllOO'whenlie0(6downto0)=0000011else"OOlOlOlO'whenlie0(6downto0)=0000100else“00000000;D4<="lOOlOOOO'whenlie0(6downto0)=z,0000000z,else"OOOOlOOrwhenlie0(6downto0)=,0000001,else“100

15、01001”whenlie0(6downto0)=,0000010,else"OOOlOOlO'whenlie0(6downto0)二00000Helse"lllllllO'whenlie0(6downto0)二0000100else“00000000;D5<="lOOlOOOO'whenlie0(6downto0)=0000000else"00010001"whenlie0(6downto0)=0000001else“10001001”whenlie0(6downto0)=0000010else"000

16、10001"whenlie0(6downto0)=0000011else"OOlOlOlO'whenlie0(6downto0)="0000100else“00000000;D6<="lOOlOOOO'whenlie0(6downto0)=z,0000000z,else"OOlOOOOrwhenlie0(6downto0)=,0000001,else"lllllOOO'whenlie0(6downto0)二0000010else"OOOlOOOO'whenlie0(6downto0)二0

17、0000Helse"OOlOlOlO'whenlie0(6downto0)=0000100else“00000000;D7<="lOOOOOOO'whenlie0(6downto0)=0000000else"OOOOOOOrwhenlie0(6downto0)=0000001else"lOOOOOOO'whenlie0(6downto0)=0000010else"OOOlOOOO'whenlie0(6downto0)=0000011else"OOlOOOOO'whenlie0(6downt

18、o0)="0000100else“00000000;first:processbeginwaituntilelk='1;if(d_ff(27downto0)>=2e8)thend_ff(27downto0)二”0000000000000000000000000000;elsed_ff(27downto0)<=d_ff+1;endif;osc<=notd_ff(10);osd<=notd_ff(26);endprocessfirst;second:process(osc)beginif(osc=T'andosc,eventanden='O

19、')thenifstl(7downto0)=,/00000000,zorstl(7downto0)="01111111”thenstl(7downto0)<=,/11111110,z;data<=d0;elsifstl(7downto0)=,/11111110,/thenstl(7downto0)<=/1111110r/;data<=dl;elsifstl(7downto0)11111101,zthenstl(7downto0)<=,/11111011,/;data<=d2;elsifstl(7downto0)=,/11111011/the

20、nstl(7downto0)二11110111;data二d3;elsifstl(7downto0)=,/11110111,/thenstl(7downto0)<=,z11101111/,;data<=d4;elsifstl(7downto0)11101111thenstl(7downto0)=”11011111;data二d5;elsifstl(7downto0)=,z11011111z/thenstl(7downto0)<=,/lOllllir"data<=d6;elsifstl(7downto0)=,/10111111,/thenstl(7downto0

21、)<=z/0111111;data<=d7;endif;endif;endprocesssecond;third:process(osd)beginif(osd=T'andosd'eventanden=,0")theniflie0(6downto0)=,/0000100,thenlie0(6downto0)爛”0000000”;elselieO(6downto0)<=lie0+l;endif;endif;endprocessthird;enda;五,頂層文件電路設(shè)計,仿真結(jié)果與分析頂層文件libraryieee;useieee.std_logic_1

22、164.all;useieee.std_logic_Unsigned.all;useieee.std_logic_ARITH.all;entityzongisport(a:instd_logic_vector(1downto0);elk:instd.logic;hang:outstd_logic_vector(7downto0);lie:outstd_logic_vector(7downto0);endentityzong;architectureoneofzongiscomponentpengisport(elk,en:instd_logic;lie:outstd_logic_vector(

23、7downto0);一歹ijcom:outstd_logic_vector(7downto0);endcomponent;componentwengisPort(Clk,en:instd_logic;lie:outstd_logic_vector(7downto0);一歹ijCom:outstd_logic_vector(7downto0);一行endcomponent;signalhl,h2:std_logic_vector(7downto0);signal11,12:std_logic_vector(7downto0);beginul:pengportmap(clk=>clk,en=

24、>a(l),com=>hl,lie=>ll);u2:wengportmap(clk=>clk,en=>a(0),com:=>h2,lie=>12);hang<=hlorh2;lie<=llor12;endarchitectureone;六、調(diào)試結(jié)果創(chuàng)建工程在QuartusII中新建一個VHDLFile文件,將vhdl代碼輸入這個文件,并保存到工作目錄,名為zong.vhd。利用newprejectwizard工具創(chuàng)建一個1:程,程名為zong,頂層文件實體名為zong,并將上面創(chuàng)建的zong.vhd文件加入到工程中。編譯前設(shè)置(1)選擇目標芯片。川assignmemts-玲settings命令,彈出settings對話框,選擇目標芯片為EP2c5T144c8。(2)選擇工作方式,編程方式,及閑置引腳狀態(tài)單擊上圖中的device&pinoptions按鈕,彈出device&pinoptions窗口。在configuration項中,其下方的Generatecompressedbitstrea

溫馨提示

  • 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論