⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 musicdec.vhd

📁 音乐编辑与播放设计
💻 VHD
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity musicdec is
    Port ( tonecode : in std_logic_vector(7 downto 0);
           tonestep : out std_logic_vector(9 downto 0));
end musicdec;

architecture Behavioral of musicdec is

begin

process(tonecode)
begin
case tonecode is
  when x"00" => tonestep<="00" & x"00";
  when x"01" => tonestep<="00" & x"58";
  when x"02" => tonestep<="00" & x"63";
  when x"03" => tonestep<="00" & x"6f";
  when x"04" => tonestep<="00" & x"75";
  when x"05" => tonestep<="00" & x"84";
  when x"06" => tonestep<="00" & x"94";
  when x"07" => tonestep<="00" & x"a6";
  when x"08" => tonestep<="00" & x"b0";
  when x"09" => tonestep<="00" & x"c5";
  when x"0a" => tonestep<="00" & x"dd";
  when x"0b" => tonestep<="00" & x"ea";
  when x"0c" => tonestep<="01" & x"07";
  when x"0d" => tonestep<="01" & x"27";
  when x"0e" => tonestep<="01" & x"4b";
  when x"0f" => tonestep<="01" & x"5f";	
  when x"10" => tonestep<="01" & x"8a";
  when x"11" => tonestep<="01" & x"ba";
  when x"12" => tonestep<="01" & x"d5";
  when x"13" => tonestep<="10" & x"0e";
  when x"14" => tonestep<="10" & x"4f";
  when x"15" => tonestep<="10" & x"97";
  when others => tonestep<="00" & x"00";
end case;
end process;

end Behavioral;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -