ImageVerifierCode 换一换
格式:PPT , 页数:38 ,大小:1MB ,
资源ID:13739102      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/13739102.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(基于VHDL的电子表设计.ppt)为本站上传会员【xrp****65】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

基于VHDL的电子表设计.ppt

1、单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,单击此处编辑母版标题样式,基于,VHDL,的电子表设计,邢安安,目录,电子表的系统分析和设计,计时器,状态机,闹钟寄存器,4,1,2,3,电子表顶层电路的实现,6,铃声管理模块,5,电子表的系统分析和设计,设计要求:,设计一个电子表,可以用于显示时间丶设定闹钟和整点报时。电子表的输入设备是一个,44,的编码键盘,输出设备是用于显示的,6,位,LED,数码管丶若干,LED,指示灯以及蜂鸣器。,电子表的系统分析和设计,.,开启或关闭整点报时和闹钟,.,设置闹铃时间,在电子表计时状态下按下设置闹钟键(键),进入设定闹钟时间状态。其他操作

2、与校时操作流程一样。,每按一下整点报时开关键,(键),整点报时状态改变,每按一下闹钟开关键(键),闹钟状态改变,LED,指示灯:,计时状态,显示当前时间;,校时和设闹状态,显示输入,时间,用于界面设计,.,校时操作,在电子表计时状态下按校,时键(键)进入校时状,态,使用数字键输入新,的时间并按下确认键(键,),在校时状态下任何时刻按下取消键(键)可退出校时状态,Your Text,Your Text,Your Text,Your Text,电子表的系统分析和设计,Your Text,Your Text,Your Text,Your Text,闹钟时,间寄存器,计时器,铃声管理,系统结构和模块划

3、分,Your Text,Your Text,状态机,计时器,分频器,时间计数的频率为,1Hz,,而外部晶振频率为,1MHz,所以需要,1M,分频计数器,计数器,时间计数器的目的是为了得到时间输出,因此需要每秒技术一次。,状态机,状态机模块是电子表的控制器,它给出其他模块的时序。状态机的输入信号是键盘模块的输出信号,keyvalue,keypressed,和,functionkey,。状态机的输出信号是缓存时间信号,buffertime,闹钟时间加载信号,alarmload,,计时器时间加载信号,timeload,,闹钟开关状态,alarmom,和整点报时开关状态,houralarmon,。,T

4、ime,是由用户通过键盘输入的时间信号,可以送给闹钟寄存器和计时器。,状态机包括两部分:,1.,用于产生缓存时间信号,buffertime,,闹钟时间加载信号,alarmload,和计时器时间加载信号,timeload,,称这部分状态机为校时和设闹状态机。,2.,用于产生闹钟开关状态信号,alarmon,和整点报时开关状态信号,houralarmom,,称为闹钟和整点报时开关状态机。,闹钟和整点报时状态机,Text in,here,Text in,here,Text in,here,每按一下整点报时开关键(,C-1100,),整点报时的状态改变一次;,每按一下闹钟开关键(,D-1101,),闹

5、钟的状态改变一次。,闹钟和整点报时状态机,闹钟寄存器,闹钟寄存器是一个带有并行加载功能的寄存器。其中,clk,是全局时钟,,buffertime,是并行加载的数据输入,,alarmload,为并行加载的控制输入,,alarmtime,为寄存器的输出。,Title in here,Title in here,Title in here,Title in here,A,B,C,D,铃声管理模块,闹钟铃声,状态机,Alarm time=,time,S0/0,S4/1,S2/0,S1/0,S3/1,Time(6)=1,Time(6)=0,Time(6)=1,Time(6)=0,alarmon,=0,电

