多路波形发生器地设计.docx

上传人:b****5 文档编号:12178192 上传时间:2023-04-17 格式:DOCX 页数:10 大小:186.14KB
下载 相关 举报
多路波形发生器地设计.docx_第1页
第1页 / 共10页
多路波形发生器地设计.docx_第2页
第2页 / 共10页
多路波形发生器地设计.docx_第3页
第3页 / 共10页
多路波形发生器地设计.docx_第4页
第4页 / 共10页
多路波形发生器地设计.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

多路波形发生器地设计.docx

《多路波形发生器地设计.docx》由会员分享,可在线阅读,更多相关《多路波形发生器地设计.docx(10页珍藏版)》请在冰豆网上搜索。

多路波形发生器地设计.docx

多路波形发生器地设计

北京交通大学

 

电工电子教学基地

 

实验报告

 

实验课程:

EDA技术

实验名称:

多路波形发生器的设计

实验台:

1号班级:

四班学号:

08291123姓名:

游振南

实验日期:

2010年10月24日成绩:

 

一·实验内容及其目的:

1.熟悉多路发生器的原理还有输出相位差和占空比的原理。

2.熟练用QUARTERII进行电路的编程和仿真。

3.熟练使用IF语句。

二·实验设计思路

.1。

多路发生器的原理用分频器而且是可调的因此先设div:

integerrange1to4;。

通过信号赋值(tmp,tmp1,tmp2)赋给输出信号A,B,C.通过n改变输出频率。

定义各个变量。

2.。

当resetb=0时,countQ=0;

当resetb=1时。

给脉冲时先定义分频比如果countQ<(6*div-1)时countQ<=countQ+1;否者countQ为0。

4.当cltr=01时即H:

L=1:

1时

1如果countQ<3*div时tmp<=’0’;否者tmp<=’1’

2如果countQ<2*divorcountQ>(6*div-2))时tmp1<='1';

否者tmp1<='0';

3如果countQ(4*div-1)时tmp2<='0';

4否者tmp2<='1';

5A等于tmp;B=tmp2;C=tmp3;

同理:

当cltr=10时即H:

L=1:

2时

当cltr=11时即H:

L=2:

1时。

 

其中;公式推导如下:

当div=1,cltr=01时当div=2,cltr=01时

countQ<6countQ<12

A:

000111;A:

000000111111

B:

110001;B:

111100000011

C:

011100;C:

001111110000

A:

countQ<3时tmp=0A;countQ<6时tmp=0

Elsetmp=1Elsetmp=1

B:

countQ<2orcountQ>4时tmp=1B:

countQ<4orcountQ>10,tmp=1

Elsetmp=0Elsetmp=0

C:

countQ<1orcountQ>3时tmp=0C:

countQ<2orcountQ>7时tmp=0

Elsetmp=1Elsetmp=1

同理:

cltr=10,cltr=11.

当cltr=01时

if(countQ<3*div)thentmp<='0';elsetmp<='1';

if(countQ<2*divorcountQ>(6*div-2))thentmp1<='1';elsetmp1<='0';

if(countQ(4*div-1))thentmp2<='0';elsetmp2<='1';

当cltr=10时

if(countQ<4*div)thentmp<='0';elsetmp<='1';

if(countQ<2*div)thentmp1<='1';elsetmp1<='0';

if(countQ<2*divorcountQ>(4*div-1))thentmp2<='0';elsetmp2<='1';

当cltr=11时

if(countQ<2*div)thentmp<='0';elsetmp<='1';

if(countQ<2*divorcountQ>(4*div-1))thentmp1<='1';elsetmp1<='0';

if(countQ<4*div)thentmp2<='1';elsetmp2<='0';

将信号tmp赋给A;tmp1赋给B;tmp2赋给C;

三·流程图:

 

四·程序及仿真波形:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entityboxingis

port(clk,resetb:

instd_logic;

cltr:

instd_logic_vector(1downto0);

div:

integerrange1to4;

A,B,C:

outstd_logic);

endboxing;

architectureaofboxingis

signalcountQ:

integerrange0to255;

signaltmp:

std_logic;

signaltmp1:

std_logic;

signaltmp2:

std_logic;

begin

process(clk,resetb)

begin

ifclk'eventandclk='1'then

if(resetb='0')then

countQ<=0;

else

if(countQ<(6*div-1))then

countQ<=countQ+1;

elsecountQ<=0;

endif;

endif;

endif;

endprocess;

process(cltr,countQ)

begin

if(cltr=01)then

if(countQ<3*div)then

tmp<='0';

elsetmp<='1';

endif;

if(countQ<2*divorcountQ>(6*div-2))then

tmp1<='1';

elsetmp1<='0';

endif;

if(countQ(4*div-1))then

tmp2<='0';

elsetmp2<='1';

endif;

endif;

if(cltr=10)then

if(countQ<4*div)then

tmp<='0';

elsetmp<='1';

endif;

if(countQ<2*div)then

tmp1<='1';

elsetmp1<='0';

endif;

if(countQ<2*divorcountQ>(4*div-1))then

tmp2<='0';

elsetmp2<='1';

endif;

endif;

if(cltr=11)then

if(countQ<2*div)then

tmp<='0';

elsetmp<='1';

endif;

if(countQ<2*divorcountQ>(4*div-1))then

tmp1<='1';

elsetmp1<='0';

endif;

if(countQ<4*div)then

tmp2<='1';

elsetmp2<='0';

endif;

endif;

endprocess;

A<=tmp;

B<=tmp1;

C<=tmp2;

enda;

仿真图:

div=1,cltr=01时

 

div=1,cltr=10

div=1,cltr=11

div=2,cltr=01

div=2,cltr=10

div=2,cltr=11

div=3,cltr=01

div=3,cltr=10

div=3,cltr=11

 

div=4,cltr=01

 

div=4,cltr=10

div=4,cltr=11

五·实验中遇到的问题及解决步骤

1.定义div为变量?

div:

integerrange1to4

2.占空比原理?

通过网络查找相关定义和通过网络和图书馆查找6分频分频器汇编中设定占空比推出相关频率的占空比。

3.通过控制div(1~4)改变输出相应得分频?

开始时只能编写6分频的分频器无法通过改变div改变输出频率。

通过助教老师的讲解通过设置div为变量把六分频分频器中的公式变换即可。

4.A,B,C,输出三路相位差120的意思?

通过网上查找A,B,C输出三路占空比一样延迟2/3T(T:

分频后的周期)。

5.Process()中应该填写什么?

开始时不知道填写什么。

后来通过看书中的程序知道里面填写的是要输入的信号。

.6.A,B,C通过什么控制三路相差120度?

首先想到通过控制时间延迟为20ns和40ns发现如果clk一个脉冲时间变化就会导致波形不一样而且分频不一样导致延迟时间不一样。

然后想到通过一个一个的把波形用高低电平。

通过给一个脉冲,控制cltr,div观察输出A,B,C的电平可是编写这样太麻烦了。

后来通过观察A,B,C每一个脉冲的输出电平找出其规律通过公式编写从而使汇编变得简单些。

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

当前位置:首页 > PPT模板 > 图表模板

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1