library ieee;--notetabs程序
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity notetabs is
port(clk:in std_logic;
toneindex:out std_logic_vector(3 downto 0));
end;
architecture one of notetabs is
component music1_rom
end;
library ieee;-- tonetaba程序
use ieee.std_logic_1164.all;
entity tonetaba is
port(index:in std_logic_vector(3 downto 0);
code:out std_logic_vector(3 downto 0);
high:out std_logic;
tone:out std_logic_vector(10 downto 0));
end;
architecture one of tonetaba is
begin
search:process(index)
;
when "1100"=>tone<="11001010110"; code<="0101";high<='0';
when "1101"=>tone<="11010000100"; code<="0110";high<='0';
when "1111"=>tone<="11011000000"; code<="0001";high<='0';
when others=>null;
end case;
end process;
end;