EDA实训课件.ppt

上传人:marr****208 文档编号:149506562 上传时间:2020-10-27 格式:PPT 页数:56 大小:309.50KB
返回 下载 相关 举报
EDA实训课件.ppt_第1页
第1页 / 共56页
EDA实训课件.ppt_第2页
第2页 / 共56页
EDA实训课件.ppt_第3页
第3页 / 共56页
EDA实训课件.ppt_第4页
第4页 / 共56页
EDA实训课件.ppt_第5页
第5页 / 共56页
点击查看更多>>
资源描述

《EDA实训课件.ppt》由会员分享,可在线阅读,更多相关《EDA实训课件.ppt(56页珍藏版)》请在金锄头文库上搜索。

1、EDA实训项目数字式电子时钟,EDA技术,Electronic Design Automation,实训目的,掌握可编程逻辑器件的基本原理及利用EDA开发工具QuartusII进行可编程逻辑器件设计的方法 掌握用CPLD/FPGA进行计数器、译码器及LED动态扫描显示驱动电路设计的方法 熟练掌握可编程逻辑器件的层次化设计方法 掌握混合设计方法 掌握利用QuartusII进行软件仿真及对可编程逻辑器件进行硬件下载的方法,EDA技术,Electronic Design Automation,基本功能: 以时、分、秒形式显示, 二十四小时循环 具有复位功能 有时间校准和调时功能 具有整点报时功能 拓

2、展功能: 可在12/24小时制间进行切换 可外接液晶显示屏 闹钟功能 定时器功能 跑表功能 音乐报时功能,二项目要求,实训安排: 8:30-11:30 实训 下午实训室开放,同学可自行练习,EDA技术,Electronic Design Automation,发挥功能: 可在12/24小时制间进行切换 可外接液晶显示屏 带有闹钟、定时器等功能,二项目要求,EDA技术,Electronic Design Automation,设计概述 根据电路特点,用层次设计概念。将此设计任务分成若干模块,规定每一模块的功能和各模块之间的接口。可以多人分别编程和调试,然后再将各模块联机联试。以培养合作、团队作精

3、神,同时加深层次化设计概念。 混合设计,领会底层VHDL与顶层的原理图混合设计思想。,EDA技术,Electronic Design Automation,实施步骤 1、根据系统设计要求,采用自顶向下设计方法,由秒计数模块、分计数模块、时计数模块、整点报时模块、动态扫描显示模块和 7 段译码模块六部分组成。画出系统的原理框图,并说明系统中各主要组成部分的功能。 2、选用Quartus II工具,运用VHDL编写各个模块的 VHDL 源程序。 3、根据选用的软件编译、仿真各底层模块文件。 4、根据选用的软件及选用的硬件芯片编好用于硬件验证的管脚锁定文件。 5、记录系统仿真、硬件测试结果。 6、记

4、录实验过程中出现的问题及解决办法。,EDA技术,Electronic Design Automation,硬件要求,主芯片 Altera EP1K30QC208-2; 6位七段共阳极数码管动态扫描显示; 三个按键开关(复位,调小时,调分钟); 时钟利用开发板现成时钟源; 利用开发板电源。,EDA技术,Electronic Design Automation,四相关知识点,1静态和动态显示原理: 所谓静态显示,就是显示某一字符时,相应的发光二极管恒定得导通或截止,每一显示位都需要一个8位的输出口控制,占用的硬件较多 ; 动态就是一位一位地轮流点亮各位显示器,对每一位显示器而言,每隔一段时间点亮一

5、次,利用人的视觉留感达到显示的目的;,EDA技术,Electronic Design Automation,数字时钟系统原理图,EDA技术,Electronic Design Automation,基本I/O口,输入端: CLK-时钟频率输入口 RESET-复位端 SETMIN-分钟调节端 SETHOUR-小时调节端 输出端: SPEAK-蜂鸣器输出端 LAMP-外接LED输出端 sel-选择端输出 A,B,C,DE,F,G,dp-数码管显示输出端,EDA技术,Electronic Design Automation,2参考 VHDL 源程序 (1)秒计数模块的 VHDL 源程序(second

6、.vhd) 程序 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity second is port(reset,clk,setmin : in std_logic; daout : out std_logic_vector(7 downto 0); enmin : out std_logic); end second; architecture behav of second is signal count : std_logic_vector(3 downto 0); signa

