EDA技术实验报告.docx

上传人:b****1 文档编号:2183339 上传时间:2023-05-02 格式:DOCX 页数:24 大小:313.65KB
下载 相关 举报
EDA技术实验报告.docx_第1页
第1页 / 共24页
EDA技术实验报告.docx_第2页
第2页 / 共24页
EDA技术实验报告.docx_第3页
第3页 / 共24页
EDA技术实验报告.docx_第4页
第4页 / 共24页
EDA技术实验报告.docx_第5页
第5页 / 共24页
EDA技术实验报告.docx_第6页
第6页 / 共24页
EDA技术实验报告.docx_第7页
第7页 / 共24页
EDA技术实验报告.docx_第8页
第8页 / 共24页
EDA技术实验报告.docx_第9页
第9页 / 共24页
EDA技术实验报告.docx_第10页
第10页 / 共24页
EDA技术实验报告.docx_第11页
第11页 / 共24页
EDA技术实验报告.docx_第12页
第12页 / 共24页
EDA技术实验报告.docx_第13页
第13页 / 共24页
EDA技术实验报告.docx_第14页
第14页 / 共24页
EDA技术实验报告.docx_第15页
第15页 / 共24页
EDA技术实验报告.docx_第16页
第16页 / 共24页
EDA技术实验报告.docx_第17页
第17页 / 共24页
EDA技术实验报告.docx_第18页
第18页 / 共24页
EDA技术实验报告.docx_第19页
第19页 / 共24页
EDA技术实验报告.docx_第20页
第20页 / 共24页
亲,该文档总共24页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

EDA技术实验报告.docx

《EDA技术实验报告.docx》由会员分享,可在线阅读,更多相关《EDA技术实验报告.docx(24页珍藏版)》请在冰点文库上搜索。

EDA技术实验报告.docx

EDA技术实验报告

EDA技术实验报告

 

 

报告人:

丁腾飞

学号:

20071000206

班号:

07207501

指导老师:

王院生

2010年1月11日星期一

基础实验

实验一组合逻辑设计

一、实验目的:

1.通过一个简单的3-8译码器的设计,让学生掌握组合逻辑电路的设计方法。

2.掌握组合逻辑电路的静态测试方法。

3.初步了解MAXPLUSii原理图输入设计的全过程。

二、实验的硬件要求:

1.输入:

DIP拨码开关3位。

2.输出:

LED灯。

3.主芯片:

EP1K10TC100-3。

三、实验器材:

1.超想-3000TB综合实验仪1台

2.HK51TB仿真板1块

四、实验原理:

三八译码器三输入,八输出。

当输入信号按二进制方式的表示为N时,输出端从零标记到八。

因为三个输入端能产生的组合状态有八种,所以输出端在每种组合中仅有一位有效的情况下,能表示所有的输入组合。

3-8译码器真值表

输入

输出

A2A1A0

Y7Y6Y5Y4Y3Y2Y1Y0

000

001

010

011

100

101

110

111

00000001

00000010

00000100

00001000

00010000

00100000

01000000

10000000

五、实验步骤:

1.进入WINDOWS操作系统,打开MAXPLUSII。

2.设计输入。

3.保存原理图。

4.用相关软件对程序进行管脚的定义、编译、仿真、下载,完成整个实验的设计。

六、实验程序图

七、实验结果:

拨动三个拨码输入开关,对应的LED指示灯点亮,实现译码功能,即实现了三个开关的任意组合。

实验二组合电路

一、实验目的:

1.掌握组合逻辑电路的设计方法。

2.掌握组合逻辑电路的静态测试方法。

加深CPLD的设计过程,并比较原理图输入和文本输入的优劣。

二、实验的硬件要求:

1.输入:

按键开关4个,拨码开关4位。

2.输出:

LED灯。

3.主芯片:

EP1K10TC100-3。

三、实验内容:

1.设计一个四舍五入判别电路,其输入为8421BCD码,要求当输入大于或等于5时,判别电路输出为1,反之为0。

2.设计四个开关控制一盏灯的逻辑电路,要求合任一开关,灯亮;断开任一开关,灯灭。

3.设计一个优先权排队电路,A=1为最高优先级;B=1为次高优先级;C=1为最低优先级。

要求输出端最高只能有一端为“1”,即只能是优先级较高的输入端所对应的输出端为“1”。

四、实验连线

1.输入信号D3,D2,D1,D0对应的管脚接四个拨码开关。

输出信号OUT对应的管脚接LED指示灯。

2.输入信号K3,K2,K1,K0对应的管脚接四个按键开关。

