下载此文档

VHDL电子琴程序设计与仿真.doc


文档分类:通信/电子 | 页数:约6页 举报非法文档有奖
1/6
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/6 下载此文档
文档列表 文档介绍
程序设计与仿真电子琴 VHDL 程序包含有:顶层程序、音阶发生器程序、数控分频模块程序和自动演奏模块程序。 (1) 顶层 VHDL 程序-- 文件名: top .vhd -- 功能: 顶层文件 library IEEE; use ; use ; use ; entity top is Port ( clk32MH z :in std_logic; --32MHz 系统时钟 handTOauto : in std_logic; -- 键盘输入/ 自动演奏 code1 :out std_logic_vector(6 downto 0); -- 音符显示信号 index1 :in std_logic_vector(7 downto 0); -- 键盘输入信号 high1 :out std_logic; -- 高低音节信号 spkout :out std_logic); -- 音频信号 end top; architecture Behavioral of top ponent automusic Port ( clk :in std_logic; Auto: in std_logic; index2:in std_logic_vector(7 downto 0); index0 : out std_logic_vector(7 downto 0)); ponent; component tone Port ( index : in std_logic_vector(7 downto 0); code : out std_logic_vector(6 downto 0); high : out std_logic; tone0 : out integer range 0 to 2047); ponent; component speaker Port ( clk1 : in std_logic; tone1 : in integer range 0 to 2047; spks : out std_logic); ponent; signal tone2: integer range 0 to 2047; signal indx:std_logic_vector(7 downto 0); begin u0:automusic port map(clk=>clk32MHZ,index2=>index1,index0=>indx,Auto=>handtoAuto); u1: tone port map(index=>indx,tone0=>tone2,code=>code1,high=>high1); u2: speaker port map(clk1=>clk32MHZ,tone1=>tone2,spks=>spkout); end Behavioral; (2 )仿真顶层文件仿真图如图 所示。图 顶层文件仿真图 (1) 音阶发生器 VHDL 程序-- 文件名: 。-- 功能: library IEEE; use

VHDL电子琴程序设计与仿真 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数6
  • 收藏数0 收藏
  • 顶次数0
  • 上传人yzhlya
  • 文件大小0 KB
  • 时间2016-04-12