文件名称: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
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
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.