CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 嵌入式/单片机编程 VHDL编程

文件名称:song

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    357.17kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

module song(clk,key,song_out,led)

input [7:0] key

input clk

output song_out

output [7:0] led

reg song_reg

reg [21:0] count

reg [19:0] delay

reg [7:0] key_reg

always @(posedge clk)

begin

count=count+1

if((count==delay)&(!(delay==20 d65535)))

begin

count=22 d0

song_reg=!song_reg

end

end



always @(key)

begin

key_reg=key

case(key_reg)

8 b0000_0001: delay=20 d47774 //zhong yin 1 523.3HZ

8 b0000_0010: delay=20 d42568 //zhong yin 2 587.3HZ

8 b0000_0100: delay=20 d37919 //zhong yin 3 659.3HZ

8 b0000_1000: delay=20 d35791 //zhong yin 4 698.5HZ

8 b0001_0000: delay=20 d31888 //zhong yin 5 784HZ

8 b0010_0000: delay=20 d28409 //zhong yin 6 880HZ

8 b0100_0000: delay=20 d25309 //zhong yin 7 987.8HZ

8 b1000_0000: delay=20 d23889 //gao yin 1 1046.5HZ

default: delay=20 d65535

endcase

end

assign song_out=song_reg

文件: song.rar

大小: 357KB

下载: 下载





assign led=key_reg

endmodule

-module song (clk, key, song_out, led) input [7:0] key input clk output song_out output [7:0] led reg song_reg reg [21:0] count reg [19:0 ] delay reg [7:0] key_reg always @ (posedge clk) begin count = count+1 if ((count == delay )& (!( delay == 20' d65535))) begin count = 22 ' d0 song_reg =! song_reg end end always @ (key) begin key_reg = key case (key_reg) 8' b0000_0001: delay = 20' d47774 // zhong yin 1 523.3HZ 8' b0000_0010: delay = 20' d42568 // zhong yin 2 587.3HZ 8' b0000_0100: delay = 20' d37919 // zhong yin 3 659.3HZ 8' b0000_1000: delay = 20' d35791 // zhong yin 4 698.5HZ 8' b0001_0000: delay = 20' d31888 // zhong yin 5 784HZ 8' b0010_0000: delay = 20' d28409 // zhong yin 6 880HZ 8' b0100_0000: delay = 20' d25309 // zhong yin 7 987.8HZ 8' b1000_0000: delay = 20' d23889 // gao yin 1 1046.5HZ default: delay = 20' d65535 endcase end assign song_out = song_reg file: song.rar Size: 357KB Download: Download
相关搜索: VHDL 784

(系统自动生成,下载前可以参看下载内容)

下载文件列表

song/song.qpf
song/song.qsf
song/db/song.db_info
song/db/song.cmp0.ddb
song/db/song.fit.qmsg
song/db/song.cmp.rdb
song/db/song.cmp.ecobp
song/db/song.(0).cnf.cdb
song/db/song.(0).cnf.hdb
song/db/song.cmp_bb.logdb
song/db/song.asm.qmsg
song/db/song.cbx.xml
song/db/prev_cmp_song.map.qmsg
song/db/prev_cmp_song.fit.qmsg
song/db/song.rtlv.hdb
song/db/song.cmp.hdb
song/db/song.pre_map.hdb
song/db/song.tan.qmsg
song/db/prev_cmp_song.asm.qmsg
song/db/song.rtlv_sg_swap.cdb
song/db/prev_cmp_song.tan.qmsg
song/db/song.pre_map.cdb
song/db/song.sld_design_entry.sci
song/db/prev_cmp_song.qmsg
song/db/song.map.qmsg
song/db/song.map_bb.logdb
song/db/song.eco.cdb
song/db/song.sgdiff.cdb
song/db/song.sgdiff.hdb
song/db/song.sld_design_entry_dsc.sci
song/db/song.cmp.logdb
song/db/song.asm_labs.ddb
song/db/song.rtlv_sg.cdb
song/db/song.map_bb.cdb
song/db/song.map_bb.hdb
song/db/song.map.logdb
song/db/song.map.cdb
song/db/song.map.hdb
song/db/song.map.bpm
song/db/song.cmp.cdb
song/db/song.hif
song/db/song.cmp.tdb
song/db/song.cmp_bb.hdb
song/db/song.hier_info
song/db/song.tis_db_list.ddb
song/db/song.cmp_bb.cdb
song/db/song.cmp.bpm
song/db/song.psp
song/db/song.dbp
song/db/song.pss
song/db/song.signalprobe.cdb
song/db/song.syn_hier_info
song/db/song.map.ecobp
song/db/song.cmp_bb.rcf
song/song.map.summary
song/song.pin
song/song.fit.smsg
song/song.fit.summary
song/song.sof
song/song.pof
song/song.tan.summary
song/song.done
song/song.dpf
song/song.v.bak
song/song.v
song/song.map.rpt
song/song.fit.rpt
song/song.asm.rpt
song/song.tan.rpt
song/song.flow.rpt
song/db
song

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com