中國(guó)地質(zhì)大學(xué)EDA實(shí)驗(yàn)報(bào)告.doc_第1頁(yè)
中國(guó)地質(zhì)大學(xué)EDA實(shí)驗(yàn)報(bào)告.doc_第2頁(yè)
中國(guó)地質(zhì)大學(xué)EDA實(shí)驗(yàn)報(bào)告.doc_第3頁(yè)
中國(guó)地質(zhì)大學(xué)EDA實(shí)驗(yàn)報(bào)告.doc_第4頁(yè)
中國(guó)地質(zhì)大學(xué)EDA實(shí)驗(yàn)報(bào)告.doc_第5頁(yè)
已閱讀5頁(yè),還剩17頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

EDA實(shí)驗(yàn)報(bào)告 基礎(chǔ)實(shí)驗(yàn)實(shí)驗(yàn)一 組合邏輯設(shè)計(jì)一、 實(shí)驗(yàn)?zāi)康模?、通過(guò)一個(gè)簡(jiǎn)單的3-8譯碼器的設(shè)計(jì),掌握組合邏輯電路的設(shè)計(jì)方法。2、掌握組合邏輯電路的靜態(tài)測(cè)試方法。3、初步了解quartusII原理圖輸入設(shè)計(jì)的全過(guò)程。二、實(shí)驗(yàn)的硬件要求:1、主芯片:EP1K10TC10032、輸出:八個(gè)LED燈3、輸入:DIP撥碼開(kāi)關(guān)3位三、實(shí)驗(yàn)器材: 試驗(yàn)箱四、實(shí)驗(yàn)原理: 三八譯碼器三輸入,八輸出。當(dāng)輸入信號(hào)按二進(jìn)制方式的表示為N時(shí),輸出端從零標(biāo)記到八。因?yàn)槿齻€(gè)輸入端能產(chǎn)生的組合狀態(tài)有八種,所以輸出端在每種組合中僅有一位有效的情況下,能表示所有的輸入組合。3-8譯碼器真值表輸入輸出A2 A1 A0Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y00 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 10 0 0 0 0 0 0 1 0 0 0 0 0 0 1 00 0 0 0 0 1 0 00 0 0 0 1 0 0 00 0 0 1 0 0 0 00 0 1 0 0 0 0 00 1 0 0 0 0 0 01 0 0 0 0 0 0 0五、實(shí)驗(yàn)步驟:1、打開(kāi)quartusII 軟件,選擇file-new project wizard建立工程,選擇器件主芯片:EP1K10TC1003 ,工程文件名為ym,2、新建Block diagram/schematic file程序3、在窗口繪制原理圖:?jiǎn)螕羰髽?biāo)右鍵選擇symbol,選擇相應(yīng)原件用鼠標(biāo)拖入文件中編輯,繪制完成后保存原理圖,將程序名改為ym,與工程名相同。4、對(duì)程序進(jìn)行編譯,編譯無(wú)誤后,進(jìn)行波形仿真完成后,進(jìn)行管腳配置,并將程序下載到實(shí)驗(yàn)箱仿真波形5、實(shí)驗(yàn)電路連線與實(shí)驗(yàn)結(jié)果用撥碼開(kāi)關(guān)的低三位代表譯碼器輸入,將之與配置好的管腳相連;用led燈代表譯碼器的輸出,將之與配置好的管腳相連。完成連接后,撥動(dòng)撥檔開(kāi)關(guān),觀察led的發(fā)光狀態(tài)與輸入狀態(tài)的對(duì)應(yīng)關(guān)系是否與真值表中的情況相同。經(jīng)觀察,led的發(fā)光狀態(tài)符合真值表的描述。六、試驗(yàn)心得試驗(yàn)中對(duì)quartus的操作不夠熟悉,繪制原理圖出現(xiàn)連線錯(cuò)誤,以致繪制原理圖速度慢。通過(guò)實(shí)驗(yàn)熟悉了對(duì)軟件的操作,掌握了建立工程的方法,繪制bdf文件的方法,了解了試驗(yàn)箱的使用。實(shí)驗(yàn)二 掃描顯示電路的驅(qū)動(dòng)一、實(shí)驗(yàn)?zāi)康模?了解教學(xué)系統(tǒng)中8位七段數(shù)碼管顯示模塊的工作原理,設(shè)計(jì)標(biāo)準(zhǔn)掃描驅(qū)動(dòng)電路模塊。二、硬件要求: 主芯片:EP1K10TC100-3,時(shí)鐘源,八位七段數(shù)碼顯示管,四位撥碼開(kāi)關(guān)。三、實(shí)驗(yàn)內(nèi)容:1、用撥碼開(kāi)關(guān)產(chǎn)生8421BCD碼,用CPLD產(chǎn)生字形編碼電路和掃描驅(qū)動(dòng)電路,然后進(jìn)行仿真,觀察波形,正確后進(jìn)行設(shè)計(jì)實(shí)現(xiàn)。調(diào)節(jié)時(shí)鐘頻率,感受“掃描”的過(guò)程,并觀察字符亮度和顯示刷新的效果。2、編制一個(gè)簡(jiǎn)單的從0F輪換顯示十六進(jìn)制的電路。四、實(shí)驗(yàn)原理: 四位撥碼開(kāi)關(guān)提供8421BCD碼,經(jīng)譯碼電路后成為七段數(shù)碼管的字形顯示驅(qū)動(dòng)信號(hào)。掃描電路通過(guò)可調(diào)時(shí)鐘輸出片選地址SEL3.0。由SEL3.0和AG決定了8位中的哪一位顯示和顯示什么字形,SEL3.0變化的快慢決定了掃描頻率的快慢。五、實(shí)驗(yàn)步驟:1、 編寫(xiě)DECL7S實(shí)驗(yàn)代碼并封裝: library ieee;use ieee.std_logic_1164.all;entity decl7s is port(a: in std_logic_vector(3 downto 0); led7s: out std_logic_vector(6 downto 0);end;architecture one of decl7s isbegin process(a)begin case a is when 0000= led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s led7s null; end case; end process;end;實(shí)驗(yàn)原理圖:在電腦軟件上繪制出所要求的圖像如下:通過(guò)軟件得出實(shí)驗(yàn)RTL圖實(shí)驗(yàn)波形仿真圖:六、實(shí)驗(yàn)結(jié)果連接好電路,接入時(shí)鐘信號(hào),數(shù)碼管從0-F輪流顯示。七、試驗(yàn)心得試驗(yàn)中,學(xué)會(huì)了程序的封裝和調(diào)用,學(xué)習(xí)了8位七段數(shù)碼管顯示模塊的工作原理。由于試驗(yàn)進(jìn)度慢,操作不夠熟悉,未能在試驗(yàn)時(shí)間內(nèi)順利完成實(shí)驗(yàn)。實(shí)驗(yàn)三 梁祝音樂(lè)演奏實(shí)驗(yàn)一、實(shí)驗(yàn)?zāi)康? 1. 了解普通揚(yáng)聲器的工作原理。2. 使用FPGA產(chǎn)生不同的音樂(lè)頻率。3. 進(jìn)一步體驗(yàn)FPGA的靈活性。二、實(shí)驗(yàn)硬件要求: 1. 375KHz信號(hào)源。2. FPGA EP1K10TC1003主芯片。3. 揚(yáng)聲器。三、實(shí)驗(yàn)原理:本實(shí)驗(yàn)是完成一小段音樂(lè)程序的開(kāi)發(fā),然后再用揚(yáng)聲器進(jìn)行試聽(tīng)。下面主要介紹一下完成本實(shí)驗(yàn)的幾個(gè)主要部分的工作原理。1、音符的產(chǎn)生:音符的產(chǎn)生是利用計(jì)數(shù)器對(duì)輸入的時(shí)鐘信號(hào)進(jìn)行分頻,然后輸出不同的頻率來(lái)控制揚(yáng)聲器發(fā)不同的聲音。計(jì)數(shù)器必須是??勺兊挠?jì)數(shù)器,也就是其初始計(jì)數(shù)值可變,這樣便可以對(duì)其進(jìn)行初始化,使其從不同的初始值開(kāi)始計(jì)數(shù),實(shí)現(xiàn)對(duì)輸入時(shí)鐘信號(hào)的不同分頻。2、節(jié)拍的產(chǎn)生:節(jié)拍也是利用計(jì)數(shù)器來(lái)實(shí)現(xiàn),如果某一個(gè)音符需要維持的時(shí)間比較長(zhǎng),那么就可以在此計(jì)數(shù)器從計(jì)數(shù)值A(chǔ)到計(jì)數(shù)值B之間都維持該音符,很顯然,A和B之間的間隔越大,那么該音符維持的時(shí)間也就越長(zhǎng)。3、樂(lè)譜的存儲(chǔ):樂(lè)譜是一個(gè)固定的組合電路,根據(jù)不同的輸入值,然后輸出一個(gè)固定的值,該值就是音符產(chǎn)生計(jì)數(shù)器的分頻的初始值。適當(dāng)?shù)倪x擇這些計(jì)數(shù)器和組合電路,便可完成不同的樂(lè)曲和不同節(jié)奏。四、實(shí)驗(yàn)內(nèi)容及步驟:本實(shí)驗(yàn)要完成的任務(wù)是設(shè)計(jì)一個(gè)驅(qū)動(dòng)揚(yáng)聲器產(chǎn)生梁祝音樂(lè)的程序,設(shè)計(jì)步驟如下:1、打開(kāi)quartusII,建立工程,選擇芯片ACEX1K10TC1003,新建vhdl文件,編寫(xiě)音樂(lè)輸出的VHDL代碼。2、用quartusII對(duì)其進(jìn)行編譯仿真。3在仿真確定無(wú)誤后,對(duì)管腳進(jìn)行配置,再次進(jìn)行編譯。根據(jù)已配置的管腳,在實(shí)驗(yàn)箱上對(duì)揚(yáng)聲器接口和FPGA之間進(jìn)行正確連線。Clk:時(shí)鐘輸入信號(hào),接375KHz的時(shí)鐘源。Spk:輸出,接揚(yáng)聲器部分的輸入端。將程序下載到試驗(yàn)箱,觀看實(shí)驗(yàn)結(jié)果。Vhdl程序 :library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity music isport(clk : in std_logic;spk : buffer std_logic);end music;architecture behave of music issignal tone : std_logic_vector(10 downto 0);signal tone_count : std_logic_vector(10 downto 0);signal tone_index : integer range 0 to 15;signal clk10_count: std_logic_vector(17 downto 0);signal time : integer range 0 to 150;signal clk10 : std_logic;beginprocess(clk10)beginif(clk10event and clk10=1)thenclk10_count=clk10_count+1;if(clk10_count=16#3fff#) thenclk10= not clk10;end if;end if;end process;process(clk10)beginif(clk10event and clk10=1)thenif(time=150) thentime=0;elsetimetone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextone_indextonetonetonetonetonetonetonetonetonetonetonetonetonetone=11111111111;end case;end process;process(clk)beginif(clkevent and clk=1)thenif(tone_count=16#7ff#) thentone_count=tone;if(tone2047) thenspk=not spk;end if;elsetone_count=tone_count+1;end if;end if;end process;end behave;實(shí)驗(yàn)RTL圖七、實(shí)驗(yàn)結(jié)果:蜂鳴器奏響梁祝,改變輸入的時(shí)鐘頻率,音樂(lè)輸出也不同。實(shí)驗(yàn)八 步進(jìn)電機(jī)控制實(shí)驗(yàn)一、 實(shí)驗(yàn)?zāi)康?、 了解步進(jìn)電機(jī)的工作原理。2、 掌握用FPGA產(chǎn)生驅(qū)動(dòng)步進(jìn)電機(jī)的時(shí)序。3、 掌握用FPGA來(lái)控制步進(jìn)電機(jī)轉(zhuǎn)動(dòng)的整個(gè)過(guò)程。二、 硬件要求1、 步進(jìn)電機(jī)。2、 主芯片F(xiàn)PGA EP1K10TC1003。3、 8個(gè)按鍵和一個(gè)撥擋開(kāi)關(guān)。4、 可變時(shí)鐘源。三、實(shí)驗(yàn)原理步進(jìn)電機(jī)是工業(yè)過(guò)程控制及儀表中常用的控制元件之一,例如在機(jī)械裝置中可以用絲桿把角度變?yōu)橹本€位移,也可以用步進(jìn)電機(jī)帶動(dòng)螺旋電位器,調(diào)節(jié)電壓或電源,從而實(shí)現(xiàn)對(duì)執(zhí)行機(jī)械的控制。四、實(shí)驗(yàn)內(nèi)容及步驟本實(shí)驗(yàn)需要完成的任務(wù)是編寫(xiě)VHDL代碼來(lái)驅(qū)動(dòng)步進(jìn)電機(jī)動(dòng)作,通過(guò)撥動(dòng)開(kāi)關(guān)使其正轉(zhuǎn)、反轉(zhuǎn);通過(guò)按下相應(yīng)的按鍵開(kāi)關(guān)使其旋轉(zhuǎn)相應(yīng)的角度。1、打開(kāi)quartusII,建立工程,工程名為stepmotor,新建vhdl文件,選擇芯片ACEX1K EP1K10TC1003 編寫(xiě)驅(qū)動(dòng)步進(jìn)電機(jī)旋轉(zhuǎn)的VHDL程序。程序如下: library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity stepmotor isport( clk : in std_logic; key1_8,key5_4,key9 : in std_logic; key18,key45,key90 : in std_logic; key180,key360 : in std_logic; keyorder : in std_logic; astep,bstep : out std_logic; cstep,dstep : out std_logic); end stepmotor;architecture behave of stepmotor issignal dcount : std_logic_vector(4 downto 0); signal degreecount : std_logic_vector(7 downto 0); signal degree : std_logic_vector(7 downto 0); signal abcd : std_logic_vector(1 downto 0); signal clk_temp : std_logic; beginprocess(clk) beginif(clkevent and clk=1) thendcount=dcount+1;end if;end process;process(clk) beginif(clkevent and clk=1) thenif(dcount=11111) thenclk_temp=not clk_temp;end if;end if;end process;process(clk) beginif(clkevent and clk=1) thenif(key1_8=0) thendegree=00000001;elsif(key5_4=0) thendegree=00000011;elsif(key9=0) thendegree=00000101;elsif(key18=0) thendegree=00001010;elsif(key45=0) thendegree=00011001;elsif(key90=0) thendegree=00110010;elsif(key180=0) thendegree=01100100;elsif(key360=0) thendegree0) thendegree0) thendegreecount0) thendegreecount=degreecount-1;abcd=abcd+1;elsedegreecount=00000000;end if;end if;end process;process(clk_temp) beginif(clk_tempevent and clk_temp=1) thenif(keyorder=1) thenif(abcd=0) thenastep=1;bstep=0;cstep=0;dstep=0;elsif(abcd=1) thenastep=0;bstep=1;cstep=0;dstep=0;elsif(abcd=2) thenastep=0;bstep=0;cstep=1;dstep=0;elsif(abcd=3) thenastep=0;bstep=0;cstep=0;dstep=1;end if;elseif(abcd=0) thenastep=1;bstep=0;cstep=0;dstep=0;elsif(abcd=1) thenastep=0;bstep=0;cstep=0;dstep=1;elsif(abcd=

溫馨提示

  • 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ì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論