完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
times New="New" Roman'">电子琴程序设计与仿真 顶层程序与仿真,音阶发生器程序与仿真,数控分频模块程序与仿真,自动演奏模块程序与仿真设计例见随书所附光盘中文件:8.17电子琴VHDL程序与仿真。 1.顶层程序与仿真 (1)顶层VHDL程序 --文件名:top.vhd --功能:顶层文件 --最后修改日期:2004.3.20 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity top is Port ( clk32MHz :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 is component 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)); end component; 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); end component; component speaker Port ( clk1 : in std_logic; tone1 : in integer range 0 to 2047; spks : out std_logic); end component; 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);
2LYLjdbT.doc
(107.5 KB, 下载次数: 30
)
|
|
相关推荐
9 个讨论
|
|
NVMe高速传输之摆脱XDMA设计50:主要功能测试结果与分析2 nvmePCIe高速存储
252 浏览 0 评论
NVMe高速传输之摆脱XDMA设计49:主要功能测试结果与分析1
1501 浏览 0 评论
907 浏览 0 评论
855 浏览 0 评论
658 浏览 0 评论
4427 浏览 63 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 10:30 , Processed in 1.027383 second(s), Total 70, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
18354