数字秒表设计VHDL
更新时间:2023-03-20 12:42:01 阅读量: 实用文档 文档下载
数字秒表设计
北 华 航 天 工 业 学 院
《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;
数字秒表设计
elsif n<=19 and i='1' then q0<=not q0; n<=n+1; else q0<='0'; end if; end if; end process; q<=q0; end ar; (4)译码器 library ieee;
use ieee.std_logic_1164.all; entity deled is
port(num:in std_logic_vector(3 downto 0); led:out std_logic_vector(6 downto 0)); end deled ;
architecture a of deled is begin
process(num) begin
case num is
when"0000"=>led<="0111111"; when"0001"=>led<="0000110"; when"0010"=>led<="1011011"; when"0011"=>led<="1001111"; when"0100"=>led<="1100110"; when"0101"=>led<="1101101"; when"0110"=>led<="1111101"; when"0111"=>led<="0100111"; when"1000"=>led<="1111111"; when"1001"=>led<="1101111"; when others=>led<="0000000"; end case; end process;
end a;
数字秒表设计
library ieee;
use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity seltime is port(clr,clk: in bit;
dain0,dain1,dain2,dain3,dain4,dain5: in std_logic_vector(3 downto 0); sel: out std_logic_vector(2 downto 0); daout: out std_logic_vector(3 downto 0));
end seltime;
architecture a of seltime is signal temp:integer range 0 to 5; begin
process(clk) begin
if (clr='1') then daout<="0000"; sel<="000"; temp<=0;
elsif (clk='1'and clk'event) then if temp=5 then temp<=0; else temp<=temp + 1; end if; case temp is
when 0=>sel<="000";daout<=dain0; when 1=>sel<="001";daout<=dain1; when 2=>sel<="010";daout<=dain2; when 3=>sel<="011";daout<=dain3; when 4=>sel<="100";daout<=dain4; when 5=>sel<="101";daout<=dain5; end case; end if; end process; end a;
三.系统仿真
数字秒表设计
(2)十进制
(3)蜂鸣器
(4)译码器
(5)控制器
数字秒表设计
四.心得体会
开始做设计时总是会犯一些错误,只有经过不停的改错不停的编译才能得到正确的程序。在编程时,我充分使用了结构化的思想,这样程序检查起来也比较方便,调试时也给了我很大方便,只要一个模块一个模块的进行调就可以了,充分体现了结构化编程的优势。在设计中要求我要有耐心和毅力,还要细心,稍有不慎,一个小小的错误就会导致结果的不正确,而对错误的检查要求我要有足够的耐心,通过这次设计和设计中遇到的问题,也积累了一定的经验,对以后从事集成电路设计工作会有一定的帮助。
在应用VHDL的过程中让我真正领会到了其并行运行与其他软件顺序执行的差别及其在电路设计上的优越性。用VHDL硬件描述语言的形式来进行数字系统的设计方便灵活,利用EDA软件进行编译优化仿真极大地减少了电路设计时间和可能发生的错误,降低了开发成本,这种设计方法在数字系统设计中发挥越来越重要的作用。
数字秒表设计
评
语
教 师评 语及 设计 成绩
课程设计成绩:
指导教师:
日期:
年
月
日
- - 12 - -
正在阅读:
数字秒表设计VHDL03-20
党的基本理论和基本知识600题.04-05
2015年秋人教版八年级生物上册第五单元第四章第一节《细菌和真菌03-19
中国现当代文学考研名词解释完整版02-02
乡镇建设管理站年度工作总结报告08-04
2017年卫计综合执法工作总结12-28
qq情侣签名 情侣专用11-20
人孩与动物作文600字06-24
边坡防护方案03-23
- 教学能力大赛决赛获奖-教学实施报告-(完整图文版)
- 互联网+数据中心行业分析报告
- 2017上海杨浦区高三一模数学试题及答案
- 招商部差旅接待管理制度(4-25)
- 学生游玩安全注意事项
- 学生信息管理系统(文档模板供参考)
- 叉车门架有限元分析及系统设计
- 2014帮助残疾人志愿者服务情况记录
- 叶绿体中色素的提取和分离实验
- 中国食物成分表2020年最新权威完整改进版
- 推动国土资源领域生态文明建设
- 给水管道冲洗和消毒记录
- 计算机软件专业自我评价
- 高中数学必修1-5知识点归纳
- 2018-2022年中国第五代移动通信技术(5G)产业深度分析及发展前景研究报告发展趋势(目录)
- 生产车间巡查制度
- 2018版中国光热发电行业深度研究报告目录
- (通用)2019年中考数学总复习 第一章 第四节 数的开方与二次根式课件
- 2017_2018学年高中语文第二单元第4课说数课件粤教版
- 上市新药Lumateperone(卢美哌隆)合成检索总结报告
- 秒表
- 数字
- 设计
- VHDL
- 豪宅项目营销推广渠道研究
- 2017年全国高考卷一英语试题及答案
- 党史图片100幅 - PowerPoint 演示文稿
- 沃尔玛公司员工激励研究毕业论文
- 高校辅导员技能大赛试题
- 中华人民共和国地表水环境质量标准
- 土耳其,想与中国保持微妙平衡
- 薪酬管理制度2014
- 硬脂酸镁合成新工艺
- 三亚公交车路线大全
- 罗比住宅空间分析与室内空间效果
- 枸杞种质资源果实数量性状评价指标探讨
- 国际收支平衡表概念简介
- “十三五”规划重点-国槐项目建议书(立项报告)
- 留学360新西兰留学专家谈新西兰留学年龄限制
- 离子色谱的定性定量分析
- 维纳斯影楼开业庆典爱心竞拍大型公益主题活动策划案
- 2010年福建高考理科数学试卷及答案解析(文字版)
- 【讲义】见证取样人员新标准培训(2011年4月25日-26日)
- 2011年1月实施的湖南机动车停放服务收费管理实施办法