?? tone.vhd
字號:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity tone is
Port ( index : in std_logic_vector(5 downto 0);
--code : out std_logic_vector(2 downto 0);
tone_out : out integer range 0 to 2047);
end tone;
architecture Behavioral of tone is
begin
process (index)
begin
case index is
when "111110" => tone_out <= 773; --code <= "001";
when "111101" => tone_out <= 912; --code <= "010";
when "111011" => tone_out <= 1036;-- code <= "011";
when "110111" => tone_out <= 1116;-- code <= "100";
when "101111" => tone_out <= 1197; --code <= "101";
when "011111" => tone_out <= 1290; --code <= "110";
when others => tone_out <=2047; --code <= "000";
end case;
end process;
end Behavioral;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -