欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOC文档下载  

    EDA课程设计(VHDL语言数字秒表的设计)毕业设计(论文)word格式.doc

    • 资源ID:4146508       资源大小:280KB        全文页数:25页
    • 资源格式: DOC        下载积分:8金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要8金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    EDA课程设计(VHDL语言数字秒表的设计)毕业设计(论文)word格式.doc

    摘要EDA技术作为电子工程领域的一门新技术,极大的提高了电子系统设计的效率和可靠性。本次课程设计就是利用VHDL语言结合硬件电路来实现数字秒表的功能,数字秒表有4个模块构成,分别为分频电路模块,去抖电路模块,时间计数电路模块,显示模块。用VHDL语言编程来实现各个模块的功能,再用原件例化的方法实现各模块之间的连接,从而实现整个数字秒表电路的功能。关键词:EDA,VHDL,数字秒表AbstractThe technology of EDA as a new technology in electronic engineering has greatly improved the efficiency and reliability of electronic system design. The course design is the use of VHDL language combination of hardware circuitry to achieve digital stopwatch function. Digital Stopwatch is made up of four modules, such as: sub-frequency circuit module, debounce circuit module, counting circuit module and display module. I used VHDL language programming to achieve the functions of each module and connected each module with the method of original cases to realize the entire digital stopwatch function.Keywords: EDA,VHDL, digital stopwatch1绪论EDA是20实际90年代初以来迅速发展起来的现代电子工程领域的一门新技术。它以可编程逻辑器件(PLD)为载体,以计算机为工作平台,以EDA工作软件为工作环境,以硬件描述语言(HDL)作为电子系统功能描述方式,以电子系统设计为应用方向的电子产品自动化设计过程。在当今以数字化和网络化为特征的信息技术革命大潮中,电子技术得到了飞速发展,现代电子产品渗透到了社会的各个领域。现代电子产品的性能进一步提高,功能越来越复杂,集成化智能化程度越来越高,更新换代的节奏越来越快,开发风险越来越大,而且向着功能多样化,体积小型化,功耗最低化的趋势发展。所有这些都给电子系统的设计带来了前所未有的压力,唯一的出路是熟练掌握EDA技术,并获得其有力支持。EDA技术的出现,极大的提高了电子系统设计的效率和可靠性,减轻了设计者的劳动强度,EDA是电子产品开发研制的动力源和加速器,是现代电子技术的核心。随着基于PLD的EDA技术的发展和应用领域的扩大和深入,它在电子信息,通信工程,自动控制及计算机应用等领域的重要性日益突出。随着电子技术与计算机技术的发展,熟练掌握和应用EDA技术已成为电子类及相关专业学生不可或缺的一项技能,因此本次课程设计突出应用性,以加强学生的工程实践能力和工程设计能力。2 数字秒表的设计2.1 系统设计要求(1)计时精度应大于1/100s,计时器能显示1/100s的时间,提供给计数器内部定时的时钟频率应大于100HZ,这里选用1KHZ。(2)计数器最大计数时间为1小时,为此需要6位的显示器,现实的最长时间为59分59.99秒。(3)设置有复位和起/停开关,复位开关用来使计数器清零,做好计时准备,起停开关的用法和机械开关相同,即按一下,启动计时器开始计时,再按一下计时器停止。2.2 系统设计方案根据系统设计要求,系统的组成框图如图1所示: 数字秒表分频电路去抖电路计时点路显示电路 图1 数字秒表系统组成框图由上图可知:此系统主要由分频电路,去抖电路,计时电路,显示电路四部分组成。3 数字秒表单元模块设计3.1 分频电路在整个系统中需要2个不同的频率,实验室提供的频率不满足要求,所以要进行分频,以得到所需频率。在该模块中分频电路的输入为20MHZ的脉冲,输出为q1=1KHZ,q2=200HZ。该模块电路图如图2所示:图2 分频电路图3.2 去抖电路在数字电路设计中经常采用机械开关作为控制开关,但是机械开关有其固有的确定,如容易引入抖动干扰。为了消除抖动干扰,需要使用防抖电路。在这里的去抖电路是由3个D触发器构成。该模块的电路图如图3所示:图3 去抖电路去抖电路的仿真图如图4所示: 图4 去抖电路的仿真图3.3 计时电路计时电路执行计时功能,计时的方法是对标准时钟脉冲计数。由于计时范围是0秒到59分59.99秒,所以计数器可以由四个十进制计数器和两个六进制计数器构成,其中毫秒位,十毫秒位,秒位和分位采用十进制计数器,十秒位和十分位采用六进制计数器。该部分电路由三个计数器构成,毫秒计数器,秒计数器及分计数器。毫秒计数器电路图如图5所示:图5 毫秒计数器电路图毫秒计数器的仿真图如图6,图7,图8所示:图6 使能一直有效时计数器仿真图图7 使能有效,清零无效时计数器仿真图图8 清零无效时计数器仿真图秒计数器电路图如图9所示:图9 秒计数器电路图 分计数器电路图如图10所示:图10 分计数器电路图由于秒计数器和分计数器的仿真和毫秒计数器类似,所以其结果同上。3.4 显示电路计时显示电路的作用是将计时值在LED七段数码管上显示出来。计时电路产生的计时值经过BCD七段译码后,驱动LED数码管。计时显示电路的实现方案采用扫描显示,每次只驱动一位数码管,各位数据轮流驱动对应的数码管进行显示。由于实验箱上已经由数码管管和译码电路,所以该模块的电路图如图11所示:图11 显示电路电路图4 硬件电路的调试写好程序后在试验箱上利用Quartus软件进行调试,调试步骤如下:1. 创建工程准备工作(1) 新建一个文件夹(2) 输入源程序(3) 文件存盘2. 创建工程3. 编译前设置(1) 选择FPGA芯片(2) 选择配置器件的工作方式(3) 选择配置器件和编程方式(4) 选择目标器件闲置引脚状态4. 全程编译5. 引脚锁定及下载(1) 选择AssignmentsAssignments Editor选择pin(2) 双击Location栏的new,在出现的菜单中选择端口信号名的器件引脚号(3) 存储这些引脚锁定的信息,然后再编译6. 编程下载(1) 打开编辑窗和配置文件(2) 设置编程器(3) 选择编程器(4) 硬件测试5 整体电路图系统的整体电路图如图12所示:图12 系统的整体电路图6 心得体会对于这次课程设计,由于以前做实验的时候已经接触过类似的题目,所以做起来不是很困难,但是还是有一些小问题存在,最后通过查阅相关书籍才解决。在设计过程中,首先要明确实验目的,弄清实验思路,把实验原理详细的表达出来,然后通过查阅资料选取其中的几种设计方案,再根据实验要求和实验的实际可操作性定下最终的设计方案。在设计过程中通过自主独立的发现问题,设计实验,操作,调查,搜集与处理信息等而获得知识,技能的发展。特别是培养了探索精神和创新能力的发展的学习方式和学习过程。这次课程设计的整个过程让我收益良多。在实验过程中学会了对自己的实验进展,实验方法做自我监控,自我反馈和自我调节,在实验的最后学会了对自己的实验结果进行自我检查,自我总结,自我评价和自我补救。对于在课程设计过程中碰到的一些问题,在自己一个人无法独立解决的时候可以通过查阅相关资料或请同学帮忙,在此过程中也培养了团队合作精神。虽然设计过程不是一帆风顺,遇到了很多问题,但整个过程让我学到了很多平时没学到的知识。通过这次设计更进一步的 提高了我的思维能力,动手能力,增强了对电子专业学习的兴趣。希望以此为起点,在以后的学习中能更积极的动脑动手,提高自己的综合能力,为以后的发展打下坚实的基础。参考文献1潘松,黄继业.EDA技术与VHDL.北京:清华大学出版社,20072聂春燕.EDA技术实验与课程设计.北京:清华大学出版社,20063张亦华,延明.数字电路EDA入门.北京:北京邮电大学,20054黄仁欣.EDA技术实用教程.北京:清华大学出版社,20065林明权.VHDL数字控制系统设计范例.北京:电子工业出版社,2003附录数字秒表电路的VHDL源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity miaobiao isport (clk_top:in std_logic; sel1_top,sel2_top:in std_logic; s_out:out std_logic_vector(2 downto 0); y_out:out std_logic_vector(6 downto 0); dp_out:out std_logic);end entity;architecture behave of miaobiao iscomponent fenpin port(clk1: in std_logic; q1,q2,q3: out std_logic);end component;component jishu1 port(clk:in std_logic; rst:in std_logic; en:in std_logic; co:out std_logic; x,y:buffer std_logic_vector(3 downto 0);end component;component jishu2 port(clk:in std_logic; rst:in std_logic; en:in std_logic; co:out std_logic; x,y:buffer std_logic_vector(3 downto 0);end component;component jishu3 port(clk:in std_logic; rst:in std_logic; en:in std_logic; x,y:buffer std_logic_vector(3 downto 0);end component;component xuanzeport(a,b,c,d,e,f:in std_logic_vector(3 downto 0); s:out std_logic_vector(2 downto 0); y:out std_logic_vector(6 downto 0); dp:out std_logic; cp:in std_logic);end component; component qudou1port(clk,d1:in std_logic; q1:out std_logic);end component;component qudou2port(clk,d1:in std_logic; q1:out std_logic);end component;signal c1,c2,c3,c4,c5: std_logic;signal m1,m4:std_logic;signal m2,m3,m5,m6,m7,m8: std_logic_vector( 3 downto 0);beginu1:fenpin port map(clk_top,c1,c5,c2);u2:qudou1 port map (c2,sel1_top,c3);u3:qudou2 port map (c2,sel2_top,c4);u4:jishu1 port map(c1,c3,c4,m1,m2,m3);u5:jishu2 port map(m1,c3,c4,m4,m5,m6);u6:jishu3 port map(m4,c3,c4,m7,m8);u7:xuanze port map(m2,m3,m5,m6,m7,m8,s_out,y_out,dp_out,c5);end behave; library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity fenpin is generic (datawidth: integer:=17); port(clk1: in std_logic; q1,q2,q3: out std_logic);end fenpin;architecture behave of fenpin issignal count1: std_logic_vector(datawidth-1 downto 0);signal count2: std_logic_vector(datawidth-1 downto 0);signal count3: std_logic_vector(datawidth-1 downto 0);beginp1:processbegin wait until clk1'event and clk1='1' if( count1=200000)then count1<=(others=>'0'); else count1<=count1+1; if count1<100000 then q1<='0' else q1<='1' end if; end if;end process p1;p2:processbegin wait until clk1'event and clk1='1' if( count2=20000)then count2<=(others=>'0'); else count2<=count2+1; if count2<10000 then q2<='0' else q2<='1' end if; end if;end process p2;p3:processbegin wait until clk1'event and clk1='1' if( count3=100000)then count3<=(others=>'0'); else count3<=count3+1; if count3<50000 then q3<='0' else q3<='1' end if; end if;end process p3;end behave;library ieee;use ieee.std_logic_1164.all;entity qudou1 isport(clk,d1:in std_logic; q1:out std_logic);end entity;architecture behave of qudou1 issignal a,b,c:std_logic;beginprocess(clk,a,b,c)beginif clk'event and clk='1' then a<=d1;b<=a;c<=b; q1<=a or b or c; end if;end process;end behave;library ieee;use ieee.std_logic_1164.all;entity qudou2 isport(clk,d1:in std_logic; q1:out std_logic);end entity;architecture behave of qudou2 issignal a,b,c:std_logic;beginprocess(clk,a,b,c)beginif clk'event and clk='1' then a<=d1;b<=a;c<=b; q1<=a or b or c; end if;end process;end behave;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity jishu1 is port(clk:in std_logic; rst:in std_logic; en:in std_logic; co:out std_logic; x,y:buffer std_logic_vector(3 downto 0);end entity;architecture a of jishu1 issignal qn,qo: std_logic_vector(3 downto 0);signal ce: std_logic;beginprocess(clk,rst,en,qo,qn)begin if rst='1' then qn<="0000" elsif (clk'event and clk='1' and en='1') then if(qn="1001") then qn<="0000" ce<='1' else qn<=qn+1;ce<='0' end if; end if;x<=qn;end process;process(ce,rst,en,qo)beginif rst='1' then qo<="0000"elsif (ce'event and ce='1' and en='1') then if(qo="1001")then qo<="0000" ;co<='1' else qo<=qo+1; co<='0'end if;end if;y<=qo;end process;end a;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity jishu2 is port(clk:in std_logic; rst:in std_logic; en:in std_logic; co:out std_logic; x,y:buffer std_logic_vector(3 downto 0);end entity;architecture a of jishu2 issignal qn,qo: std_logic_vector(3 downto 0);signal ce: std_logic;beginprocess(clk,rst,en,qo,qn)begin if rst='1' then qn<="0000" elsif (clk'event and clk='1' and en='1') then if(qn="1001") then qn<="0000" ce<='1' else qn<=qn+1;ce<='0' end if;end if;x<=qn;end process;process(ce,rst,en,qo)beginif rst='1' then qo<="0000" elsif (ce'event and ce='1' and en='1') then if(qo="0101")then qo<="0000" ;co<='1' else qo<=qo+1; co<='0'end if;end if;y<=qo;end process;end a;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity jishu3 is port(clk:in std_logic; rst:in std_logic; en:in std_logic; x,y:buffer std_logic_vector(3 downto 0);end entity;architecture a of jishu3 issignal qn,qo: std_logic_vector(3 downto 0);signal ce: std_logic;beginprocess(clk,rst,en,qo,qn)beginif rst='1' then qn<="0000" elsif (clk'event and clk='1' and en='1') then if(qn="1001") then qn<="0000" ce<='1' else qn<=qn+1;ce<='0' end if; end if;x<=qn;end process;process(ce,rst,en,qo)beginif rst='1' then qo<="0000" elsif (ce'event and ce='1' and en='1') then if(qo="0101")then qo<="0000" ; else qo<=qo+1;end if;end if;y<=qo;end process;end a;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xuanze isport(a,b,c,d,e,f:in std_logic_vector(3 downto 0); s:out std_logic_vector(2 downto 0); y:out std_logic_vector(6 downto 0); dp:out std_logic; cp:in std_logic);end xuanze;architecture behave of xuanze issignal z:std_logic_vector(3 downto 0);begin process(cp)variable sn:std_logic_vector(2 downto 0);beginif(cp'event and cp='1') thenif(sn="101")thensn:="000"elsesn:=sn+1;end if;case sn iswhen"000"=> z <=a;dp<='0'when"001"=> z <=b;dp<='0'when"010"=> z <=c;dp<='1'when"011"=> z <=d;dp<='0'when"100"=> z <=e;dp<='0'when"101"=> z <=f;dp<='0'when others=>null;end case;end if;s<=sn;end process;process(z)begincase z iswhen"0000"=> y <="0111111"when"0001"=> y <="0000110"when"0010"=> y <="1011011"when"0011"=> y <="1001111"when"0100"=> y <="1100110"when"0101"=> y <="1101101"when"0110"=> y <="1111101"when"0111"=> y <="0000111"when"1000"=> y <="1111111"when"1001"=> y <="1101111"when"1010"=> y <="1110111"when"1011"=> y <="1111100"when"1100"=> y <="0111001"when"1101"=> y <="1011110"when"1110"=> y <="1111001"when"1111"=> y <="1110001"when others=> y <="1000000"end case;end process;end behave

    注意事项

    本文(EDA课程设计(VHDL语言数字秒表的设计)毕业设计(论文)word格式.doc)为本站会员(仙人指路1688)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开