6、子表顶层电路的实现,闹钟和整点报时状态机,校时和设闹状态机,闹钟寄存器,计时器,校时和设闹输出,闹铃管理模块,Contents,Contents,Contents,Contents,顶层文件,采用元件例化的方法将各个模块连接起来,组成电子表系统,顶层程序,library,ieee,;,use ieee.std_logic_1164.all;,use,ieee.std_logic_arith.all,;,entity,clock_top,is,port(,clk,keypressed,functionkey:in,std_logic,;,keyvalue:in,std_logic_vector(

7、3,downto,0);,displaytime:out,std_logic_vector(23,downto,0);,alarm_signal:out,std_logic,;,alarmon,houralarmon:buffer,std_logic,);,end,clock_top,;,architecture,rt,of,clock_top,is,component,statemachine,port(,clk,keypressed,functionkey:in,std_logic,;,keyvalue:in,std_logic_vector(3,downto,0);,iscount,al

8、armload,timeload:out,std_logic,;,buffertime:buffer,std_logic_vector(23,downto,0),);,end component;,component statemachine2,port(,clk,keypressed:in,std_logic,;,keyvalue:in,std_logic_vector(3,downto,0);,alarmon,houralarmon:out,std_logic,);,end component;,component counter,port(,clk,load:in,std_logic,;

9、buffertime,:in std_logic_vector(23,downto,0);,time:out,std_logic_vector(23,downto,0),);,end component;,component,alarmreg,port(,clk,alarmload:in,std_logic,;,buffertime:in,std_logic_vector(23,downto,0);,alarmtime:out,std_logic_vector(23,downto,0),);,end component;,component bell,port(,clk,houralarmo

10、n,alarmon:in,std_logic,;,alarmtime,time:in,std_logic_vector(23,downto,0);,alarm_signal:out,std_logic,);,end component;,signal buffertime,time,alarmtime:std_logic_vector(23,downto,0);,signal,iscount,alarmload,timeload:std_logic,;,begin,sm1:statemachine,port,map(clk,keypressed,functionkey,keyvalue,isc

11、ount,alarmload,timeload,buffertime,);,sm2:statemachine2,port,map(clk,keypressed,keyvalue,alarmon,houralarmon,);,cnt:counter,port,map(clk,timeload,buffertime,time,);,reg:alarmreg,port,map(clk,alarmload,buffertime,alarmtime,);,bl:bell,port,map(clk,houralarmon,alarmon,alarmtime,time,alarm_signal,);,pro

12、cess(iscount,time,buffertime,),begin,if(iscount,=1)then,displaytime,=time;,else,displaytime,=,buffertime,;,end if;,end process;,end,rt,;,计数器程序(,1,),library,ieee,;,use ieee.std_logic_1164.all;,use,ieee.std_logic_arith.all,;,use,ieee.std_logic_unsigned.all,;,entity counter is,port(,clk,load:in,std_log

13、ic,;,buffertime:in,std_logic_vector(23,downto,0);,time:out,std_logic_vector(23,downto,0),);,end counter;,architecture,rt,of counter is,component divider_1m,port(,clk:in,std_logic,;,clk1s:out,std_logic,);,end component;,signal clk1s:std_logic;,signal time_sig:std_logic_vector(23,downto,0);,begin,u1:d

14、ivider_1m port map(clk,clk1s);,process(clk1s,clk),begin,if(clkevent,and,clk,=1)then,if(load,=1)then,time_sig,=,buffertime,;,else,if(clk1s=1)then,if(time_sig(3,downto,0)=1001)then,time_sig(3,downto,0)=0000;,if(time_sig(7,downto,4)=0101)then,time_sig(7,downto,4)=0000;,if(time_sig(11,downto,8)=1001)the

15、n,time_sig(11,downto,8)=0000;,if(time_sig(15,downto,12)=0101)then,time_sig(15,downto,12)=0000;,if(time_sig(23,downto,16)=00001001)then,time_sig(23,downto,16)=00010000;,elsif(time_sig(23,downto,16)=00011001)then,time_sig(23,downto,16)=00100000;,else,time_sig(23,downto,16)=time_sig(23,downto,16)+1;,en

16、d if;,else,time_sig(15,downto,12)=time_sig(15,downto,12)+1;,end if;,else,time_sig(11,downto,8)=time_sig(11,downto,8)+1;,end if;,else,time_sig(7,downto,4)=time_sig(7,downto,4)+1;,end if;,else,time_sig(3,downto,0)=time_sig(3,downto,0)+1;,end if;,end if;,end if;,end if;,end process;,time=,time_sig,;,en