输出信号OUT对应的管脚接LED指示灯。

3.输入信号A、B、C对应的管脚接三个拨码开关。

输出信号OUT对应的管脚接LED指示灯。

五、实验原理程序框图:

1、四舍五入电路程序图:

2、开关控制电路程序图:

3、排队电路程序图:

六、实验结果

1.拨动拨码开关,指示灯有变化。

分析逻辑状态,当拨码输入大于4时,指示灯被点亮,满足了四舍五入的要求。

2.拨动开关,指示灯有变化。

合上任意开关,灯亮;断开任意开关,灯灭。

3.随机拨动开关,指示灯有变化。

当A合上时,无论B、C状态如何,输出指示灯A被点亮;当A断开,B闭合时,无论C状态如何,输出指示灯B被点亮;当A、B开关均断开,C闭合时,输出指示灯C被点亮。

应用实验

实验三扫描显示电路的驱动

一、实验目的:

了解教学系统中的8为七段数码管显示模块的工作原理,设计标准扫描驱动电路模块,以备后面实验调用。

二、实验硬件要求:

主芯片:

EP1K10TC100—3,时钟源,八位七段数码显示管,四位拨码开关。

三、实验内容:

1、用拨码开关产生8421BCD码,用CPLD产生自行编码电路和扫描驱动电路,然后进行方针,观察波形,正确后进行设计实现,适配化分。

调节时钟频率,感受“扫描”的过程,并观察字符亮度和显示刷新的效果。

2、编一个简单的从0-F轮换显示十六进制的电路。

四、实验原理:

四位拨码开关提供8421BCD码没,经译码电路后成为七段数码管的自行显示驱动信号。

(A…G)扫描电路通过可调节时钟输出片选地址SEL[2..0]和A…G决定了8位中的哪一位显示和显示什么字形。

SEL[2..0]变化的快慢决定了扫描频率的快慢。

五、实验程序及程序图

1、译码器DELED程序代码:

SUBDESIGNdeled

num[3..0]:

INPUT;

a,b,c,d,e,f,g:

OUTPUT;

BEGIN

TABLE

num[3..0]=>a,b,c,d,e,f,g;

H"0"=>1,1,1,1,1,1,0;

H"1"=>0,1,1,0,0,0,0;

H"2"=>1,1,0,1,1,0,1;

H"3"=>1,1,1,1,0,0,1;

H"4"=>0,1,1,0,0,1,1;

H"5"=>1,0,1,1,0,1,1;

H"6"=>1,0,1,1,1,1,1;

H"7"=>1,1,1,0,0,0,0;

H"8"=>1,1,1,1,1,1,1;

H"9"=>1,1,1,1,0,1,1;

H"A"=>1,1,1,0,1,1,1;

H"B"=>0,0,1,1,1,1,1;

H"C"=>1,0,0,1,1,1,0;

H"D"=>0,1,1,1,1,0,1;

H"E"=>1,0,0,1,1,1,1;

H"F"=>1,0,0,0,1,1,1;

ENDTABLE;

END;

2、由程序生成译码器DELED块:

3、调用DELED块创建的扫描电路程序图:

七、实验结果:

拨动开关,数码管显示对应的字符,且逐位扫描显示。

换用不同的时钟频率,当频率小于24Hz时,可以看到明显的扫描闪烁;当频率大于24HZ时,八位数码长时间显示字符,基本看不到扫描现象,且亮度较高;当频率继续增大时,数码管亮度随频率的增大而变暗。

实验四梁祝音乐实验

一、实验目的:

1.了解普通扬声器的工作原理。

2.使用FPGA产生不同的音乐频率。

3.进一步体验FPGA的灵活性。

二、实验硬件要求:

1.375KHz信号源。

2.FPGAEP1K10TC100—3主芯片。

3.扬声器。

三、实验原理:

1、音符的产生:

音符的产生是利用计数器对输入的时钟信号进行分频,然后输入不同的频率来控制扬声器发不同的声音。

2、节拍的产生:

节拍也是利用计数器来实现,如果某一个以音符需要维持的时间比较长,那么久可以在此计数器从计数值A到计数值B之间都维持该音符。

3、乐谱的存储:

乐谱是一个固定的组合电路,根据不同的输入值,然后输出一个固定的值,该值就是音符产生计数器的分频的初始值。

四、实验内容及步骤:

1、编写音乐输出的VHDL代码。

2、用MaxPlusII对其进行编译仿真。

3、在仿真确定无误后,选择芯片ACEX1K10TC100—3。

4、给芯片进行管脚绑定,在此进行编译。

