/小时数字钟设计顶层图/小时数字钟设计顶层图二、模块和程序、计数器libraryieee;;;tisport(clk:instd_logic;clkout:outstd_logic);t;t:integerrangeto;beginprocess(clk)beginifclk'eventandclk=''t=t<=;t<=cnt+;endif;t<thenclkout<='';elseclkout<='';endif;endif;endprocess;endbav;、去抖模块libraryieee;;;entityyourname_qudouisport(key_in,clk_kHz:instd_logic;key_out:outstd_logic);endyourname_qudou;t:integerrangeto;beginprocess(clk_kHz,key_in)beginifclk_kHz'eventandclk_kHz=''t=t<=;key_out<=key_in;t<=cnt+;endif;endif;endprocess;endbehav;、万年历模块万年历顶层电路图①年月日星期模块libraryieee;;;entityyourname_ymdxisport(preset:instd_logic;co:instd_logic;date:outstd_logic_vector(downto);month,year:outstd_logic_vector(downto);xingqi:outstd_logic_vector(downto));endyourname_ymdx;architecturebavofyourname_ymdxissignalyue:std_logic_vector(downto):="";signalnian:std_logic_vector(downto):="";signalri:std_logic_vector(downto):="";signalxingqi:std_logic_vector(downto):="";t:std_logic_vector(downto):="";signalqm:integerrangeto;beginprocess(yue,nian)begincaseyueiswhen""=>qm<=;when""=>if(nian()='')and(nian()='')thenqm<=;elseqm<=;endif;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;when""=>qm<=;whenothers=>null;endcase;endprocess;process(co,preset,xingqi)beginifpreset=''thenyue<="";nian<="";ri<="";xingqi<="";else ifco'eventandco=''then if(ri=qm)then ri<=""; ifxingqi=""then xingqi<=""; elsexingqi<=xingqi+''; endif; if(yue="")thenyue<="";nian<=nian+''; else yue<=yue+''; endif; elsif(ri<qm)then ri<=ri+''; ifxingqi
基于vhdl时钟设计说明书 来自淘豆网m.daumloan.com转载请标明出处.