7、l counter : std_logic_vector(3 downto 0);,EDA技术,Electronic Design Automation,signal carry_out1 : std_logic; signal carry_out2 : std_logic; begin p1: process(reset,clk) begin if reset=0 then count=0000; counter=0000; elsif(clkevent and clk=1) then if (counter5) then if (count=9) then count=0000;,EDA技

8、术,Electronic Design Automation,counter=counter + 1; else count=count+1; end if; carry_out1=0; else if (count=9) then count=0000; counter=0000; carry_out1=1; else count=count+1; carry_out1=0; end if; end if;,EDA技术,Electronic Design Automation,end if; end process; daout(7 downto 4)=counter; daout(3 do

9、wnto 0)=count; enmin=carry_out1 or setmin; end behav;,EDA技术,Electronic Design Automation,模块符号如图5.3所示。 图5.3 秒模块,EDA技术,Electronic Design Automation,仿真: 秒模块仿真如图5.4所示。 图5.4 秒模块仿真波形,EDA技术,Electronic Design Automation,(2)分计数及时钟控制模块 VHDL 程序(minute.vhd) 程序 library ieee; use ieee.std_logic_1164.all; use ieee

10、. std_logic_unsigned.all; entity minute is port(reset,clk,sethour: in std_logic; daout : out std_logic_vector(7 downto 0); enhour : out std_logic); end minute; architecture behav of minute is signal count : std_logic_vector(3 downto 0); signal counter : std_logic_vector(3 downto 0); signal carry_out

11、1 : std_logic;,EDA技术,Electronic Design Automation,signal carry_out2 : std_logic; begin p1: process(reset,clk) begin if reset=0 then count=0000; counter=0000; elsif(clkevent and clk=1) then if (counter5) then if (count=9) then count=0000; counter=counter + 1; else count=count+1;,EDA技术,Electronic Desi

12、gn Automation,end if; carry_out1=0; else if (count=9) then count=0000; counter=0000; carry_out1=1; else count=count+1; carry_out1=0; end if; end if; end if; end process;,EDA技术,Electronic Design Automation,p2: process(clk) Begin if(clkevent and clk=0) then if (counter=0) then if (count=0) then carry_

13、out2=0; end if; else carry_out2=1; end if; end if; end process;,EDA技术,Electronic Design Automation,daout(7 downto 4)=counter; daout(3 downto 0)=count; enhour=(carry_out1 and carry_out2) or sethour; end behav;,EDA技术,Electronic Design Automation,模块符号如图5.5所示。 图5.5 分模块符号,EDA技术,Electronic Design Automati

14、on,仿真: 秒模块仿真如图5.6所示。 图5.6 分模块仿真波形,EDA技术,Electronic Design Automation,(3)时计数及时钟控制模块 VHDL 源程序(hour.vhd) 程序 library ieee; use ieee.std_logic_1164.all; use ieee. std_logic_unsigned.all; entity hour is port(reset,clk : in std_logic; daout : out std_logic_vector(7 downto 0); end hour; architecture behav o

15、f hour is signal count : std_logic_vector(3 downto 0); signal counter : std_logic_vector(3 downto 0); begin p1: process(reset,clk),EDA技术,Electronic Design Automation,begin if reset=0 then count=0000; counter=0000; elsif(clkevent and clk=1) then if (counter2) then if (count=9) then count=0000; counte

16、r=counter + 1; else count=count+1; end if;,EDA技术,Electronic Design Automation,else if (count=3) then count=0000; counter=0000; else count=count+1; end if; end if; end if; end process; daout(7 downto 4)=counter; daout(3 downto 0)=count; end behav;,EDA技术,Electronic Design Automation,模块符号如图5.7所示。 图5.7 时模块符号,EDA技术,Electronic Design Automati

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号