01.zip

  • 御厨
    了解作者
  • VHDL
    开发工具
  • 170KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2019-05-09 10:28
    上传日期
eda建议数字钟设计,实现普通的计时和分频功能
01.zip
  • 01.pdf
    193.6KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6259b23492dc900e62bf8693/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6259b23492dc900e62bf8693/bg1.jpg"><div class="c x0 y1 w2 h0"><div class="t m0 x1 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#12304;<span class="ff2">&#20363;</span></div><div class="t m0 x2 h3 y3 ff3 fs0 fc0 sc0 ls0 ws0">8.1-1</div><div class="t m0 x3 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#12305;</div><div class="t m0 x4 h4 y4 ff4 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x5 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#22522;&#20110;</div><div class="t m0 x6 h4 y4 ff4 fs0 fc1 sc0 ls0 ws0">V<span class="_ _0"></span>erilog<span class="fc0"> <span class="_ _1"></span>HDL</span></div><div class="t m0 x7 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#30340;&#31616;&#26131;&#25968;&#23383;&#38047;&#35774;&#35745;<span class="_ _1"></span>&#21442;&#32771;&#20195;&#30721;</div><div class="t m0 x8 h5 y4 ff5 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x9 h5 y5 ff5 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 xa h6 y6 ff6 fs1 fc0 sc0 ls0 ws0">//<span class="ff1">&#25968;&#23383;&#38047;&#39030;&#23618;&#25991;&#20214;</span> </div><div class="t m0 xa h7 y7 ff6 fs1 fc0 sc0 ls0 ws0">module count_top( </div><div class="t m0 xa h7 y8 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>input clk,rst, </div><div class="t m0 xa h7 y9 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>output [6:0]seg, </div><div class="t m0 xa h7 ya ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>output [7:0]an </div><div class="t m0 xa h7 yb ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>); </div><div class="t m0 xa h7 yc ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire clk_1s; </div><div class="t m0 xa h6 yd ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>clk_1s U1(.clk(clk),.rst(rst),.clk_1s(clk_1s)); <span class="fc1">//<span class="ff1">&#20135;&#29983;<span class="_ _3"> </span></span>1<span class="_ _3"> </span><span class="ff1">&#31186;&#20449;&#21495;</span></span> </div><div class="t m0 xa h7 ye ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire cout_s; </div><div class="t m0 xa h7 yf ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire [9:0] bcd_s; </div><div class="t m0 xa h7 y10 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>bcd_counter </div><div class="t m0 xa h7 y11 ff6 fs1 fc0 sc0 ls0 ws0">U2_s(.clk(clk),.rst(rst),.cin(clk_1s),.bcd(bcd_s),.cout <span class="_ _4"> </span>(cout_s)); <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span><span class="fc2 sc0"> </span></div><div class="t m0 xa h6 y12 ff6 fs1 fc1 sc0 ls0 ws0">//<span class="ff1">&#23454;&#29616;&#31186;&#35745;&#25968;</span><span class="fc0"> </span></div><div class="t m0 xa h7 y13 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire cout_m; </div><div class="t m0 xa h7 y14 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire [9:0] bcd_m; </div><div class="t m0 xa h7 y15 ff6 fs1 fc0 sc0 ls0 ws0">bcd_counter U2_m(.clk(clk),.rst(rst),.cin(cout_s),.bcd(bcd_m),.cout <span class="_ _2"></span> </div><div class="t m0 xa h6 y16 ff6 fs1 fc0 sc0 ls0 ws0">(cout_m)); <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _0"></span><span class="fc1">//<span class="ff1">&#23454;&#29616;&#20998;&#35745;&#25968;<span class="_ _5"></span></span><span class="fc0"> </span></span></div><div class="t m0 xa h7 y17 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>wire [9:0] bcd_h; </div><div class="t m0 xa h7 y18 ff6 fs1 fc0 sc0 ls0 ws0">bcd_counter <span class="_ _6"> </span>#(.N(24)) </div><div class="t m0 xa h7 y19 ff6 fs1 fc0 sc0 ls0 ws0">U2_h(.clk(clk),.rst(rst),.cin(cout_m),.bcd(bcd_h), </div><div class="t m0 xa h6 y1a ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span>.cout())<span class="_ _5"></span>; <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span><span class="fc1">//<span class="ff1">&#23454;&#29616;&#26102;&#35745;&#25968;<span class="_ _5"></span></span><span class="fc0"> </span></span></div><div class="t m0 xa h7 y1b ff6 fs1 fc0 sc0 ls0 ws0">dis<span class="_ _1"></span>pl<span class="_ _1"></span>a<span class="_ _1"></span>y </div><div class="t m0 xa h7 y1c ff6 fs1 fc0 sc0 ls0 ws0">U3(<span class="_ _1"></span>.c<span class="_ _1"></span>l<span class="_ _1"></span>k(c<span class="_ _1"></span>l<span class="_ _1"></span>k)<span class="_ _1"></span>,.<span class="_ _1"></span>rs<span class="_ _1"></span>t(<span class="_ _1"></span>rs<span class="_ _1"></span>t)<span class="_ _1"></span>,.<span class="_ _1"></span>bc<span class="_ _1"></span>d_<span class="_ _1"></span>s(<span class="_ _1"></span>bc<span class="_ _1"></span>d<span class="_ _1"></span>_s)<span class="_ _1"></span>,<span class="_ _1"></span>.bc<span class="_ _1"></span>d<span class="_ _1"></span>_m<span class="_ _1"></span>(bc<span class="_ _2"></span>d_m)<span class="_ _1"></span>,.<span class="_ _1"></span>bc<span class="_ _1"></span>d_<span class="_ _1"></span>h(<span class="_ _1"></span>bc<span class="_ _2"></span>d_h)<span class="_ _1"></span>,<span class="_ _1"></span> </div><div class="t m0 xa h6 y1d ff6 fs1 fc0 sc0 ls0 ws0">.an(an),.seg(seg)); <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span><span class="fc1">//<span class="ff1">&#25968;&#23383;&#38047;&#26174;&#31034;</span><span class="fc0"> </span></span></div><div class="t m0 xa h7 y1e ff6 fs1 fc0 sc0 ls0 ws0">endmodule </div><div class="t m0 xa h6 y1f ff6 fs1 fc0 sc0 ls0 ws0">//<span class="ff1">&#20135;&#29983;<span class="_ _3"> </span></span>1<span class="_ _3"> </span><span class="ff1">&#31186;&#20449;&#21495;</span> </div><div class="t m0 xa h7 y20 ff6 fs1 fc0 sc0 ls0 ws0">module clk_1s #(parameter N = 99_999999)( </div><div class="t m0 xa h7 y21 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>input clk,rst, </div><div class="t m0 xa h7 y22 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>output reg clk_1s </div><div class="t m0 xa h7 y23 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>); </div><div class="t m0 xa h7 y24 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>reg [31:0]count; </div><div class="t m0 xa h7 y25 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>always@(posedge clk,posedge rst)begin </div><div class="t m0 xa h7 y26 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>if(rst) </div><div class="t m0 xa h7 y27 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>count &lt;= 0; </div><div class="t m0 xa h7 y28 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>else begin <span class="_ _2"></span> </div><div class="t m0 xa h7 y29 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>clk_1s &lt;= 0; </div><div class="t m0 xa h7 y2a ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>if(count &lt; N) </div><div class="t m0 xa h7 y2b ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>count &lt;= count + 1; </div><div class="t m0 xa h7 y2c ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>else begin </div><div class="t m0 xa h7 y2d ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>count &lt;= 0; </div><div class="t m0 xa h7 y2e ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>clk_1s &lt;= 1; </div><div class="t m0 xa h7 y2f ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span><span class="ls1"> <span class="ls0">end <span class="_ _2"></span> </span></span></div><div class="t m0 xa h7 y30 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>end <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _2"></span> </div><div class="t m0 xa h7 y31 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>end </div><div class="t m0 xa h7 y32 ff6 fs1 fc0 sc0 ls0 ws0">endmodule </div><div class="t m0 xa h6 y33 ff6 fs1 fc0 sc0 ls0 ws0">//<span class="ff1">&#40664;&#35748;<span class="_ _3"> </span></span>BCD<span class="_ _3"> </span><span class="ff1">&#30721;&#26174;&#31034;&#30340;<span class="_ _3"> </span></span>60<span class="_ _7"> </span><span class="ff1">&#36827;&#21046;&#35745;&#25968;&#22120;</span> </div><div class="t m0 xa h7 y34 ff6 fs1 fc0 sc0 ls0 ws0">module bcd_counter #(parameter N=60)( </div><div class="t m0 xa h7 y35 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>input clk,rst, </div><div class="t m0 xa h7 y36 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>input cin, </div><div class="t m0 xa h7 y37 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>output [9:0]bcd, </div><div class="t m0 xa h7 y38 ff6 fs1 fc0 sc0 ls0 ws0"> <span class="_ _0"></span> <span class="_ _2"></span> <span class="_ _0"></span> <span class="_ _2"></span>output cout </div></div></div><div class="pi" data-data='{"ctm":[1.611792,0.000000,0.000000,1.611792,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • 数字时钟11.zip
      通过multisim实现数字时钟的硬件设计,并实现仿真结果,从而实现时钟的功能
    • MFC数字时钟.zip
      利用MFC编写的数字时钟程序,亲测可用。
    • java数字时钟
      Java编写的时钟程序,该时钟为数字时钟可以显示出系统的当前时间,该代码完全正确,欢迎大家下载使用。
    • MFC数字时钟
      利用MFC制作简单的数字时钟,C/C++
    • 自制数字时钟
      c#自制数字时钟,给初学者学习一下,还是蛮实用的哦
    • Windows数字时钟
      一个用Windows API开发的数字时钟,效果非常好
    • 数字钟VHDL
      数字钟VHDL软件设计,包含多种功能,报时,12,24切换,调时
    • 数字时钟.zip
      基于Labview图形编程开发的小代码数字时钟。
    • 数字钟.rar
      基于Multisim 555定时器 24进制数字时钟 时分秒
    • 数字钟.zip
      闹钟正常的计数和定时,并且有进位,并在数码管上显示