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

📄 tonetaba.vhd

📁 几个VHDL实现的源程序及其代码
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;

entity tonetaba is
port(
     index :  in std_logic_vector(7 downto 0);
     code  : out integer range 0 to 15;
     tone  : out integer range 0 to 16#7ff#);  --"2047";
end;

architecture behav of tonetaba is
begin
search:process(index)
begin
case index is
when "00110000"=>tone<=2047;  code<=0;
WHEN "00110001"=>tone<=1570;  code<=1;    --"H1";
when "00110010"=>tone<=1622;  code<=2;    --"H2";
WHEN "00110011"=>tone<=1669;  code<=3;    --"H3";
when "00110100"=>tone<=1690;  code<=4;    --"H4";
WHEN "00110101"=>tone<=1729;  code<=5;    --"H5";
when "00110110"=>tone<=1764;  code<=6;    --"H6";
when "00110111"=>tone<=1795;  code<=7;    --"H7";
when others=>tone<=2047;  code<=0;
end case;
end process;
end behav;

⌨️ 快捷键说明

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