EDA数字秒表设计

  • 格式:doc
  • 大小:181.50 KB
  • 文档页数:12

下载文档原格式

  / 12
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

北华航天工业学院

《EDA技术综合设计》

课程设计报告

报告题目:数字秒表设计

作者所在系部:电子工程系

作者所在专业:电子信息工程

作者所在班级:

作者姓名:

指导教师姓名:

完成时间:2010年12月12日

内容摘要

应用VHDL语言设计数字系统,很多设计工作可以在计算机上完成,从而缩短了数字系统的开发时间。我们尝试利用VHDL为开发工具设计数字秒表。

秒表的逻辑结构较简单,它主要由十进制计数器、六进制计数器、12500的分频器、数据选择器、和显示译码器等组成。在整个秒表中最关键的是如何获得一个精确的100HZ 计时脉冲,除此之外,整个秒表还需有一个启动信号和一个清零信号,以便秒表能随意停止及启动。

秒表有共有6个输出显示,分别为百分之一秒、十分之一秒、秒、十秒、分、十分,所以共有6个计数器与之相对应,6个计数器的输出全都为BCD码输出,这样便与同显示译码器连接。开关设置秒表报警器,每10秒钟,蜂鸣器鸣响1声,发光二极管闪烁。当计时达60分钟后,蜂鸣器鸣响10声。

关键词:VHDL、数据选择器、计数器、显示器

目录

一、系统组成框图 (5)

二、各模块原理及其程序 (5)

1、六进制计数器 (6)

2、十进制计数器 (6)

3、蜂鸣器 (7)

4、译码器 (8)

5、控制器 (9)

三、系统仿真 (10)

1、六进制计数器 (10)

2、十进制计数器 (10)

3、蜂鸣器 (10)

4、译码器 (10)

5、控制器 (10)

四、心得体会 (11)

课程设计任务书

设计过程

二.各模块及的原理及其程序

(1)六进制计数器

系统组成框图

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity count6 is

port (clk,clr,start:in std_logic;

daout:out std_logic_vector(3 downto 0);

cout:out std_logic );

end count6;

architecture behave of count6 is

signal temp:std_logic_vector(3 downto 0);

begin

process(clk,clr)

begin

if clr='1' then temp<="0000";

cout<='0';

elsif clk'event and clk='1' then

if start='1'then

if temp>="0101" then temp<="0000";

cout<='1';

else temp<=temp+1; cout<='0';

end if;

end if;

end if;

end process;

daout<=temp;

end behave;

(2)十进制计数器

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

use ieee.std_logic_arith.all;

entity count10 is

port(

clr,start,clk:in std_logic;

cout:out std_logic;

daout:buffer std_logic_vector(3 downto 0));

end count10;

architecture behave of count10 is

begin

process(clr,start,clk)

begin

if clr='1' then daout<="0000";

elsif ( clk'event and clk='1') then

if start='1' then

if daout="1001" then daout<="0000";cout<='1';

else daout<=daout+1;cout<='0';

end if;

end if;

end if;

end process;

end behave;

(3)蜂鸣器

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

entity alarm is

port(clk,I:in std_logic;

q:out std_logic

);

end alarm;

architecture ar of alarm is

signal n:integer range 0 to 20;

signal q0:std_logic;

begin

process(clk)

begin

if clk'event and clk='1'

then

if i='0' then q0<='0';

n<=0;