




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
可编程逻辑器件实验报告.实验目的掌握数字时钟的设计方法掌握CPLD设计流程,设计60进制计数器,进行仿真同时观察控制效果方案设计与工作原理方案设计共用时钟和复位脉冲,DIVDER进行分频(此处仿真采用2分频,实际实验采用7分频),o_comm进行数码管显示控制,counter控制进制数(本实验采用60进制,各位十进制,十位6进制),encoder进行代码转换,将十进制数转换成相应控制数码管的16进制数,scaner控制4为数码管的输出顺序。如图所示:部分代码调试Counter:beginbegino_dataO 〈二o_data1 <=o_data2 仁o_data3,夺process(i_clkjbeginifi_rst=
ent0
ent1
ent2
■cnt:3elsifi_clkcntO歹ifent0architecturebehaviorofcounteris.signalent0:std_logic_vector(3downto0):signalent1:std_logic_vector^3downto0):signalent2:-std_logic_vector(3downto0);signalent3'::std_logic_vector(3downto0):cntO;ent1:cnt.2;ent3;i_rst)'0, then■.<= "0000";■■<= "OOOO17;<= "0000":<= "0000";theneventandi_clk="1cntO+'I?「then="1001*thencntO<=<0000";ent1<-ent1+'1';ifent1=^0110"thencntl<=^0000"';ent2 ent2+'1';ifent2二lOOKthenent3<=ent3+T;ent2'<=3叩CT;ifent3="DIIT'thenent36"0000*jendif;endif;endif;endif;endif:endprocess:endbehavior:LIBRARYIEEE;USEIEEE.STD_LQGIC_1164.ALL;USEIEEE.STD_LOGIC_ARITH.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL:ENTITYdivderisPORKelkiinstd_logicrst7instd_logicoclk:outstd_logicENDdivder:architecturebehaviorofdidderissignalent:st^logic^vector^Tdoimto0);beginoclk<=ent(7);process(elk,rst)beginifrst='Tthenent<= ^00000000";elsifclk,eventandelk=Tthenent<=ent+'1';endif:endprocess;endbehavior;Encoder:□_dataJ:outstd_logic_vectordowntoUJ);ENDcounter:architecturebehaviorofcounterissignalcntO:d_logic_vector⑨doumto0)signalent1::ptd_].ogic_vector(3doimto0)signalent2:std_logic_vector(Svdownto0)signalent3:std_logic_vector(3doumto0)begino_dataO<cntO;o_datal<ent1:o_data2cnt-2;:o_data3<ent3;process(i_clkbeginifi_rst='CT thenent0<=^OOOO"ent1<= "0000":!ent2<= "0000"cnt3--<="OOOO"/elsifi_clk,eventandi_clk='1’thencntO<=cntO+'1’「ifcntO=T1001"thencntO<=侦皿%ent1<=cntl+,Eifent1="0101'thencntl<="OOOO";ent2目二ent2+T\ifent2-='1001'thenent3在ent3+'1;ent2<="0000":ifent3'="0101thenent3.<="0000";endif;endif;endif;endif:endif;endprocess;endbehavior;Ii=Ic_■ ・nIihir-bIIScanner:USEIEEE.,STD_LOGIC_ARITH.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL:ENTITYscanerisPORT(elk;in泌d_logicrstiinstdlogic;DinO:instdlogic_vector(3downt□0):Dini:instdlogic_yector(3doimt□0)Din2:instdlogic_vector技downt□0)Din3;instdlogic_vector(3downt□0)Dout:out■stdlogic_vector(.3downt□0)Ocomm);:outstdlogic_vector(3downt□0)scarier;architecturebehaviorof-jscaneris^ignalcounter:std_logic_Vectort(ldoimto0);beginprocess.(clkjrst}beginifrst='CTthenOcouun<="1111";elsifclk?eventandelk='1,thencounter<=counter^-'■':casecounteriswhen"如=>Dout:<=DinO:.Ocomm<=Fill";when"OK=>,Dout■.<=Dini:Ocomm<='1110";when"10"=>Dout<=Din2:Qcojiutl<=r110j';whenothers=>Dout<=Din3:Ocomm<=171011endcase:endif;endprocess-;endbehavior:系统实现与结果仿真|於1234.sef-¥aveforaEditor□HSRef[ilOns |[♦[♦ITime:B3.52us ]Interval:[B3.52us ]0.0ns:Name,Valuer1-c10.Ous 20Ous 30.Ous 40.Ous 50.Ous 60.Ous 70.Ous 80.Ous 90Ous 100i i i i i i i i irstelkfWfrniniwmifiimmwuiiwniniiimuuuiwwniniuuiwuuiwmniiiuimwwmmniMnmwnmniiuuiwiwseg_c11o_code[70]HFFFFX3F"3顷㈤(起胞炬X)团匠炬XX顼顼或顷炬JC(或(3FXX3FXW.3FXX3F50团灶X*XJMOOOOO(Xo_data[30]H0_?_^c®o®o®o®o®o®o®o®oso®o®o®o®o(iDO®o®o®oujo®o©s©3©ox»oo®o}oo©owo_comm31uuuu_u_u_Ln_nn_r_LnnnnLnjnr_u_u_u_u_umn_njn_nnnr'o_comm21ni^Lrnjnrnj^LrnrnKLFLnnr^Lrnrnrnr^Lnrnjnrnj^LonKLTLrnorLo_comm11~Lnnrmj-Lnrmrirmj-u-unrinrinruTnnnrinyu—Loofo_comm01<-nl
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 辅具适配的长期照护体系融合考核试卷
- 金属结构在市政工程中的应用考核试卷
- 2024年袋装腹膜透析液项目资金申请报告代可行性研究报告
- 智能家居产品体验店投资合作框架协议
- 生物实验室洁净室租赁及技术支持协议
- 2025年中国笔记本电脑散热座台行业市场前景预测及投资价值评估分析报告
- 2025年中国保湿美容仪行业市场前景预测及投资价值评估分析报告
- 网络店铺数据安全保护与责任承担协议
- 抖音短视频内容争议仲裁服务协议
- 智能家居产品分销渠道拓展及市场推广支持合同
- JTS-T 200-2023 设计使用年限50年以上港口工程结构设计指南
- 无人智能配送车技术协议
- 疼痛科护士的非药物疼痛管理技巧
- 土地承包经营权证样式-1221
- 爆破作业的安全规定与操作程序
- 前庭大腺囊肿护理查房课件
- 国开《Windows网络操作系统管理》形考任务3-磁盘存储与文件服务实训
- 深圳中考自主招生简历
- 保险团队训练师落地授课法
- 有限空间作业管理台帐(参考模板)
- 埃克森美孚D40MSDS金盛昌化工
评论
0/150
提交评论