下载此文档

vhdl下秒表的设计.doc


文档分类:通信/电子 | 页数:约11页 举报非法文档有奖
1/11
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/11 下载此文档
文档列表 文档介绍
西安文理学院
物理与机械电子工程学院
课程设计报告
专业班级 10级测控技术与仪器1班
课程 FPGA/CPLD原理及应用
题目秒表的设计
学号
姓名安永哲
同组人李小鹏
成绩
2013年5月
一、设计目的
进一步掌握QUARTUSⅡ软件的使用方法;
会使用VHDL语言设计小型数字电路系统;
掌握应用QUARTUSⅡ软件设计电路的流程;
掌握用扫描方法驱动多个数码管硬件结构,并进一步熟悉七段译码器的硬件接口,掌握秒表VHDL的编程方法。能够应用VHDL的编程方法去完成一些与生活相关的实物。
二、系统总体设计
1. 完成秒/分/时的依次显示并正确计数;
2. 秒/分/时各段个位满10正确进位,秒/分能做到满60向前进位;
3. 报时:实现整点报时,又扬声器发出报时声音;
4。计数起由四个十进制计数器和两个六进制计数器组成;
图1 系统原理框图
脉冲输入
Seltime模块
计数模块
数码管显示
报警模块

三、各模块详细设计
COUNT6模块
根据脉冲的到来实现六进制计数
library ieee;
use ;
use ;
entity count6 is
port (clk,start,clr : in std_logic;
cout : out std_logic;
daout: out std_logic_vector(3 downto 0));
end count6;
architecture xiaopeng of count6 is
signal q0 : std_logic_vector(3 downto 0);
signal q1 : std_logic;
begin
process(clk,clr)
begin
if clr='1' then q0<="0000";
elsif clk'event and clk='1' then
if start='1' then
if q0="0101" then
q0<="0000";
q1<='1';
else q0<=q0+1;
q1<='0';
end if;
end if;
end if;
end process;
daout<=q0;
cout<=q1;
end xiaopeng;
仿真图:
COUNT10模块
根据脉冲的到来实现六进制计数
library ieee;
use ;
use ;
entity count10 is
port (clk,start,clr : in std_logic;
cout : out std_logic;
daout : out std_logic_vector(3 downto 0));
end count10;
architecture xiaopeng of count10 is
signal q0 : std_logic_vector(3 downto 0);
signal q1 : std_logic;
begin
process(clk,clr)
begin
if clr='1' then q0<="0000";
elsif clk'event and clk='1' then
if start='1' then
if q0="1001" then
q0<="0000";
q1<='1';
else q0<=q0+1;
q1<='0';
end if;
end if;
end if;
end process;
daout<=q0;
cout<=q1;
end xiaopeng;
仿真图:
ALERT2模块
library ieee;
use ;
use ;
entity alert2 is
port(clk,I:in std_logic;
q:out std_logic
);
end alert2;
architecture xiaopeng of alert2 is
signal n:integer range 0 to 19;
signal q0:std_logic;
begin
process(clk)
begin
if clk'event a

vhdl下秒表的设计 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数11
  • 收藏数0 收藏
  • 顶次数0
  • 上传人mkjafow
  • 文件大小99 KB
  • 时间2018-02-21