eap项目总结报告.docx

上传人:b****1 文档编号:14126377 上传时间:2023-06-20 格式:DOCX 页数:9 大小:37.78KB
下载 相关 举报
eap项目总结报告.docx_第1页
第1页 / 共9页
eap项目总结报告.docx_第2页
第2页 / 共9页
eap项目总结报告.docx_第3页
第3页 / 共9页
eap项目总结报告.docx_第4页
第4页 / 共9页
eap项目总结报告.docx_第5页
第5页 / 共9页
eap项目总结报告.docx_第6页
第6页 / 共9页
eap项目总结报告.docx_第7页
第7页 / 共9页
eap项目总结报告.docx_第8页
第8页 / 共9页
eap项目总结报告.docx_第9页
第9页 / 共9页
亲,该文档总共9页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

eap项目总结报告.docx

《eap项目总结报告.docx》由会员分享,可在线阅读,更多相关《eap项目总结报告.docx(9页珍藏版)》请在冰点文库上搜索。

eap项目总结报告.docx

eap项目总结报告

验一:

译码器及计数器设计实验

1、实验目的

1)复习二进制译码器的功能。

2)学习VHDL语言源程序输入方法。

3)学习VHDL语言源程序检查和修改。

4)掌握用VHDL语言设计一个3线-8线译码器和六十进制计数器的方法。

5)掌握VHDL语言编辑器的基本操作。

2、实验内容

1)本实验给出了有错误的3线—8线译码器的VHDL程序,请采用VHDL编辑器,修改调试程序。

2)采用VHDL设计方法,设计一个60进制计数器,采用BCD码输出。

3、实验步骤

(一)、3—8译码器

1、分析3—8译码器原理,设计相应端口以及信号输入输出变量等。

2、其中A、B、C为三位二进制代码输人端。

Y0-Y7是八个输出端,G1、G2A、G2B为三个输入控制端。

只有当G1=1,G2A=0,G2B=0时,译译码器才处于工作状态。

否则、译码器将处在禁止状态,所有输出端全为高电平。

3、

(二)、设计一个60进制计数器,采用BCD码输出。

1)BCD码:

用4位二进制数编码表示1位十进制数

2)一个十进制计数器即为一个4位二进制计数器,若将两个4位二进制计数器连接起来就可构成100进制以内的计数器。

实验程序

1、3-8译码器

libraryIEEE;

useIEEE.STD_LOGIC_1164.ALL;

useIEEE.STD_LOGIC_ARITH.ALL;

useIEEE.STD_LOGIC_UNSIGNED.ALL;

--Uncommentthefollowinglinestousethedeclarationsthatare

--providedforinstantiatingXilinxprimitivecomponents.

--libraryUNISIM;

entityT138is

port(A,B,C,G1,G2A,G2B:

instd_logic;

Y:

outstd_logic_vector(7downto0));

endT138;

architectureBehavioralofT138is

signalD_IN:

std_logic_vector(2downto0);

begin

D_IN<=C&B&A;

process(D_IN,G1,G2A,G2B)

begin

if(G1='1'andG2A='0'andG2B='0')then

caseD_INis

when"000"=>Y<="00000001";

when"001"=>Y<="00000010";

when"010"=>Y<="00000100";

when"011"=>Y<="00001000";

when"100"=>Y<="00010000";

when"101"=>Y<="00100000";

when"110"=>Y<="01000000";

when"111"=>Y<=;

whenothers=>null;

endcase;

elseY<=;

endif;

endprocess;

endBehavioral;

仿真结果:

2.60进制计数器

实验程序:

libraryIEEE;

useIEEE.STD_LOGIC_1164.ALL;

useIEEE.STD_LOGIC_ARITH.ALL;

useIEEE.STD_LOGIC_UNSIGNED.ALL;

--Uncommentthefollowinglinestousethedeclarationsthatare

--providedforinstantiatingXilinxprimitivecomponents.

--libraryUNISIM;

entityjishuqiis

port(clk:

instd_logic;

en,clr:

instd_logic;

q,qd:

outstd_logic_vector(3downto0));

endjishuqi;

architectureBehavioralofjishuqiis

signalco:

std_logic;

signalql,qh:

std_logic_vector(3downto0);

begin

q(3)<=qh(3);

q

(2)<=qh

(2);

q

(1)<=qh

(1);

q(0)<=qh(0);

qd(3)<=ql(3);

qd

(2)<=ql

(2);

qd

(1)<=ql

(1);

qd(0)<=ql(0);

P1:

process(clk,en,clr)

begin

if(clr='1')then

ql<="0000";