17、d,rt,;,library,ieee,;,use ieee.std_logic_1164.all;,use,ieee.std_logic_arith.all,;,entity divider_1m is,port(,clk:in,std_logic,;,clk1s:out,std_logic,);,end divider_1m;,architecture rt1 of divider_1m is,signal,cnt:integer,range 0 to 999999;,begin,process(clk,),begin,if(clkevent,and,clk,=1)then,if(cnt,

18、cnthigh)then,cnt,=0;,clk1s=1;,else,cnt,=cnt+1;,clk1s=0;,end if;,end if;,end process;,end rt1;,计数器程序(,2,),闹钟和整点报时,library,ieee,;,use ieee.std_logic_1164.all;,use,ieee.std_logic_arith.all,;,use,ieee.std_logic_unsigned.all,;,entity statemachine2 is,port(,clk,keypressed:in,std_logic,;,keyvalue:in,std_

19、logic_vector(3,downto,0);,alarmon,houralarmon:out,std_logic,);,end statemachine2;,architecture,rt,of statemachine2 is,type state,is(s_off,s_on,);,signal,ps_alarmon,ns_alarmon,ps_houralarmon,ns_houralarmon:state,:=,s_off,;,begin,process(clk,),begin,if(clkevent,and,clk,=1)then,ps_alarmon,=,ns_alarmon,

20、ps_houralarmon,=,ns_houralarmon,;,end if;,end process;,process(ps_alarmon,keypressed,keyvalue,),begin,if(ps_alarmon,=,s_on)then,if(keypressed,=1and,keyvalue,=1101)then,ns_alarmon,=,s_off,;,else,ns_alarmon,=,ps_alarmon,;,end if;,alarmon,=1;,else,if(keypressed,=1and,keyvalue,=1101)then,ns_alarmon,=,

21、s_on,;,else,ns_alarmon,=,ps_alarmon,;,end if;,alarmon,=0;,end if;,end process;,process(ps_houralarmon,keypressed,keyvalue,),begin,if(ps_houralarmon,=,s_on)then,if(keypressed,=1and,keyvalue,=1100)then,ns_houralarmon,=,s_off,;,else,ns_houralarmon,=,ps_houralarmon,;,end if;,houralarmon,=1;,else,if(keyp

22、ressed,=1and,keyvalue,=1100)then,ns_houralarmon,=,s_on,;,else,ns_houralarmon,=,ps_houralarmon,;,end if;,houralarmon,=0;,end if;,end process;,end,rt,;,闹钟寄存器,library,ieee,;,use ieee.std_logic_1164.all;,entity,alarmreg,is,port(,clk,alarmload:in,std_logic,;,buffertime:in,std_logic_vector(23,downto,0);,a

23、larmtime:out,std_logic_vector(23,downto,0),);,end,alarmreg,;,architecture,rt,of,alarmreg,is,begin,process(clk,),begin,if(clkevent,and,clk,=1)then,if(alarmload,=1)then,alarmtime,=,buffertime,;,end if;,end if;,end process;,end,rt,;,铃声管理,library,ieee,;,use ieee.std_logic_1164.all;,entity bell is,port(,

24、alarmtime,time:in,std_logic_vector(23,downto,0);,alarmon,houralarmon,clk:in,std_logic,;,alarm_signal:out,std_logic,);,end bell;,architecture,rt,of bell is,signal,alarm,houralarm:std_logic,;,type state is(s0,s1,s2,s3,s4);,signal,present_state,next_state:state,:=s0;,begin,process(clk,alarmon,),begin,i

25、f(alarmon,=0)then,present_state,=s0;,elsif(clkevent,and,clk,=1)then,present_state,if(alarmtime,=,time)then,next_state,=s1;,else,next_state,if(time(6)=1)then,next_state,=s2;,else,next_state,if(time(6)=0)then,next_state,=s3;,else,next_state,if(time(6)=1)then,next_state,=s4;,else,next_state,If(time(6)=

26、0)then,next_state,=s0;,else,next_state,next_state,=s0;,end case;,end process;,process(present_state,),begin,if(present_state,=s3 or,present_state,=s4)then,alarm=1;,else,alarm=0;,end if;,end process;,process(houralarmon,time,),begin,if(houralarmon,=1and time(15,downto,0)=0000000000000000)then,hourala

