【正文】
電腦與FPGA實(shí)驗(yàn)箱連接起來(lái),開電源,點(diǎn)擊TOOLS\Programmer進(jìn)入下載頁(yè)面,如果是第一次使用的話,點(diǎn)擊Hardware setup,然后在Hardware setting選項(xiàng)中點(diǎn)擊Addhardware,hardware type選擇‘byteblastermv orbyteblasterII’,‘port’選擇‘LPT1’,點(diǎn)擊OK完成硬件設(shè)置。下載成功后,根據(jù)分配的管腳用線引出,即可用示波器觀察波形。從結(jié)果可以看出,波形中存在許多毛刺,這也是本次設(shè)計(jì)中的不足之處,但總體來(lái)說(shuō),結(jié)果還是比較滿意的! 單/雙極性變換硬件電路在編碼器的設(shè)計(jì)中,編碼的輸出是兩個(gè)單極性的輸出,如果下載到FPGA 實(shí)驗(yàn)箱上,最后的編碼輸出沒(méi)有辦法表示,同理譯碼器的設(shè)計(jì)也是一樣,因此本次設(shè)計(jì)采用了一個(gè)極性變換電路來(lái)解決這個(gè)問(wèn)題。其芯片結(jié)構(gòu)及管腳接法如圖51所示: VCCoutputCodeout1Codeout0 GND圖51 芯片結(jié)構(gòu)及其接法 電路弄好以后就是焊接了,焊接過(guò)程要仔細(xì),布局合理,其焊接電路圖如圖52所示:圖52 極性變換電路實(shí)物圖第六章 結(jié)論通過(guò)一步步有條不紊的分析和思考,更重要的是在設(shè)計(jì)中,根據(jù)實(shí)際情況,對(duì)設(shè)計(jì)初期的思想做不斷完善和改進(jìn),因?yàn)樵谠O(shè)計(jì)之前的思路,只能說(shuō)是一個(gè)大體的方向,很多時(shí)候,實(shí)際的操作和設(shè)計(jì)要細(xì)致和復(fù)雜的多,或者原來(lái)的想法根本就行不通,得從實(shí)際設(shè)計(jì)的角度一步步來(lái)完成了這樣一個(gè)系統(tǒng)設(shè)計(jì)。(2) 雖然實(shí)現(xiàn)的設(shè)計(jì)要求的基本功能,但是所用方法較復(fù)雜,事實(shí)上還可能找到其他的建模方法。 通過(guò)這次畢業(yè)設(shè)計(jì),讓我學(xué)到了很多知識(shí),也獲得很多體會(huì),這是自己將平日學(xué)的理論知識(shí)應(yīng)用到實(shí)際操作中的一次很好的實(shí)踐。[2] 段吉海、黃智偉等. 基于CPLD/FPGA的數(shù)字通信系統(tǒng)建模與設(shè)計(jì)[M]. 北京:電子工業(yè)出版社,2004。[6] 李環(huán)等著. 通信系統(tǒng)仿真設(shè)計(jì)與應(yīng)用. 北京:電子工業(yè)出版社,2009年。[10],高等教育出版社。use 。end entity 。 then count11=0。 then if en=39。 end if。process(count11) begin case count11 is when 0=dout=39。 when 2=dout=39。 when 4=dout=39。 when 6=dout=39。 when 8=dout=39。 when 10=dout=39。 when 12=dout=39。 when 14=dout=39。 when 16=dout=39。 when 18=dout=39。 when 20=dout=39。 when 22=dout=39。 when others=dout=39。end behave。ENTITY D ISPORT(D,CLK: IN std_logic。EVENT ANDCLK=39。END PROCESS。entity xhdb3 ISport(codein:in std_logic。end xhdb3。signal flag2:integer range 1 downto 0:=1。signal s0:std_logic_vector(4 downto 0):=00000。signal clkv:std_logic。ponent dffport(d :in std_logic。beginvclk:clkv=clk after 10 ns。thenif clr=39。elsecase codein iswhen 39。flag0=1。when 39。elsecodeoutv=111。elseif flag1=0 thencodeoutv=111。flag1=0。t0=0。when others=codeoutv=000。end if。s2(0)=codeoutv(2)。ds22:dff port map(s2(1),clk,s2(2))。ds13:dff port map(s1(2),clk,s1(3))。event and clkb=39。s1(4)=s1(3)。s1(4)=s1(3)。s1(4)=39。flag3=1。end if。s0(4)=s0(3)。039。end if。s0(4)=s0(3)。s0(4)。output:process(clkout)beginIF clkout39。elsif codeoutb=001or codeoutb=010or codeoutb=011thencodeout=01。end process output。entity GuiLing ISport(codeout1:in std_logic。end GuiLing。event and clk2=39。 thencode_temp=10。end process GL。 thenif start=39。code_GL=code_temp(1)。end if。use 。 低位 clock :in std_logic。 signal reg1 :std_logic_vector(4 downto 0)。039。039。reg1=00000。139。 reg1(1)。039。 reg1(1)。 reg1(4 downto 1)。 process(clock) begin if rising_edge(clock) then if reg0(0)=39。 then data_out=39。 end if。30。 end process。 else data_out=39。 or reg1(0)=39。 end if。 reg0(4 downto 1)。 reg0(1)。139。 reg0(1)。039。139。reg1=00000。139。end yima。entity yima is port(data1 :in std_logic。end behave。code_GL=code_temp(0)。 then qq=0。event and clk2=39。end if。 then if codeout1=39。signal qq:integer range 3 downto 0。start:in std_logic。歸零模塊library ieee。end if。139。end process add_b。codeoutb=s2(4)amp。when others=s2(4)=s2(3)。139。039。when 011=if flag3=0 thens2(4)=s2(3)。s1(4)=s1(3)。s0(4)=39。when 111=if flag3=0 thens2(4)=39。when 010=flag3=0。thencase codeoutv iswhen 110=flag3=1。bclk:clkb=not clk。ds02:dff port map(s0(1),clk,s0(2))。ds11:dff port map(s1(0),clk,s1(1))。s0(0)=codeoutv(0)。end case。codeoutv=000。end if。flag0=1。end if。=if t0=3 thenif firstv=0 thenif flag0=0 thencodeoutv=011。flag0=0。=t0=0。thencodeoutv=000。event and clk=39。q :out std_logic)。signal s2:std_logic_vector(4 downto 0):=00000。signal s1:std_logic_vector(4 downto 0):=00000。signal firstv:integer range 1 downto 0:=0。signal flag0:integer range 1 downto 0:=0。clr: in std_logic。編碼器library ieee。)THENQ=D。END D。use 。 end case。 when 23=dout=39。 when 21=dout=39。 when 19=dout=39。 when 17=dout=39。 when 15=do