2022年数字跑表VerilogHDL程序 2.pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《2022年数字跑表VerilogHDL程序 2.pdf》由会员分享,可在线阅读,更多相关《2022年数字跑表VerilogHDL程序 2.pdf(4页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数字跑表 VerilogHDL 程序顶层模块module paobiao(CLK,CLR,PAUSE,CLK,CLK1); input CLK,CLK1; / 100Hz 基准时钟, 1kHz 数码管扫描时钟input CLR, PAUSE; output3:0 MSH,MSL,SH,SL,MH,ML; reg3:0 MSH,MSL,SH,SL,MH,ML; wire3:0 dec_in; jishi jishi(CLK,CLR,PAUSE,MSH,MSL,SH,SL,MH,ML); count10 count10(CLK,CLK1); decode4_7 decode4_7(decodeou
2、t,dec_in); segscan segscan(dec_in,MSL,MSH,SL,SL,ML,MH); endmodule 时基分频器模块module count10(CLK,CLK1); input CLK1; output CLK; reg4:0 qout; always (posedge CLK1) begin if(qout9) qout=qout+1; else qout=0; end assign CLK=(qout=9)?1:0; endmodule reg CLK1; reg 4:0qunt; always (posedge CLK or negedge RST) /异
3、步清零begin if(rst) begin qunt=5d0; end else if(qunt=5d9) begin qunt=5d0; end else begin qunt=qunt+1b1; end end wire CLK1; assign CLK1=qunt4; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 4 页 - - - - - - - - - 计时器模块/*信号定义CLK:时钟信号;CLR:异步复位信号;PAUSE:暂停/启动信号;MSH,MSL:
4、百分秒的高位和低位;SH,SL:秒信号的高位和低位;MH,ML:分钟信号的高位和低位。*/ module jishi(CLK,CLR,PAUSE,MSH,MSL,SH,SL,MH,ML); input CLR, CLK, PAUSE; output3:0 MSH,MSL,SH,SL,MH,ML; reg3:0 MSH,MSL,SH,SL,MH,ML; reg cn1,cn2; /cn1 为百分秒向秒的进位, cn2为秒向分的进位/*百分秒计数进程,每计满100,cn1产生一个进位 1* always(posedge CLK or posedge CLR) begin if(CLR) begin
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年数字跑表VerilogHDL程序 2022 数字 跑表 VerilogHDL 程序
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内