27、rm,=1;,else,houralarm,=0;,end if;,end process;,alarm_signal,=alarm or,houralarm,;,end,rt,;,状态机,library,ieee,;,use ieee.std_logic_1164.all;,use,ieee.std_logic_arith.all,;,entity,statemachine,is,port(,clk,keypressed,functionkey:in,std_logic,;,keyvalue:in,std_logic_vector(3,downto,0);,buffertime:buffer

28、std_logic_vector(23,downto,0);,iscount,alarmload,timeload:out,std_logic,);,end,statemachine,;,architecture,rt,of,statemachine,is,type state is(count,modifytime1,modifytime2,modifytime3,modifytime4,modifytime5,modifytime6,modifytime7,loadtime,setalarm1,setalarm2,setalarm3,setalarm4,setalarm5,setalar

29、m6,setalarm7,loadalarm);,signal,present_state,next_state:state,:=count;,signal time_temp:std_logic_vector(23,downto,0);,begin,process(clk,),begin,if(clkevent,and,clk,=1)then,present_state,if(keypressed,=1and,keyvalue,=1110)then,next_state,=modifytime1;,elsif(keypressed,=1and,keyvalue,=1111)then,next

30、state,=setalarm1;,else,next_state,=,present_state,;,end if;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0010)then,next_state,=modifytime2;,time_temp(23,downto,20)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,ke

31、yvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,functionkey,=0and,time_temp(23,downto,20)=0001)then,next_state,=modifytime3;,time_temp(19,downto,16)=,keyvalue,;,elsif(keypressed,=1and,keyvalue,=0011and,time_temp(23,downto,20)=0010)then,next_state,=modifytime3;,time_temp(19,downto,16)=,ke

32、yvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0101)then,next_state,=modifytime4;,time_temp(15,downto,12)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,

33、next_state,=count;,elsif(keypressed,=1and,functionkey,=0)then,next_state,=modifytime5;,time_temp(11,downto,8)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0101)then,next_state,=modifytime6;,time_te

34、mp(7,downto,4)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,functionkey,=0)then,next_state,=modifytime7;,time_temp(3,downto,0)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyv

35、alue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=1010)then,next_state,=,loadtime,;,else,next_state,=,present_state,;,end if;,time_temp,next_state,=count;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0010)then,next_state,=set

36、alarm2;,time_temp(23,downto,20)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,functionkey,=0and,time_temp(23,downto,20)=0001)then,next_state,=setalarm3;,time_temp(19,downto,16)=,keyvalue,;,elsif(keypressed,=1

37、and,keyvalue,=0011and,time_temp(23,downto,20)=0010)then,next_state,=setalarm3;,time_temp(19,downto,16)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0101)then,next_state,=setalarm4;,time_temp(15,dow

38、nto,12)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,functionkey,=0)then,next_state,=setalarm5;,time_temp(11,downto,8)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=10

39、11)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=0101)then,next_state,=setalarm6;,time_temp(7,downto,4)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,functionkey,=0)then,next_state,=setalarm7;,time

40、temp(3,downto,0)=,keyvalue,;,else,next_state,=,present_state,;,time_temp,if(keypressed,=1and,keyvalue,=1011)then,next_state,=count;,elsif(keypressed,=1and,keyvalue,=1010)then,next_state,=,loadalarm,;,else,next_state,=,present_state,;,end if;,time_temp,next_state,=count;,time_temp,next_state,=count;

41、time_temp,=,time_temp,;,end case;,end if;,end process;,buffertime,=,time_temp,;,process(present_state,),begin,if(present_state,=,count)then,iscount,=1;,else,iscount,=0;,end if;,if(present_state,=,loadtime)then,timeload,=1;,else,timeload,=0;,end if;,if(present_state,=,loadalarm)then,alarmload,=1;,else,alarmload,=0;,end if;,end process;,end,rt,;,

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服