📄 tone.txt
字号:
library ieee;
use ieee.std_logic_1164.all;
entity tonetaba1 is
port(index:in integer range 0 to 15;
code:out integer range 0 to 15;
high:out std_logic;
tone:out integer range 0 to 16#7FF#);
end ;
architecture one of tonetaba1 is
begin
search :process(index)
begin
case index is
when 0 =>tone<=2047;code<=0;high<='0';
when 1 =>tone<=773; code<=1;high<='0';
when 2 =>tone<=912; code<=2;high<='0';
when 3 =>tone<=1036;code<=3;high<='0';
when 5 =>tone<=1197;code<=5;high<='0';
when 6 =>tone<=1290;code<=6;high<='0';
when 7 =>tone<=1372;code<=7;high<='0';
when 8 =>tone<=1410;code<=1;high<='1';
when 9 =>tone<=1480;code<=2;high<='1';
when 10 =>tone<=1542;code<=3;high<='1';
when 12 =>tone<=1622;code<=5;high<='1';
when 13 =>tone<=1668;code<=6;high<='1';
when 15 =>tone<=1728;code<=1;high<='1';
when others=>null;
end case;
end process;
end one;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -