?? music.vhd
字號(hào):
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity music is
port(reset:in std_logic; --重置
clk:in std_logic; --1MHz
clk_5:in std_logic; --5hz
music_begin:in std_logic; --音樂開始
mus:out std_logic); --蜂鳴輸出
end music
;
architecture body_music of music is
component pulse --發(fā)聲模塊
port(clk:in std_logic; --1MHz
count:in integer range 0 to 1300; --發(fā)生控制
mus:out std_logic); --音樂輸出
end component;
component table --樂譜模塊
port(reset:in std_logic; --重置
clk_5:in std_logic; --5hz
music_begin:in std_logic; --音樂開始
count:out integer range 0 to 1300); --發(fā)生控制
end component;
signal count :integer range 0 to 1300;
begin
u1:table port map(reset=>reset,clk_5=>clk_5,music_begin=>music_begin,count=>count);
u2:pulse port map(clk=>clk,count=>count,mus=>mus);
end body_music;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -