VHDL语言数字秒表设计Word格式.docx
- 文档编号:14869797
- 上传时间:2022-10-25
- 格式:DOCX
- 页数:14
- 大小:456.26KB
VHDL语言数字秒表设计Word格式.docx
《VHDL语言数字秒表设计Word格式.docx》由会员分享,可在线阅读,更多相关《VHDL语言数字秒表设计Word格式.docx(14页珍藏版)》请在冰豆网上搜索。
关键词:
VHDL,数字钟,MAX+plusII,时序仿真图。
一、实验目的……………………………………………………………………………1
二、硬件要求……………………………………………………………………………1
三、方案论证……………………………………………………………………………1
四、模块说明……………………………………………………………………………1
1.六进制计数器…………………………………………………………………………1
2.十进制计数器…………………………………………………………………………2
3.蜂鸣器…………………………………………………………………………………3
4.译码器…………………………………………………………………………………4
5.控制器…………………………………………………………………………………5
6.顶层文件………………………………………………………………………………8
五、整体连接图…………………………………………………………………………9
六、实验步骤……………………………………………………………………………10
七、实验结果……………………………………………………………………………10
八、实验总结……………………………………………………………………………10
九、参考文献……………………………………………………………………………10
课程设计任务书
课题名称
数字秒表
完成时间
指导教师
职称
学生
班级
总体设计要求和技术要点
设计要求:
秒表共有6个输出显示,分别为百分之一秒、十分之一秒、秒、十秒、分、十分,所以共有6个计数器与之相对应,6个计数器的输出全都为BCD码输出,这样便于和显示译码器的连接。
当计时达60分钟后,蜂鸣器鸣响10声。
除此之外,整个秒表还需有一个启动信号和一个归零信号,以便秒表能随意停止与启动。
设计要点:
秒表的逻辑结构较简单,它主要由显示译码器、分频器、十进制计数器、六进制计数器和报警器组成。
在整个秒表中最关键的是如何获得一个准确的100HZ计时脉冲。
工作容与时间进度安排
工作容:
在软件上编辑、编译程序,并仿真到达实验要求。
进度安排;
课下编写程序,并要求程序能通过编译仿真;
第十四周的周三在实验板上下载调试程序;
周四课设辩论
课程设计成果
1.与设计容对应的软件程序
2.课程设计报告书
3.成果使用说明书
一、实验目的
学习使用VHDL语言,以与EDA芯片的下载仿真
二、硬件要求
〔1〕主芯片EPF10K10LC84-4。
〔2〕蜂鸣器。
〔3〕8位八段扫描共阴极数码显示管。
〔4〕二个按键开关〔清零,开始〕。
三、方案论证
四、模块说明
时钟的设计共化分为6个模块:
六进制计数器〔count6〕,十进制计数器〔count10〕,报警电路〔bs〕,扫描电路〔seltime〕,译码电路〔ym〕。
下面具体分析各个模块的原理、容和功能。
〔1〕六进制计数器(count6)
能够实现6进制循环计数,带有清零端stop、开始端start、时钟信号端clk、其文本语言〔文件名:
count6.vhd〕为底层文本,图1为六进制计数器的仿真波形图。
libraryieee;
useieee.std_logic_1164.all;
useieee.std_logic_unsigned.all;
entitycount6is
port(clk,clr,start:
instd_logic;
daout:
outstd_logic_vector(3downto0);
cout:
bufferstd_logic);
endcount6;
architecturebehaveofcount6is
signaltemp:
std_logic_vector(3downto0);
begin
process(clk,clr)
begin
ifclr='
1'
thentemp<
="
0000"
;
cout<
='
0'
elsifclk'
eventandclk='
then
ifstart='
then
iftemp="
0101"
elsetemp<
=temp+1;
cout<
endif;
elsifstart='
=temp;
=cout;
endif;
endprocess;
daout<
=temp;
endbehave;
图1.六进制计数器的仿真波形
〔2〕十进制计数器〔COUNT10〕
能够实现10进制循环计数,带有清零端stop、开始端start、时钟信号端clk、其文本语言〔文件名:
COUNT10.vhd〕为底层文本,图2为十进制计数器的仿真波形图
entitycount10is
endcount10;
architecturebehaveofcount10is
1001"
=temp+1;
图2.十进制分计数器的仿真波形
〔3〕蜂鸣器
entityalarmis
port(clk,I:
q:
outstd_logic
);
endalarm;
architecturearofalarmis
signaln:
integerrange0to20;
signalq0:
std_logic;
process(clk)
begin
ifclk'
ifi='
thenq0<
n<
=0;
elseifn<
=19thenq0<
=not(q0);
=n+1;
elseq0<
endprocess;
q<
=q0;
endar;
〔4〕译码器
entityymis
port(num:
instd_logic_vector(3downto0);
led:
outstd_logic_vector(6downto0));
endym;
architectureaofymis
process(num)
begin
casenumis
when"
=>
led<
0111111"
0001"
0000110"
0010"
1011011"
0011"
1001111"
0100"
1100110"
1101101"
0110"
1111101"
0111"
0100111"
1000"
1111111"
1101111"
whenothers=>
0000000"
endcase;
enda;
〔5〕控制器
useunsigned.all;
entityseltimeis
port(clr,clk:
inbit;
dain0,dain1,dain2,dain3,dain4,dain5:
instd_logic_vector(3downto0);
sel:
outstd_logic_vector(2downto0);
outstd_logic_vector(3downto0));
endseltime;
architecturebofseltimeis
signaltemp:
integerrange0to5;
process(clk)
thendaout<
;
sel<
000"
temp<
else
ifclk'
then
iftemp=5thentemp<
elsetemp<
=temp+1;
endif;
casetempis
when0=>
=dain0;
when1=>
001"
=dain1;
when2=>
010"
=dain2;
w
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VHDL 语言 数字 秒表 设计
![提示](https://static.bdocx.com/images/bang_tan.gif)