版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
可编程逻辑器件实验报告.实验目的掌握数字时钟的设计方法掌握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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 家有萌宠出游更添乐趣的秘诀
- 2025年度大学外籍教师聘请与跨文化教学服务合同
- 二零二五年度生物制药原料质量控制与追溯服务合同3篇
- 二零二五年度食品包装OEM生产合作协议书3篇
- 科技赋能下的家庭教育新模式与德育工作创新
- 二零二五年度车辆抵押担保车辆拍卖合同模板3篇
- 二零二五年度财务顾问与内部控制建设合同3篇
- 2025版智慧社区装修设计施工一体化合同2篇
- 网络环境下的家庭教育问题及解决方案
- 科技在家庭急救箱中的应用与发展
- 包装品质彩盒外箱知识课件
- 神经外科课件:神经外科急重症
- 颈复康腰痛宁产品知识课件
- 2024年低压电工证理论考试题库及答案
- 2023年十天突破公务员面试
- 《疯狂动物城》中英文对照(全本台词)
- 医院住院医师规范化培训证明(样本)
- 小学六年级语文阅读理解100篇(及答案)
- 气功修炼十奥妙
- 安徽省物业服务标准
- 勾股定理的历史与证明课件
评论
0/150
提交评论