什么是多路波形发生器?

我不太理解题目的意思quartus2设计多路波形发生器(VHDL)基本要求:1、对输入时钟信号进行分频,实现三路互差120°的信号。2、实现输出信号的占空比控制clk:输... 我不太理解题目的意思

quartus2 设计多路波形发生器(VHDL)
基本要求:
1、对输入时钟信号进行分频,实现三路互差120°的信号。
2、实现输出信号的占空比控制
clk: 输入时钟信号
reset: 同步复位信号(低电平有效)
div: 输入分频控制信号(注意:6n分频)
ctrl: 占空比控制信号(H:L)
ctrl=1,占空比1:1
ctrl=2,占空比1:2
ctrl=3,占空比2:1
A、B、C: 三路输出信号
展开
 我来答
幽灵漫步祈求者
高粉答主

2015-07-29 · 每个回答都超有意思的
知道大有可为答主
回答量:2.9万
采纳率:82%
帮助的人:5892万
展开全部
  多路波形发生器是一种数据信号发生器,在调试硬件时,常常需要加入一些信号,以观察电路工作是否正常。用一般的信号发生器,不但笨重,而且只发一些简单的波形,不能满足需要。多路波形发生器功能,就可以定义串口数据。通过逻辑探勾输出,调试起来简单快捷。
  多路波形发生器操作方法:将逻辑探勾接在J3插槽上,波形发生器通过J3可以输出8路自定义数字波形,每路可以单独加在用户板的任何输入端。波形发生器可以选择不同的时间基数,做为定义波形的最短间。波形发生器可自动返回, 循环产生波形。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
王芳的大猪蹄子
2011-10-20
知道答主
回答量:9
采纳率:0%
帮助的人:9.6万
展开全部
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity zonghe is
port
(
clk:in std_logic;
aclk:out std_logic;
bclk:out std_logic;
cclk:out std_logic;
resetb:in std_logic;
div:in std_logic_vector(1 downto 0);
ctrl:in std_logic_vector(1 downto 0)
);
end zonghe;

