




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、VHDL硬件描述語(yǔ)言程序設(shè)計(jì)簡(jiǎn)易電子琴演奏器姓名:chi目錄一、設(shè)計(jì)課題的任務(wù)要求3二、系統(tǒng)設(shè)計(jì)3三、仿真波形及波形分析11四、源程序12五、功能說(shuō)明41六、元器件清單及資源利用情況41七、故障及問(wèn)題分析43八、總結(jié)和結(jié)論44一、 設(shè)計(jì)課題的任務(wù)要求基本要求:1、 用8×8點(diǎn)陣顯示“1 2 3 4 5 6 7”七個(gè)音符構(gòu)成的電子琴鍵盤(pán)。其中點(diǎn)陣的第一列用一個(gè)LED點(diǎn)亮表示音符“1”,第二列用二個(gè)LED點(diǎn)亮表示音符“2”,依此類推,如下圖所示。1 2 3 4 5 6 7圖1 點(diǎn)陣顯示的電子琴鍵盤(pán)2、 用BTN1BTN7七個(gè)按鍵模擬電子琴手動(dòng)演奏時(shí)的“1 2 3 4 5 6 7”七個(gè)音符
2、。當(dāng)某個(gè)按鍵按下時(shí),數(shù)碼管顯示相應(yīng)的音符,點(diǎn)陣上與之對(duì)應(yīng)的音符顯示列全滅,同時(shí)蜂鳴器演奏相應(yīng)的聲音;當(dāng)按鍵彈開(kāi)時(shí)數(shù)碼管顯示的音符滅掉,點(diǎn)陣顯示恢復(fù),蜂鳴器停止聲音的輸出。下圖所示為按下BTN3按鍵時(shí)點(diǎn)陣的顯示情況。1 2 3 4 5 6 7圖2 按鍵按下后的點(diǎn)陣顯示3、 由撥碼開(kāi)關(guān)切換選擇高、中、低音,并用數(shù)碼管進(jìn)行相應(yīng)的顯示。4、 通過(guò)按鍵BTN0進(jìn)行復(fù)位,控制點(diǎn)陣顯示圖1的初始狀態(tài)。提高要求:1、 可通過(guò)一個(gè)撥碼開(kāi)關(guān)進(jìn)行手動(dòng)/自動(dòng)演奏的切換,并與點(diǎn)陣顯示配合增加自動(dòng)演奏樂(lè)曲的功能。2、 增加手動(dòng)演奏的音符存儲(chǔ)、播放功能。二、 系統(tǒng)設(shè)計(jì)1. 設(shè)計(jì)思路簡(jiǎn)易電子琴的制作主要是利用不同頻率的波來(lái)驅(qū)
3、動(dòng)蜂鳴器發(fā)出聲響。通過(guò)輸入不同的音符來(lái)設(shè)置不同的分頻系數(shù),使得50MHz的主頻分頻出不同頻率的波。同時(shí),演奏的音符還可以通過(guò)數(shù)碼管和8*8點(diǎn)陣來(lái)動(dòng)態(tài)顯示。根據(jù)系統(tǒng)設(shè)計(jì)要求,該電子琴設(shè)計(jì)采用自頂向下的設(shè)計(jì)方法。整體的功能通過(guò)不同的底層模塊配合來(lái)完成電子琴的功能。底層模塊主要包括樂(lè)曲自動(dòng)演奏模塊、分頻預(yù)置值產(chǎn)生模塊和數(shù)控分頻模塊,數(shù)碼管顯示模塊,8*8點(diǎn)陣顯示模塊五部分組成。用這種設(shè)計(jì)思路把整個(gè)系統(tǒng)分為了若干個(gè)模塊,然后再在頂層文件中將各個(gè)模塊組合在一起,從而體現(xiàn)出超、高速硬件描述語(yǔ)言VHDL的優(yōu)勢(shì), 關(guān)于提高要求中通過(guò)一個(gè)撥碼開(kāi)關(guān)進(jìn)行手動(dòng)/自動(dòng)演奏的切換,并與點(diǎn)陣顯示配合增加自動(dòng)演奏樂(lè)曲的功能,
4、我打算將一首曲子的音符儲(chǔ)存在自動(dòng)播放的數(shù)組里面,然后通過(guò)計(jì)數(shù)器來(lái)順序播放儲(chǔ)存的音符。關(guān)于提高要求中的手動(dòng)演奏的音符存儲(chǔ)、播放功能,我打算通過(guò)編程實(shí)現(xiàn)類似數(shù)據(jù)結(jié)構(gòu)中隊(duì)列的模塊,來(lái)儲(chǔ)存手動(dòng)輸入的音符,然后在要播放的時(shí)候,隊(duì)列里面的音符依次出隊(duì),從而實(shí)現(xiàn)音符儲(chǔ)存播放的功能。2. 總體框圖數(shù)碼管顯示8*8點(diǎn)陣顯示蜂鳴器輸出音符輸入高低音,自動(dòng)手動(dòng)圖3簡(jiǎn)易電子琴總體結(jié)構(gòu)框圖是否自動(dòng)播放查找對(duì)應(yīng)的頻率值結(jié)束開(kāi)始輸入按鍵點(diǎn)陣顯示蜂鳴器輸出數(shù)碼管顯示選擇高低音是否圖4簡(jiǎn)易電子琴邏輯流程圖圖5簡(jiǎn)易電子琴VHDL電路原理圖3. 分塊設(shè)計(jì)(1) 分頻模塊div0由于實(shí)驗(yàn)電路板的主頻是50Mhz,為了數(shù)碼管和點(diǎn)陣的刷
5、新顯示,我們必須將50Mhz的頻率進(jìn)行分頻。分頻的程序來(lái)自電路中心的網(wǎng)站上面。在這個(gè)模塊里,我設(shè)置分頻系數(shù)為cnt=2499。從實(shí)驗(yàn)結(jié)果看,這個(gè)分頻對(duì)數(shù)碼管和點(diǎn)陣的顯示有很好的效果(2) 數(shù)碼管顯示模塊shuma我使用了2個(gè)數(shù)碼管,第一個(gè)數(shù)碼管顯示17的音符,第二個(gè)數(shù)碼管顯示相關(guān)的信息,比如高音用H表示,低音用L表示,自動(dòng)播放用A表示。兩個(gè)數(shù)碼管分別刷新,但由于刷新頻率太快,人眼不能察覺(jué),以為是兩個(gè)數(shù)碼管是同時(shí)亮的。在程序中我們通過(guò)duan : out std_logic_vector(7 downto 0)和 cat : out std_logic_vector(5 downto 0)來(lái)控制
6、數(shù)碼管的顯示。當(dāng)輸入不同的音符和不同的控制信息時(shí),duan和cat向量都有不同的值與之對(duì)應(yīng)。(3) 8*8點(diǎn)陣顯示模塊dianzhen8*8點(diǎn)陣的顯示和數(shù)碼管的顯示運(yùn)用了同樣的原理,在程序中我們通過(guò)row : out std_logic_vector(7 downto 0)和col : out std_logic_vector(7 downto 0)這兩個(gè)向量來(lái)控制點(diǎn)陣的顯示。當(dāng)輸入不同的音符時(shí),點(diǎn)陣顯示相應(yīng)的形狀。(4) 音符產(chǎn)生模塊auto。這個(gè)模塊的功能是,選擇的不同模式來(lái)產(chǎn)生不同的音符。當(dāng)選擇自動(dòng)播放模式時(shí),隨著計(jì)數(shù)器count的值增加,即地址值遞增時(shí),程序自動(dòng)讀取出事先儲(chǔ)存的音符,并
7、把這個(gè)音符輸出。當(dāng)選擇手動(dòng)演奏模式時(shí),直接將通過(guò)BTN1BTN7輸入的向量當(dāng)做音符輸出yin :out std_logic_vector(6 downto 0);。(5) 分頻預(yù)置值產(chǎn)生模塊該模塊的功能是通過(guò)音符以及高低音選項(xiàng)來(lái)查表找到對(duì)應(yīng)的頻率值。在程序中設(shè)置了全部音符對(duì)應(yīng)的分頻預(yù)置數(shù)。通過(guò)判斷音符產(chǎn)生模塊輸出的音符 yin :in std_logic_vector(6 downto 0),以及撥碼開(kāi)關(guān)的高低音highlow :in std_logic_vector(1 downto 0)控制鍵,來(lái)查找出該音符的頻率值,然后將該頻率賦值給tone :out integer range 0 t
8、o 2000000);。 (6) 數(shù)控分頻發(fā)聲模塊從實(shí)驗(yàn)板上面輸入的時(shí)鐘是50MHz的,必須經(jīng)過(guò)分頻后由clk_out輸出,驅(qū)動(dòng)蜂鳴器發(fā)聲。Clk_out的輸出頻率就對(duì)應(yīng)著音符的音調(diào)。分頻系數(shù)由來(lái)自分頻預(yù)置值模塊的tone :out integer range 0 to 2000000)。由于直接從數(shù)控分頻器中出來(lái)的輸出信號(hào)是脈寬極窄的脈沖式信號(hào)。為了利用驅(qū)動(dòng)蜂鳴器,需要再增加一個(gè)進(jìn)程,多波形進(jìn)行整理,均衡占空比三、 仿真波形及波形分析1. 數(shù)碼管顯示模塊仿真波形 波形分析:不同的yin,和highlow組合,數(shù)碼管顯示不同的字符。duan0duan7對(duì)應(yīng)著數(shù)碼管的a段到h段,cat0cat5
9、控制不同的數(shù)碼管2. 點(diǎn)陣顯示模塊仿真波形波形分析:不同的yin輸入,點(diǎn)陣的col和row會(huì)有不同的波形,利用clk_in的上升沿來(lái)動(dòng)態(tài)掃描點(diǎn)陣。從而得顯示出指定的圖形。3. 自動(dòng)播放模塊仿真波形波形分析:當(dāng)auto 置1,clear置0,yin_out輸出儲(chǔ)存在程序里面的曲子音符,這時(shí)候相當(dāng)于自動(dòng)播放。當(dāng)auto置0,clear置0,yin_out輸出從BTN1BTN7讀取的手動(dòng)輸入的信號(hào),這時(shí)候相當(dāng)于手動(dòng)演奏。4. 分頻預(yù)置值產(chǎn)生模塊仿真波形波形分析:輸入不同的高低音highlow,和音符yin,輸出不同的tone。而tone將作為發(fā)聲模塊的分頻預(yù)置值四、 源程序1. 分頻模塊源程序lib
10、rary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity div0 isport(clk_in : in std_logic; -輸入時(shí)鐘 clk_tmp : out std_logic); -輸出時(shí)鐘end;architecture b of div0 is signal clk : std_logic;beginp0:process(clk_in) variable cnt : integer range 0 to 2499;beginif (clk_in'event and clk_i
11、n='1') thenif cnt=2499 then -分頻系數(shù)為2499cnt:=0;clk<= not clk;elsecnt:=cnt+1; -每個(gè)輸入時(shí)鐘上升沿到來(lái)時(shí)cnt加1end if;end if;end process p0;clk_tmp<=clk;end b ;2. 數(shù)碼管顯示源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity shuma isport(clk_in : in std_logic; -以分頻的時(shí)鐘輸入 yin : i
12、n std_logic_vector(6 downto 0); -輸入音符 highlow :in std_logic_vector(1 downto 0); -輸入高低音 auto : in std_logic; -自動(dòng)播放 auto1 : in std_logic; -自動(dòng)播放1 duan : out std_logic_vector(7 downto 0); cat : out std_logic_vector(5 downto 0) );end;architecture b of shuma issignal duant : std_logic_vector(7 downto 0);s
13、ignal catt : std_logic_vector(5 downto 0);beginp1: process(clk_in,yin,highlow,auto,auto1) beginif auto ='1' thencatt<="111101"duant<="00111111" -顯示“8”表示自動(dòng)播放elsif auto1 ='1' then catt<="111101"duant<="01111111"-顯示“0”表示試音elsif auto =&
14、#39;0' then if(clk_in ='0') thencase yin iswhen "0000001" => catt<="111110"duant<="00000110" -顯示“1”when "0000010" => catt<="111110"duant<="01011011"-顯示“2”when "0000100" => catt<="111110&quo
15、t;duant<="01001111"-顯示“3”when "0001000" => catt<="111110"duant<="01100110"-顯示“4”when "0010000" => catt<="111110"duant<="01101101"-顯示“5”when "0100000" => catt<="111110"duant<="
16、01111101"-顯示“6”when "1000000" => catt<="111110"duant<="00000111"-顯示“7”when others=> catt<="111111"duant<="00000000"end case; elsif (clk_in ='1') thencase highlow iswhen "10" => catt<="111101"du
17、ant<="01110100" -顯示“L”when "01" => catt<="111101"duant<="00111000" -顯示“H”when others=> catt<="111111"duant<="00000000" end case; end if;end if; end process p1; cat<= catt; duan<= duant;end b;3. 點(diǎn)陣顯示源程序library ieee
18、;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity dianzhen isport(clk_in : in std_logic; -時(shí)鐘輸入 yin : in std_logic_vector(6 downto 0); -輸入音符 row : out std_logic_vector(7 downto 0); -點(diǎn)陣行向量 col : out std_logic_vector(7 downto 0) -點(diǎn)陣列向量 );end;architecture b of dianzhen issignal count :
19、 integer range 0 to 6;signal rowt : std_logic_vector(7 downto 0);signal colt : std_logic_vector(7 downto 0);beginp1:process(clk_in)beginif (clk_in'event and clk_in='1') thenif count = 6 then count<=0;elsecount<=count+1;-用count來(lái)記數(shù)end if;end if;end process p1;p2: process(count,yin) b
20、egin if (yin = "0000001") thencase count is-點(diǎn)陣顯示,表示“1”音符 when 0=> rowt<="11111110"colt<="01111110" when 1=> rowt<="11111101"colt<="01111110" when 2=> rowt<="11111011"colt<="01111100" when 3=> rowt<
21、="11110111"colt<="01111000" when 4=> rowt<="11101111"colt<="01110000" when 5=> rowt<="11011111"colt<="01100000" when 6=> rowt<="10111111"colt<="01000000" when others=> rowt<="1111
22、1111"colt<="00000000"end case; elsif (yin = "0000010") thencase count is-點(diǎn)陣顯示,表示“2”音符 when 0=> rowt<="11111110"colt<="01111101" when 1=> rowt<="11111101"colt<="01111100" when 2=> rowt<="11111011"col
23、t<="01111100" when 3=> rowt<="11110111"colt<="01111000" when 4=> rowt<="11101111"colt<="01110000" when 5=> rowt<="11011111"colt<="01100000" when 6=> rowt<="10111111"colt<="0100
24、0000" when others=> rowt<="11111111"colt<="00000000"end case;elsif (yin = "0000100") thencase count is-點(diǎn)陣顯示,表示“3”音符 when 0=> rowt<="11111110"colt<="01111011" when 1=> rowt<="11111101"colt<="01111010"
25、; when 2=> rowt<="11111011"colt<="01111000" when 3=> rowt<="11110111"colt<="01111000" when 4=> rowt<="11101111"colt<="01110000" when 5=> rowt<="11011111"colt<="01100000" when 6=> ro
26、wt<="10111111"colt<="01000000" when others=> rowt<="11111111"colt<="00000000"end case;elsif (yin = "0001000") thencase count is-點(diǎn)陣顯示,表示“4”音符 when 0=> rowt<="11111110"colt<="01110111" when 1=> rowt<=&q
27、uot;11111101"colt<="01110110" when 2=> rowt<="11111011"colt<="01110100" when 3=> rowt<="11110111"colt<="01110000" when 4=> rowt<="11101111"colt<="01110000" when 5=> rowt<="11011111&quo
28、t;colt<="01100000" when 6=> rowt<="10111111"colt<="01000000" when others=> rowt<="11111111"colt<="00000000"end case;elsif (yin = "0010000") thencase count is -點(diǎn)陣顯示,表示“5”音符 when 0=> rowt<="11111110"colt&l
29、t;="01101111" when 1=> rowt<="11111101"colt<="01101110" when 2=> rowt<="11111011"colt<="01101100" when 3=> rowt<="11110111"colt<="01101000" when 4=> rowt<="11101111"colt<="0110000
30、0" when 5=> rowt<="11011111"colt<="01100000" when 6=> rowt<="10111111"colt<="01000000" when others=> rowt<="11111111"colt<="00000000"end case;elsif (yin = "0100000") thencase count is-點(diǎn)陣顯示,表示“6”音符 w
31、hen 0=> rowt<="11111110"colt<="01011111" when 1=> rowt<="11111101"colt<="01011110" when 2=> rowt<="11111011"colt<="01011100" when 3=> rowt<="11110111"colt<="01011000" when 4=> rowt&
32、lt;="11101111"colt<="01010000" when 5=> rowt<="11011111"colt<="01000000" when 6=> rowt<="10111111"colt<="01000000" when others=> rowt<="11111111"colt<="00000000"end case;elsif (yin = "1
33、000000") thencase count is-點(diǎn)陣顯示,表示“7”音符 when 0=> rowt<="11111110"colt<="00111111" when 1=> rowt<="11111101"colt<="00111110" when 2=> rowt<="11111011"colt<="00111100" when 3=> rowt<="11110111"c
34、olt<="00111000" when 4=> rowt<="11101111"colt<="00110000" when 5=> rowt<="11011111"colt<="00100000" when 6=> rowt<="10111111"colt<="00000000" when others=> rowt<="11111111"colt<=&qu
35、ot;00000000"end case;else case count is-點(diǎn)陣顯示,表示不輸入音符 when 0=> rowt<="11111110"colt<="01111111" when 1=> rowt<="11111101"colt<="01111110" when 2=> rowt<="11111011"colt<="01111100" when 3=> rowt<="11
36、110111"colt<="01111000" when 4=> rowt<="11101111"colt<="01110000" when 5=> rowt<="11011111"colt<="01100000" when 6=> rowt<="10111111"colt<="01000000" when others=> rowt<="11111111"
37、;colt<="00000000"end case;end if; end process p2; row<= rowt; col<= colt;end b;4. 選擇音符及自動(dòng)播放源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity auto isport( clk_in :in std_logic;-輸入時(shí)鐘 auto :in std_logic;-自動(dòng)播放 auto1 :in std_logic;-試音播放 clear :in std_lo
38、gic;-復(fù)位 yin_in :in std_logic_vector(6 downto 0);-輸入音符 yin_out :out std_logic_vector(6 downto 0); -輸出音符end auto;architecture a of auto issignal count : integer range 0 to 35;signal n: integer range 0 to 6;signal yin : std_logic_vector(6 downto 0);begin p1:process(clk_in,clear)variable i : integer ran
39、ge 0 to 63000000;begin if clear ='1' then count<=0; elsif (clk_in'event and clk_in='1') thenif (i=20000000) then i:=0; if count =15 then count <=0;-自動(dòng)播放count記數(shù) else count <=count+1; end if; if n =6 then n <=0; -試音播放n記數(shù) else n <=n+1; end if;else i:=i+1;end if; end i
40、f;end process p1;p2:process(count,auto,yin_in,clear)begin if clear='1' then yin<="0000000"-音符清零elseif auto ='1' then-自動(dòng)播放歌曲case count iswhen 1 => yin<="0000100"-3when 2 => yin<="1000000"-7when 3 => yin<="0000100"-3when 4 =&
41、gt; yin<="0100000"-6when 5 => yin<="0010000"-5when 6=> yin<="0100000"-6when 7 => yin<="0000001"-1when 8 => yin<="0000100"-3when 9 => yin<="0010000"-5when 10 => yin<="0000100"-3when 11 => y
42、in<="0000100"-3when 12 => yin<="0001000"-4when 13 => yin<="0000100"-2when 14 => yin<="0001000"-4when others => yin<="0000000"end case;elsif auto1 ='1' thencase n is-試音播放when 0 => yin<="0000001"-1when
43、 1 => yin<="0000010"-2when 2 => yin<="0000100"-3when 3 => yin<="0001000"-4when 4 => yin<="0010000"-5when 5 => yin<="0100000"-6when 6 => yin<="1000000"-7when others => yin<="0000000"end cas
44、e;elseyin<=yin_in;-動(dòng)手演奏end if;end if;end process p2;yin_out<=yin;end a;5. 預(yù)置分頻系數(shù)模塊源代碼library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity seletone isport( highlow :in std_logic_vector(1 downto 0); -高低音 yin :in std_logic_vector(6 downto 0);-要演奏的音符 tone :out integer ra
45、nge 0 to 2000000); -預(yù)置分頻系數(shù)end seletone;architecture a of seletone issignal tone0 :integer range 0 to 2000000;begin process(highlow,yin)begin if highlow ="00" thencase yin is-中音部分when "0000001"=> tone0<=523;when "0000010"=> tone0<=587;when "0000100"
46、=> tone0<=659;when "0001000"=> tone0<=698;when "0010000"=> tone0<=784;when "0100000"=> tone0<=880;when "1000000"=> tone0<=988;when others => tone0<=2000000;end case;elsif highlow ="10" then-高音部分case yin iswhen &quo
47、t;0000001"=> tone0<=1045;when "0000010"=> tone0<=1174;when "0000100"=> tone0<=1318;when "0001000"=> tone0<=1396;when "0010000"=> tone0<=1568;when "0100000"=> tone0<=1760;when "1000000"=> tone0<
48、=1975;when others => tone0<=2000000;end case;elsif highlow ="01" then-低音部分case yin iswhen "0000001"=> tone0<=261;when "0000010"=> tone0<=293;when "0000100"=> tone0<=329;when "0001000"=> tone0<=349;when "0010000"
49、;=> tone0<=392;when "0100000"=> tone0<=440;when "1000000"=> tone0<=494;when others => tone0<=2000000;end case; end if;end process ;tone <=tone0;end a;6. 分頻發(fā)音模塊源代碼library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity div isport(
50、clk_in : in std_logic;-輸入時(shí)鐘 tone: in integer range 0 to 2000000;-預(yù)置頻率 clk_out : out std_logic);-輸出時(shí)鐘end div;architecture a of div issignal clk_tmp0 : std_logic;signal clk_tmp1: std_logic;begin p0:process(clk_in, tone)variable cnt : integer range 0 to 49999999;beginif (clk_in'event and clk_in=
51、9;1') then if cnt <12999999/tone then-分頻系數(shù) cnt:=cnt+1; clk_tmp0<='1' else cnt:=0; clk_tmp0<='0' end if;end if;end process p0;p1:process(clk_tmp0)variable count :std_logic;beginif(clk_tmp0'event and clk_tmp0='1') thencount:=not count;if count ='1' then
52、clk_tmp1 <='1'-輸出平穩(wěn)的波形elseclk_tmp1 <='0'end if;end if;end process p1;clk_out<=clk_tmp1;end a;7. 電子琴頂層設(shè)計(jì)library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity dianzq isport(clk : in std_logic;-時(shí)鐘輸入 yin : in std_logic_vector(6 downto 0);-音符輸入 highlow:
53、in std_logic_vector(1 downto 0);-高低音輸入 auto_in: in std_logic;-自動(dòng)播放 auto1 : in std_logic;-試音播放 clear : in std_logic;-復(fù)位 clk_out: out std_logic;-輸出時(shí)鐘 row : out std_logic_vector(7 downto 0);-點(diǎn)陣顯示 col : out std_logic_vector(7 downto 0);-點(diǎn)陣顯示 duan : out std_logic_vector(7 downto 0);-數(shù)碼管顯示 cat : out std_l
54、ogic_vector(5 downto 0);-數(shù)碼管顯示end dianzq;architecture a of dianzq iscomponent div0 is-分頻模塊port(clk_in : in std_logic; clk_tmp : out std_logic);end component;component dianzhen is-點(diǎn)陣顯示模塊port(clk_in : in std_logic; yin : in std_logic_vector(6 downto 0); row : out std_logic_vector(7 downto 0); col : ou
55、t std_logic_vector(7 downto 0) );end component;component shuma is-數(shù)碼管顯示模塊port(clk_in : in std_logic; yin : in std_logic_vector(6 downto 0); highlow :in std_logic_vector(1 downto 0); auto : in std_logic; auto1 : in std_logic; duan : out std_logic_vector(7 downto 0); cat : out std_logic_vector(5 downt
56、o 0) );end component;component auto is-自動(dòng)播放模塊port( clk_in :in std_logic; auto :in std_logic; auto1 : in std_logic; yin_in :in std_logic_vector(6 downto 0); clear : in std_logic; yin_out:out std_logic_vector(6 downto 0); end component;component seletone is-預(yù)置分頻系數(shù)模塊port( highlow:in std_logic_vector(1
57、downto 0); yin :in std_logic_vector(6 downto 0); tone :out integer range 0 to 2000000); end component;component div is-分頻發(fā)音模塊port(clk_in : in std_logic; tone : in integer range 0 to 2000000; clk_out : out std_logic);end component;signal yin_tmp :std_logic_vector(6 downto 0);signal tone_tmp : integer
58、 range 0 to 2000000;signal clk_tmp : std_logic;beginu1: auto port map (clk_in=>clk,auto=>auto_in,yin_in=>yin,yin_out=>yin_tmp,clear=>clear,auto1=>auto1);u2: seletone port map (highlow=>highlow,yin=>yin_tmp,tone=>tone_tmp); u3: shuma port map (duan=>duan,cat=>cat,yin=>yin_tmp,clk_in=>c
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 偏關(guān)輔警考試題庫(kù)2025含答案
- 2025年四川成都人民網(wǎng)分公司招聘考試筆試試題(含答案)
- 老年護(hù)理跌倒課件
- 老年護(hù)理學(xué)臨終護(hù)理課件
- 倉(cāng)儲(chǔ)租賃及倉(cāng)儲(chǔ)信息化服務(wù)合同
- 車輛股權(quán)轉(zhuǎn)讓與配套配件銷售及售后服務(wù)合同
- 生態(tài)草場(chǎng)使用權(quán)轉(zhuǎn)讓與維護(hù)合同
- 財(cái)務(wù)顧問(wèn)綜合管理與專業(yè)培訓(xùn)合同
- 木材車隊(duì)運(yùn)輸管理協(xié)議
- 金融機(jī)構(gòu)財(cái)務(wù)人員擔(dān)保及信用擔(dān)保合同
- 2025年廣西中考語(yǔ)文試題卷(含答案)
- 江蘇省南通市2024-2025學(xué)年高二下學(xué)期6月期末質(zhì)量監(jiān)測(cè)政治試題(含答案)
- 電工廠搬遷方案(3篇)
- 一級(jí)醫(yī)院醫(yī)保管理制度
- 2025年南京市中考數(shù)學(xué)真題試卷
- 老年人眼科疾病
- 鋼板配送設(shè)計(jì)方案(3篇)
- 2025年呼倫貝爾農(nóng)墾集團(tuán)有限公司招聘筆試參考題庫(kù)含答案解析
- 2025年重慶市中考數(shù)學(xué)試卷真題(含標(biāo)準(zhǔn)答案)
- 2025年內(nèi)蒙古煤炭地質(zhì)勘查(集團(tuán))一零九有限公司招聘筆試參考題庫(kù)含答案解析
- 中醫(yī)基礎(chǔ)學(xué)課件護(hù)理情志
評(píng)論
0/150
提交評(píng)論