elsif(clk'eventandclk='1')then

if(en='1')then

if(ql="1001")then

ql<="0000";

else

ql<=ql+'1';

endif;

endif;

endif;

endprocessP1;

co<=ql(3)andql(0);

P2:

process(clk,clr)

begin

if(clr='1')then

qh<="0000";

elsif

(clk'eventandclk='1')then

if(co='1')then

if(qh="0101")then

qh<="0000";

else

qh<=qh+'1';

endif;

endif;

endif;

endprocessP2;

endBehavioral;

仿真结果:

实验二、四位全加器和8位移位寄存器设计实验

1、实验目的

1)学习了解加法器工作原理。

2)学习用VHDL语言设计全加器的设计方法。

3)学习使用元件例化的方法设计多位加法器。

4)了解移位寄存器的工作原理

5)学习移位寄存器设计方法

2、实验内容

1)用VHDL语言设计全加器。

2)用元件例化方法设计一个四位二进制加法器。

3)用VHDL语言设计一个双向可控移位寄存器

3、实验步骤

1)4位二进制加法器可以由4个一位全加器通过级联的方式构成。

全加器:

完成加数、被加数、低位的进位数三个1位数相加,并产生本位“和”及向高位“进位”。

2)移位寄存器是由D-型触发器构成的,将前一个触发器的输出作为下一个触发器的输入,每个触发器的时钟连接成同步方式。

常用的移位寄存器有并行输入串行输出移位寄存器和串行输入并行输出移位寄存器。

这些移位寄存器经常用作串并转换电路。

试验程序:

1.用元件例化方法设计一个四位二进制加法器。

全加器:

libraryIEEE;

useIEEE.STD_LOGIC_1164.ALL;

useIEEE.STD_LOGIC_ARITH.ALL;

useIEEE.STD_LOGIC_UNSIGNED.ALL;

--Uncommentthefollowinglinestousethedeclarationsthatare

--providedforinstantiatingXilinxprimitivecomponents.

--libraryUNISIM;

entityquanjiais

port(a,b,cin:

instd_logic;

cout,sum:

outstd_logic);

endquanjia;

architectureBehavioralofquanjiais

signalint:

std_logic;

begin

int<=axorb;

cout<=(aandb)or(intandcin);

sum<=intxorcin;

endBehavioral;

四位加法器:

libraryIEEE;

useIEEE.STD_LOGIC_1164.ALL;

useIEEE.STD_LOGIC_ARITH.ALL;

useIEEE.STD_LOGIC_UNSIGNED.ALL;

--Uncommentthefollowinglinestousethedeclarationsthatare

--providedforinstantiatingXilinxprimitivecomponents.

--libraryUNISIM;

entitysiweiis

generic(n:

integer:

=4);

port(a,b:

instd_logic_vector(ndownto1);

cin:

instd_logic;

sum:

outstd_logic_vector(ndownto1);

cout:

outstd_logic

);

endsiwei;

architectureBehavioralofsiweiis

componentquanjia

port(a,b,cin:

instd_logic;

sum,cout:

outstd_logic);

endcomponent;

signalcarry:

std_logic_vector(ndownto1);

begin

U1:

quanjiaportmap(a

(1),b

(1),cin,sum

(1),carry

(1));

U2:

quanjiaportmap(a

(2),b

(2),carry

(1),sum

(2),carry

(2));

U3:

quanjiaportmap(a(3),b(3),carry

(2),sum(3),carry(3));

U4:

quanjiaportmap(a(4),b(4),carry(3),sum(4),cout);

endBehavioral;

实验截图:

2.用VHDL语言设计一个8位双向可控移位寄存器。

程序代码:

libraryIEEE;

useIEEE.STD_LOGIC_1164.ALL;

useIEEE.STD_LOGIC_ARITH.ALL;

useIEEE.STD_LOGIC_UNSIGNED.ALL;

--Uncommentthefollowinglinestousethedeclarationsthatare

--providedforinstantiatingXilinxprimitivecomponents.

--libraryUNISIM;

entityyiweiis

port(Dim:

instd_logic;

S:

instd_logic;

clk:

instd_logic;

Q:

outstd_logic_vector(7downto0));

endyiwei;

architectureBehavioralofyiweiis

signalqtemp:

std_logic_vector(7downto0):

="00000000";

begin

process(clk,S)

begin

if(clk'eventandclk='1')then

if(S='1')then

qtemp<=qtemp(6downto0)&Dim;

elseqtemp<=Dim&qtemp(7downto1);

endif;

endif;

endprocess;

Q<=qtemp;

endBehavioral;

实验截图:

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

当前位置:首页 > 法律文书 > 调解书

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

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