architecture behave of zonghe is
signal tmp:std_logic;
signal tmp1:std_logic;
signal tmp2:std_logic;
signal cnt0:integer range 0 to 5:=0;
signal cnt1:integer range 0 to 11:=0;
signal cnt2:integer range 0 to 17:=0;
signal cnt3:integer range 0 to 23:=0;
begin
process(clk,resetb,div,ctrl)
begin
if clk'event and clk='1' then
if resetb='0' then
cnt0<=0;
cnt1<=0;
cnt2<=0;
cnt3<=0;
tmp<='0';
tmp1<='0';
tmp2<='0';
elsif resetb='1' then
cnt0<=cnt0+1;
cnt1<=cnt1+1;
cnt2<=cnt2+1;
cnt3<=cnt3+1;
case ctrl is
when "01"=>
case div is
when "00"=>
case cnt0 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='1';
when 2=>tmp<='0';tmp1<='0';tmp2<='1';
when 3=>tmp<='1';tmp1<='0';tmp2<='1';
when 4=>tmp<='1';tmp1<='0';tmp2<='0';
when 5=>tmp<='1';tmp1<='1';tmp2<='0';cnt0<=0;
end case;
when "01"=>
case cnt1 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='1';
when 3=>tmp<='0';tmp1<='1';tmp2<='1';
when 4=>tmp<='0';tmp1<='0';tmp2<='1';
when 5=>tmp<='0';tmp1<='0';tmp2<='1';
when 6=>tmp<='1';tmp1<='0';tmp2<='1';
when 7=>tmp<='1';tmp1<='0';tmp2<='1';
when 8=>tmp<='1';tmp1<='0';tmp2<='0';
when 9=>tmp<='1';tmp1<='0';tmp2<='0';
when 10=>tmp<='1';tmp1<='1';tmp2<='0';
when 11=>tmp<='1';tmp1<='1';tmp2<='0';cnt1<=0;
end case;
when "10"=>
case cnt2 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='0';
when 3=>tmp<='0';tmp1<='1';tmp2<='1';
when 4=>tmp<='0';tmp1<='1';tmp2<='1';
when 5=>tmp<='0';tmp1<='1';tmp2<='1';
when 6=>tmp<='0';tmp1<='0';tmp2<='1';
when 7=>tmp<='0';tmp1<='0';tmp2<='1';
when 8=>tmp<='0';tmp1<='0';tmp2<='1';
when 9=>tmp<='1';tmp1<='0';tmp2<='1';
when 10=>tmp<='1';tmp1<='0';tmp2<='1';
when 11=>tmp<='1';tmp1<='0';tmp2<='1';
when 12=>tmp<='1';tmp1<='0';tmp2<='0';
when 13=>tmp<='1';tmp1<='0';tmp2<='0';
when 14=>tmp<='1';tmp1<='0';tmp2<='0';
when 15=>tmp<='1';tmp1<='1';tmp2<='0';
when 16=>tmp<='1';tmp1<='1';tmp2<='0';
when 17=>tmp<='1';tmp1<='1';tmp2<='0';cnt2<=0;
end case;
when "11"=>
case cnt3 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='0';
when 3=>tmp<='0';tmp1<='1';tmp2<='0';
when 4=>tmp<='0';tmp1<='1';tmp2<='1';
when 5=>tmp<='0';tmp1<='1';tmp2<='1';
when 6=>tmp<='0';tmp1<='1';tmp2<='1';
when 7=>tmp<='0';tmp1<='1';tmp2<='1';
when 8=>tmp<='0';tmp1<='0';tmp2<='1';
when 9=>tmp<='0';tmp1<='0';tmp2<='1';
when 10=>tmp<='0';tmp1<='0';tmp2<='1';
when 11=>tmp<='0';tmp1<='0';tmp2<='1';
when 12=>tmp<='1';tmp1<='0';tmp2<='1';
when 13=>tmp<='1';tmp1<='0';tmp2<='1';
when 14=>tmp<='1';tmp1<='0';tmp2<='1';
when 15=>tmp<='1';tmp1<='0';tmp2<='1';
when 16=>tmp<='1';tmp1<='0';tmp2<='0';
when 17=>tmp<='1';tmp1<='0';tmp2<='0';
when 18=>tmp<='1';tmp1<='0';tmp2<='0';
when 19=>tmp<='1';tmp1<='0';tmp2<='0';
when 20=>tmp<='1';tmp1<='1';tmp2<='0';
when 21=>tmp<='1';tmp1<='1';tmp2<='0';
when 22=>tmp<='1';tmp1<='1';tmp2<='0';
when 23=>tmp<='1';tmp1<='1';tmp2<='0';cnt3<=0;
end case;
end case;
when "10"=>
case div is
when "00"=>
case cnt0 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='0';tmp2<='1';
when 3=>tmp<='0';tmp1<='0';tmp2<='1';
when 4=>tmp<='1';tmp1<='0';tmp2<='0';
when 5=>tmp<='1';tmp1<='0';tmp2<='0';cnt0<=0;
end case;
when "01"=>
case cnt1 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='0';
when 3=>tmp<='0';tmp1<='1';tmp2<='0';
when 4=>tmp<='0';tmp1<='0';tmp2<='1';
when 5=>tmp<='0';tmp1<='0';tmp2<='1';
when 6=>tmp<='0';tmp1<='0';tmp2<='1';
when 7=>tmp<='0';tmp1<='0';tmp2<='1';
when 8=>tmp<='1';tmp1<='0';tmp2<='0';
when 9=>tmp<='1';tmp1<='0';tmp2<='0';
when 10=>tmp<='1';tmp1<='0';tmp2<='0';
when 11=>tmp<='1';tmp1<='0';tmp2<='0';cnt1<=0;
end case;
when "10"=>
case cnt2 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='0';
when 3=>tmp<='0';tmp1<='1';tmp2<='0';
when 4=>tmp<='0';tmp1<='1';tmp2<='0';
when 5=>tmp<='0';tmp1<='1';tmp2<='0';
when 6=>tmp<='0';tmp1<='0';tmp2<='1';
when 7=>tmp<='0';tmp1<='0';tmp2<='1';
when 8=>tmp<='0';tmp1<='0';tmp2<='1';
when 9=>tmp<='0';tmp1<='0';tmp2<='1';
when 10=>tmp<='0';tmp1<='0';tmp2<='1';
when 11=>tmp<='0';tmp1<='0';tmp2<='1';
when 12=>tmp<='1';tmp1<='0';tmp2<='0';
when 13=>tmp<='1';tmp1<='0';tmp2<='0';
when 14=>tmp<='1';tmp1<='0';tmp2<='0';
when 15=>tmp<='1';tmp1<='0';tmp2<='0';
when 16=>tmp<='1';tmp1<='0';tmp2<='0';
when 17=>tmp<='1';tmp1<='0';tmp2<='0';cnt2<=0;
end case;
when "11"=>
case cnt3 is
when 0=>tmp<='0';tmp1<='1';tmp2<='0';
when 1=>tmp<='0';tmp1<='1';tmp2<='0';
when 2=>tmp<='0';tmp1<='1';tmp2<='0';
when 3=>tmp<='0';tmp1<='1';tmp2<='0';
when 4=>tmp<='0';tmp1<='1';tmp2<='0';
when 5=>tmp<='0';tmp1<='1';tmp2<='0';
when 6=>tmp<='0';tmp1<='1';tmp2<='0';
when 7=>tmp<='0';tmp1<='1';tmp2<='0';
when 8=>tmp<='0';tmp1<='0';tmp2<='1';
when 9=>tmp<='0';tmp1<='0';tmp2<='1';
when 10=>tmp<='0';tmp1<='0';tmp2<='1';
when 11=>tmp<='0';tmp1<='0';tmp2<='1';
when 12=>tmp<='0';tmp1<='0';tmp2<='1';
when 13=>tmp<='0';tmp1<='0';tmp2<='1';
when 14=>tmp<='0';tmp1<='0';tmp2<='1';
when 15=>tmp<='0';tmp1<='0';tmp2<='1';
when 16=>tmp<='1';tmp1<='0';tmp2<='0';
when 17=>tmp<='1';tmp1<='0';tmp2<='0';
when 18=>tmp<='1';tmp1<='0';tmp2<='0';
when 19=>tmp<='1';tmp1<='0';tmp2<='0';
when 20=>tmp<='1';tmp1<='0';tmp2<='0';
when 21=>tmp<='1';tmp1<='0';tmp2<='0';
when 22=>tmp<='1';tmp1<='0';tmp2<='0';
when 23=>tmp<='1';tmp1<='0';tmp2<='0';cnt3<=0;
end case;
end case;
when "11"=>
case div is
when "00"=>
case cnt0 is
when 0=>tmp<='0';tmp1<='1';tmp2<='1';
when 1=>tmp<='0';tmp1<='1';tmp2<='1';
when 2=>tmp<='1';tmp1<='0';tmp2<='1';
when 3=>tmp<='1';tmp1<='0';tmp2<='1';
when 4=>tmp<='1';tmp1<='1';tmp2<='0';
when 5=>tmp<='1';tmp1<='1';tmp2<='0';cnt0<=0;
end case;
when "01"=>
case cnt1 is
when 0=>tmp<='0';tmp1<='1';tmp2<='1';
when 1=>tmp<='0';tmp1<='1';tmp2<='1';
when 2=>tmp<='0';tmp1<='1';tmp2<='1';
when 3=>tmp<='0';tmp1<='1';tmp2<='1';
when 4=>tmp<='1';tmp1<='0';tmp2<='1';
when 5=>tmp<='1';tmp1<='0';tmp2<='1';
when 6=>tmp<='1';tmp1<='0';tmp2<='1';
when 7=>tmp<='1';tmp1<='0';tmp2<='1';
when 8=>tmp<='1';tmp1<='1';tmp2<='0';
when 9=>tmp<='1';tmp1<='1';tmp2<='0';
when 10=>tmp<='1';tmp1<='1';tmp2<='0';
when 11=>tmp<='1';tmp1<='1';tmp2<='0';cnt1<=0;
end case;
when "10"=>
case cnt2 is
when 0=>tmp<='0';tmp1<='1';tmp2<='1';
when 1=>tmp<='0';tmp1<='1';tmp2<='1';
when 2=>tmp<='0';tmp1<='1';tmp2<='1';
when 3=>tmp<='0';tmp1<='1';tmp2<='1';
when 4=>tmp<='0';tmp1<='1';tmp2<='1';
when 5=>tmp<='0';tmp1<='1';tmp2<='1';
when 6=>tmp<='1';tmp1<='0';tmp2<='1';
when 7=>tmp<='1';tmp1<='0';tmp2<='1';
when 8=>tmp<='1';tmp1<='0';tmp2<='1';
when 9=>tmp<='1';tmp1<='0';tmp2<='1';
when 10=>tmp<='1';tmp1<='0';tmp2<='1';
when 11=>tmp<='1';tmp1<='0';tmp2<='1';
when 12=>tmp<='1';tmp1<='1';tmp2<='0';
when 13=>tmp<='1';tmp1<='1';tmp2<='0';
when 14=>tmp<='1';tmp1<='1';tmp2<='0';
when 15=>tmp<='1';tmp1<='1';tmp2<='0';
when 16=>tmp<='1';tmp1<='1';tmp2<='0';
when 17=>tmp<='1';tmp1<='1';tmp2<='0';cnt2<=0;
end case;
when "11"=>
case cnt3 is
when 0=>tmp<='0';tmp1<='1';tmp2<='1';
when 1=>tmp<='0';tmp1<='1';tmp2<='1';
when 2=>tmp<='0';tmp1<='1';tmp2<='1';
when 3=>tmp<='0';tmp1<='1';tmp2<='1';
when 4=>tmp<='0';tmp1<='1';tmp2<='1';
when 5=>tmp<='0';tmp1<='1';tmp2<='1';
when 6=>tmp<='0';tmp1<='1';tmp2<='1';
when 7=>tmp<='0';tmp1<='1';tmp2<='1';
when 8=>tmp<='1';tmp1<='0';tmp2<='1';
when 9=>tmp<='1';tmp1<='0';tmp2<='1';
when 10=>tmp<='1';tmp1<='0';tmp2<='1';
when 11=>tmp<='1';tmp1<='0';tmp2<='1';
when 12=>tmp<='1';tmp1<='0';tmp2<='1';
when 13=>tmp<='1';tmp1<='0';tmp2<='1';
when 14=>tmp<='1';tmp1<='0';tmp2<='1';
when 15=>tmp<='1';tmp1<='0';tmp2<='1';
when 16=>tmp<='1';tmp1<='1';tmp2<='0';
when 17=>tmp<='1';tmp1<='1';tmp2<='0';
when 18=>tmp<='1';tmp1<='1';tmp2<='0';
when 19=>tmp<='1';tmp1<='1';tmp2<='0';
when 20=>tmp<='1';tmp1<='1';tmp2<='0';
when 21=>tmp<='1';tmp1<='1';tmp2<='0';
when 22=>tmp<='1';tmp1<='1';tmp2<='0';
when 23=>tmp<='1';tmp1<='1';tmp2<='0';cnt3<=0;
end case;
end case;
when "00"=>tmp<='0';tmp1<='0';tmp2<='0';
end case;
end if;
end if;
end process;
aclk<=tmp;
bclk<=tmp1;
cclk<=tmp2;
end behave;
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式