5、根据自己帮点的管脚,在实验箱上对扬声器接口和FPGA之间进行正确连线。

6、给目标板下载代码,观看实验结果。

五、实验连线:

Clk:

时钟输入信号,接375KHz的时钟源。

Spk:

输出,接扬声器部分的输入端。

六、实验VHDL程序:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

----------------------------

entitymusicis

port(clk:

instd_logic;

spk:

bufferstd_logic);

endmusic;

---------------------

architecturebehaveofmusicis

signaltone:

std_logic_vector(10downto0);

signaltone_count:

std_logic_vector(10downto0);

signaltone_index:

integerrange0to15;

signalclk10_count:

std_logic_vector(17downto0);

signaltime:

integerrange0to150;

signalclk10:

std_logic;

begin

process(clk)--generate10hzclocksignal

begin

if(clk'eventandclk='1')then

clk10_count<=clk10_count+1;

if(clk10_count=16#3fff#)then

clk10<=notclk10;

endif;

endif;

endprocess;

process(clk10)

begin

if(clk10'eventandclk10='1')then

if(time=150)then

time<=0;

else

time<=time+1;

endif;

endif;

endprocess;

process(clk10)

begin

if(clk10'eventandclk10='1')then

casetimeis

when0=>tone_index<=3;

when1=>tone_index<=3;

when2=>tone_index<=3;

when3=>tone_index<=3;--

when4=>tone_index<=5;

when5=>tone_index<=5;

when6=>tone_index<=5;

when7=>tone_index<=6;--

when8=>tone_index<=8;

when9=>tone_index<=8;

when10=>tone_index<=8;

when11=>tone_index<=9;--

when12=>tone_index<=6;

when13=>tone_index<=8;

when14=>tone_index<=5;

when15=>tone_index<=5;--

when16=>tone_index<=12;

when17=>tone_index<=12;

when18=>tone_index<=12;

when19=>tone_index<=15;--

when20=>tone_index<=13;

when21=>tone_index<=12;

when22=>tone_index<=10;

when23=>tone_index<=12;--

when24=>tone_index<=9;

when25=>tone_index<=9;

when26=>tone_index<=9;

when27=>tone_index<=9;--

when28=>tone_index<=9;

when29=>tone_index<=9;

when30=>tone_index<=0;

when31=>tone_index<=0;--

when32=>tone_index<=9;

when33=>tone_index<=9;

when34=>tone_index<=9;

when35=>tone_index<=10;--

when36=>tone_index<=7;

when37=>tone_index<=7;

when38=>tone_index<=6;

when39=>tone_index<=6;--

when40=>tone_index<=5;

when41=>tone_index<=5;

when42=>tone_index<=5;

when43=>tone_index<=6;--

when44=>tone_index<=8;

when45=>tone_index<=8;

when46=>tone_index<=9;

when47=>tone_index<=9;--

when48=>tone_index<=3;

when49=>tone_index<=3;

when50=>tone_index<=8;

when51=>tone_index<=8;--

when52=>tone_index<=6;

when53=>tone_index<=5;

when54=>tone_index<=6;

when55=>tone_index<=8;--

when56=>tone_index<=5;

when57=>tone_index<=5;

when58=>tone_index<=5;

when59=>tone_index<=5;--

when60=>tone_index<=5;

when61=>tone_index<=5;

when62=>tone_index<=0;

when63=>tone_index<=0;----

when64=>tone_index<=10;

when65=>tone_index<=10;

when66=>tone_index<=10;

when67=>tone_index<=12;--

when68=>tone_index<=7;

when69=>tone_index<=7;

when70=>tone_index<=9;

when71=>tone_index<=9;--

when72=>tone_index<=6;

when73=>tone_index<=8;

when74=>tone_index<=5;

when75=>tone_index<=5;--

when76=>tone_index<=5;

when77=>tone_index<=5;

when78=>tone_index<=5;

when79=>tone_index<=5;--

when80=>tone_index<=5;

when81=>tone_index<=0;

when82=>tone_index<=0;

when83=>tone_index<=3;--

when84=>tone_index<=5;

when85=>tone_index<=3;

when86=>tone_index<=5;

when87=>tone_index<=5;--

when88=>tone_index<=6;

when89=>tone_index<=7;

when90=>tone_index<=9;

when91=>tone_index<=6;--

when92=>tone_index<=6;

when93=>tone_index<=6;

when94=>tone_index<=6;

when95=>tone_index<=6;--

when96=>tone_index<=6;

when97=>tone_index<=5;

when98=>tone_index<=6;

when99=>tone_index<=8;--

when100=>tone_index<=8;

when101=>tone_index<=8;

when102=>tone_index<=9;

when103=>tone_index<=12;--

when104=>tone_index<=12;

when105=>tone_index<=12;

when106=>tone_index<=10;

when107=>tone_index<=9;--

when108=>tone_index<=9;

when109=>tone_index<=10;

when110=>tone_index<=9;

when111=>tone_index<=8;--

when112=>tone_index<=8;

when113=>tone_index<=6;

when114=>tone_index<=5;

when115=>tone_index<=3;--

when116=>tone_index<=3;

when117=>tone_index<=3;

when118=>tone_index<=3;

when119=>tone_index<=8;--

when120=>tone_index<=8;

when121=>tone_index<=8;

when122=>tone_index<=8;

when123=>tone_index<=6;--

when124=>tone_index<=8;

when125=>tone_index<=6;

when126=>tone_index<=5;

when127=>tone_index<=3;--

when128=>tone_index<=5;

when129=>tone_index<=6;

when130=>tone_index<=8;

when131=>tone_index<=5;--

when132=>tone_index<=5;

when133=>tone_index<=5;

when134=>tone_index<=5;

when135=>tone_index<=5;--

when136=>tone_index<=5;

when137=>tone_index<=5;

when138=>tone_index<=0;

when139=>tone_index<=0;--

whenothers=>tone_index<=0;

endcase;

endif;

endprocess;

process(tone_index)

begin

casetone_indexis

when0=>tone<="11111111111";--nooutput

when1=>tone<="01100000101";--773

when2=>tone<="01110010000";--912

when3=>tone<="10000001100";--1036

when5=>tone<="10010101101";--1197

when6=>tone<="10100001010";--1290

when7=>tone<="10101011100";--1372

when8=>tone<="10110000010";--1410

when9=>tone<="10111001000";--1480

when10=>tone<="11000000110";--1542

when12=>tone<="11001010110";--1622

when13=>tone<="11010000100";--1668

when15=>tone<="11011000000";--1728

whenothers=>tone<="11111111111";--others:

nooutput

endcase;

endprocess;

process(clk)--controlthefrequenceofthespeaker

begin

if(clk'eventandclk='1')then

if(tone_count=16#7ff#)then

tone_count<=tone;

if(tone<2047)then

spk<=notspk;

endif;

else

tone_count<=tone_count+1;

endif;

endif;

endprocess;

endbehave;

六、实验结果

接6M时钟频率,蜂鸣器奏响比较动听的《梁祝》音乐,如用其他频率,音乐会走调失真。

实验五键盘控制电路设计

实验目的

学习键盘扫描电路的工作原理。

实验内容

设计一个4×4键盘接口控制电路。

实验仪器

ZY11EDA13BE型实验箱通用编程模块,配置模块,时钟源模块,开关按键模块,4×4键盘模块,LED显示模块,数码管显示模块。

实验原理

键盘是应用数字系统重要的人机接口,主要完成向处理器输入数据、传送命令等功能,是人工控制电子系统运行的重要手段。

本实验介绍简单的键盘工作原理、键盘按键的识别过程以及与键盘与CPLD/FPGA的接口。

键盘实质上是一个按键开关的集合,如图34-1所示。

通常,按键所用的开关为机械弹性开关,利用了机械触点的合、断作用。

一个电压信号通过机械触点的断开、闭合过程的波形如图34-2所示。

由于机械触点的弹性作用,一个按键开关在闭合时不会马上稳定的接通,在断开时也不会立即断开,因而在闭合及断开的瞬间均伴随有一连串的抖动,抖动时间的长短由按键的机械特性决定,一般为5~10ms,这是一个很重要的时间参数,在很多场合都要用到。

图34-14×4键盘

图34-2按键抖动信号波形

按键闭合稳定期的长短则是由操作人员的按键动作决定的,一般为十分之几秒到几秒的时间,这个时间参数可作为一般的参考。

另外按键的闭合与否,反应在电压上就是呈现出高电平或低电平,如果低电平表示断开的话,那么高电平表示闭合,所以通过电平的高低状态的检测,便可以确认按键按下与否。

图34-3为键盘控制电路的顶层原理图:

图34-3键盘控制电路的顶层原理图

在图34-3中,COUNT模块提供键盘的行扫描信号Q[3..0]。

在没有按键按下时,此时的使能信号EN为高电平,行扫描输出信号Q[3..0]的变化顺序为0001→0010→0100→1000→0001依次周而复始(依次扫描4行按键)。

当有按键按下时,此时的使能信号EN为低电平,行扫描输出信号

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2