EDA实验汇总Word文档格式.docx
- 文档编号:16551609
- 上传时间:2022-11-24
- 格式:DOCX
- 页数:16
- 大小:131.38KB
EDA实验汇总Word文档格式.docx
《EDA实验汇总Word文档格式.docx》由会员分享,可在线阅读,更多相关《EDA实验汇总Word文档格式.docx(16页珍藏版)》请在冰豆网上搜索。
outstd_logic);
endtest;
architecturebehaveoftestis
begin
p1:
process(A,B,i1,i2,i3)
begin
if(A>
B)thenG<
='
1'
;
M<
0'
L<
elsif(A<
elsif(A=B)thenG<
if(i2='
)thenG<
elsif(i1='
elsif(i3='
endif;
endprocessp1;
endbehave;
实验三并行加法器设计
(1)设计四位加法器。
(3)体会用HDL进行逻辑描述的优点
(2)熟悉层次化设计方法
entitythreeis
port(a:
instd_logic_vector(3downto0);
ci:
instd_logic;
co:
outstd_logic;
s:
outstd_logic_vector(3downto0));
end;
architecturebehaveofthreeis
process(a,b,ci)
variablevsum:
std_logic_vector(3downto0);
variablecarry:
std_logic;
carry:
=ci;
foriin0to3loop
vsum(i):
=(a(i)xorb(i))xorcarry;
carry:
=(a(i)andb(i))or(carryand(a(i)orb(i)));
endloop;
s<
=vsum;
co<
=carry;
endprocess;
end;
实验五计数器设计
掌握使用HDL描述计数器类型模块的基本方法
useieee.std_logic_arith.all;
entityfiveis
port(d:
outintegerrange0to9;
reset:
enable:
inbit;
clk:
q:
architecturebehaveoffiveis
process(clk,enable)
variablecnt:
integerrange0to9;
variableco:
if(clk'
eventandclk='
)then
if(reset='
if(enable='
if(cnt=9)then
cnt:
=0;
elseco:
=cnt+1;
endif;
elsecnt:
co:
endif;
d<
=cnt;
q<
=co;
endprocess;
实验六巴克码发生器设计
(1)实现一个在通信领域经常使用的巴克码发生器
(2)掌握用大规模可编程逻辑器件实现时序电路的方法
useieee.std_logic_unsigned.all;
port(clk:
output:
outbit;
pat:
outbit);
architecturebakoftestis
typestate_typeis(s0,s1,s2,s3,s4,s5,s6);
signalpresent_state,next_state:
state_type;
process1:
process(present_state)
begin
casepresent_stateis
whens0=>
output<
next_state<
=s1;
pat<
='
whens1=>
=s2;
whens2=>
=s3;
whens3=>
=s4;
whens4=>
=s5;
whens5=>
=s6;
whens6=>
=s0;
endcase;
endprocess;
prosess2:
process(clk)
if(clk'
)
thenpresent_state<
=next_state;
endbak;
实验七巴克码检测器设计
(1)实现一个在通信领域经常使用的巴克码检测器的设计方法
(2)掌握使用状态机设计时序电路的方法
本程序没有复位端,语言代码如下:
entitysevenis
port(code:
det:
endentity;
architecturebehaveofsevenis
signalq0,q1,q2,q3,q4,q5,q6:
q0<
=code;
q1<
=q0;
q2<
=q1;
q3<
=q2;
q4<
=q3;
q5<
=q4;
q6<
=q5;
variableq:
=q6andq5andq4and(notq3)and(notq2)andq1and(notq0);
det<
=q;
4、软件仿真
图像如下:
实验八交通灯信号控制器设计
(1)设计交通灯控制器
(2)学习状态机的设计方法
(4)打印机一台
(5)其它器件与材料若干
entityeightis
port(clk,enable,sens1,sens0:
r1,y1,g1,r0,y0,g0:
outstd_logic;
qout:
outstd_logic_vector(13downto0);
qout1:
outstd_logic_vector(6downto0));
endeight;
architecturearcofeightis
typestate_typeis(a,b,c,d);
signalstate:
state_type;
signalcp:
cnt:
process(clk)
integerrange0to19;
variablenclr,en:
bit;
variabletemp:
integerrange0to40000000
;
ifenable='
then
)then
iftemp=40000000then
temp:
cp<
=notcp;
elsetemp:
=temp+1;
ifcp'
eventandcp='
ifnclr='
thencnt:
elsifen='
casestateis
whena=>
r1<
y1<
g1<
r0<
y0<
g0<
if(sens0andsens1)='
then
ifcnt=19then
state<
=b;
nclr:
en:
else
=a;
elsif(sens0and(notsens1))='
casecntis
when19=>
qout<
="
00000010000001"
when18=>
00000011001111"
when17=>
00000010010010"
when16=>
00000010000110"
when15=>
00000011001100"
when14=>
00000010100100"
when13=>
00000010100000"
when12=>
00000010001111"
when11=>
00000010000000"
when10=>
00000010000100"
when9=>
10011110000001"
when8=>
10011111001111"
when7=>
10011110010010"
when6=>
10011110000110"
when5=>
10011111001100"
when4=>
10011110100100"
when3=>
10011110100000"
when2=>
10011110001111"
when1=>
10011110000000"
when0=>
10011110000100"
whenothers=>
11111111111111"
whenb=>
ifcnt=4then
=c;
else
qout1<
1001100"
0000110"
0010010"
1001111"
0000001"
1111111"
whenc=>
if(sens0andsens1)='
ifcnt=19then
=d;
elsifsens0='
whend=>
endprocesscnt;
endarc;
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- EDA 实验 汇总
![提示](https://static.bdocx.com/images/bang_tan.gif)