




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
项目设计说明书设计课题:基于CPLD的数字钟设计 系 别 电气工程系 姓 名: 彭诗懿 完成日期 2012.6.29 目录l 设计要求l 设计思路l CPLD简介l 主要VHLD源程序l 波形仿真l 实物图l 心得体会1、 设计要求。 具有时、分、秒的计数显示功能,24小时循环显示。 具有清零、预置初值功能,实现LED动态显示,整点报时采用声音报时。 采用元件例化方式实现各模块间的连接。2、 设计思路. (原理图)3、 CPLD简介。 CPLD(Complex Programmable Logic Device)复杂可编程逻辑器件,是从PAL和GAL器件发展出来的器件,相对而言规模大,结构复杂,属于大规模集成电路范围。是一种用户根据各自需要而自行构造逻辑功能的数字集成电路。其基本设计方法是借助集成开发软件平台,用原理图、硬件描述语言等方法,生成相应的目标文件,通过下载电缆(“在系统”编程)将代码传送到目标芯片中,实现设计的数字系统。 四、主要VHDL源程序。 24进制计数器。 library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;-*entity count24 Isport(en1,en2,clk,rst:in std_logic;co:out std_logic;a,b:out std_logic_vector(3 downto 0);end count24;-*architecture rtl of count24 issignal aout,bout:std_logic_vector(3 downto 0);signal cout:std_logic;beginprocess(en1,en2,clk,rst)beginif(rst=0)thenaout=0000;aout=0000;cout=0;elsif(clkevent and clk=1)thenif(en1=1 or en2=0)thenif(bout=2)thenif(aout=3)thenaout=0000;bout=0000;cout=1;elseaout=aout+1;cout=0;end if;elsif(aout=9)thenaout=0000;bout=bout+1;cout=0;elseaout=aout+1;cout=0;end if;end if;end if;end process;a=aout;b=bout;co=cout;end rtl;六十进制计数器。 library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;-*entity mincount Isport(en1,en2,clk,rst:in std_logic;co:out std_logic;a,b:out std_logic_vector(3 downto 0);end mincount;-*architecture rtl of mincount issignal aout,bout:std_logic_vector(3 downto 0);signal cout:std_logic;beginprocess(en1,en2,clk,rst)beginif(rst=0)thenaout=0000;bout=0000;cout=0;elsif(clkevent and clk=1)thenif(en1=1 or en2=0)thenif(aout=9)thenaout=0000;if(bout=5)thenbout=0000;cout=1;elsebout=bout+1;end if;elseaout=aout+1;cout=0;end if;end if;end if;end process;a=aout;b=bout;co=cout;end rtl;(3) 主体部分. library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;-*entity scanselect Isport(clk,rst:in std_logic;in1,in2,in3,in4,in5,in6:in std_logic_vector(3 downto 0);sel:out std_logic_vector(2 downto 0);dataout:out std_logic_vector(3 downto 0);end scanselect;-*architecture rtl of scanselect issignal cnt:std_logic_vector(2 downto 0);beginprocess(rst,clk)beginif(rst=0)thencnt=000;elsif(clkevent and clk=1)thenif(cnt=101)thencnt=000;else cnt=cnt+1;end if;if cnt=000 then dataout=in1;elsif cnt=001 then dataout=in2;elsif cnt=010 then dataout=in3;elsif cnt=011 then dataout=in4;elsif cnt=100 then dataout=in5;elsif cnt=101 then dataout=in6;end if;end if;end process;sel=cnt;end rtl; 五、系统仿真/硬件验证 波形仿真 ( 秒钟计数模块仿真图) (分钟计数模块仿真图) (小时计数模块仿真图) ( 扫描函数模块仿真) 六、实物图。 七、 心得体会。 经过一周星期对实践的制作,从中学到了很多。首先是对EDA的vhd语言的更深层次认识,本来觉得EDA编程语言比较麻烦,可是接触了以后也就觉得它还是有它方便的地方,尤其是和图形编程结合的特点。其次,这个实践其实到目前为止应该还不是一个成功的作品,还是有很多的仿真没有完成,原因可能也是自己的技术不到位。但是整个制作的
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 甲方竞选发言稿
- 协会发言稿范文
- 合理膳食知识培训
- 蝴蝶儿童舞蹈课件
- 愿望体验动力课件
- 二零二五年度宾馆会议室租赁合同书-商务会议室租赁及多媒体服务合同
- 二零二五版特种光纤光缆采购合同范本
- 二零二五年抵押车借款及车辆检测服务合同样本
- 2025拆除违章建筑与安全风险评估合同
- 二零二五年电商代运营产品上架与销售策略合同
- 2025年民生民情考试试题及答案
- 中外航海文化知到课后答案智慧树章节测试答案2025年春中国人民解放军海军大连舰艇学院
- 学校食堂保洁服务方案(技术标)
- 输血反应应急预案完整版课件
- 续贷款申请书范文
- 兼职音乐教师合同范例
- 小孩上户口民族不一致委托书
- 科研项目管理质量承诺
- 《妊娠合并阑尾炎》课件
- 21、学生饮用奶食品安全应急预案
- 心肺复苏术课件2024新版
评论
0/150
提交评论