【正文】
所以在做實驗的時候,光是找東西就花費了不少時間。 end if。 1372 when 8=tone=10110000010。 when 135=tone_index=5。 when 119=tone_index=8。 when 103=tone_index=12。 when 87=tone_index=5。 when 71=tone_index=9。 when 55=tone_index=8。 when 39=tone_index=6。 when 23=tone_index=12。 when 7=tone_index=6。139。architecture behave of pmusic is signal tone : std_logic_vector(10 downto 0)。適當?shù)倪x擇這些計數(shù)器和組合電路,便可完成不同的樂曲和不同的節(jié)奏。(經(jīng)過實驗過程中的摸索,梁祝這首曲子聽起來也比較優(yōu)美)FPGA EP1K10TC1003主芯片。六、 實驗VHDL語言代碼:library ieee。) then clk10_count=clk10_count+1。) then case time is when 0=tone_index=3。 when 16=tone_index=12。 when 32=tone_index=9。 when 48=tone_index=3。 when 64=tone_index=10。 when 80=tone_index=5。 when 96=tone_index=6。 when 112=tone_index=8。 when 128=tone_index=5。 process(tone_index) begin case tone_index is when 0=tone=11111111111。 process(clk) control the frequence of the speaker begin if(clk39。正是有了老師上課的引導,我們才能很快的進入EDA相關內(nèi)容的學習,尤其是VHDL語言的學習。八、 實驗體會:對于這個應用性實驗,在我做的過程中,個人覺得前期上課老師講到的內(nèi)容以及自己對VHDL語言編程和QuartusII 軟件運用的掌握是關鍵。 others:no output end case。 end if。 when 126=tone_index=5。 when 110=tone_index=9。 when 94=tone_index=6。 when 78=tone_index=5。 when 62=tone_index=0。 when 46=tone_index=9。 when 30=tone_index=0。 when 14=tone_index=5。event and clk10=39。event and clk=39。圖1 編寫音樂輸出的VHDL語言代碼圖2 編譯VHDL語言代碼圖3 編譯成功圖4 選擇芯片并配置管腳圖5 再次編譯圖6 加載硬件并下載VHDL語言代碼五、 實驗連線:時鐘(clk):時鐘輸入信號是接在375KHz的時鐘源上。進一步體驗FPGA 的靈活性。 用QuartusII對其進行編譯仿