名称:音乐播放器设计Verilog代码Quartus仿真
软件:Quartus
语言:Verilog
代码功能:
音乐播放器
使用蜂鸣器播放一首歌曲,歌曲名为茉莉花。
FPGA代码Verilog/VHDL代码资源下载:www.hdlcode.com
演示视频:
设计文档:
1、工程文件

2、程序文件


3、程序编译
4、RTL图

5、仿真图
整体仿真图




频率控制模块


音乐控制模块


部分代码展示:
//音乐播放器 module music(sysclk,stop_key,start_key,led, spkout); input sysclk;//50M晶振 input stop_key;//reset input start_key;//开始 output spkout;//蜂鸣器输出 output led;//指示灯 wire [9:0] tonestep; wire [7:0] tonecode; wire [3:0] music_num; //调用频率控制字产生模块 musicdec u_musicdec ( .tonecode(tonecode),//输入简谱 .tonestep(tonestep)//输出频率控制字 ); //音乐控制模块 music_ctrl i_music_ctrl( .sysclk(sysclk), .start_key(start_key), .stop_key(stop_key),
点击链接获取代码文件:http://www.hdlcode.com/index.php?m=home&c=View&a=index&aid=1521
阅读全文
878