77范文网 - 专业文章范例文档资料分享平台

任意波形信号发生器 - 图文(7)

来源:网络收集 时间:2019-04-09 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

elsif(clk'event and clk='1') then

if(cc<9) then

cc<=cc+1;

else

cc<=0;

end if;

if cc=9 then tmp<=tmp xor \end if;

end if;

Q<=tmp; end process; end architecture s;

-------------波形选择------------------------------------------------------------------------------------------ library ieee;

use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity chs is

port(ob,si,dl,sq: in std_logic;

obl,sin,dlt,squ: in std_logic_vector(7 downto 0);

Q:out std_logic_vector(7 downto 0)); end entity chs; architecture ch of chs is

signal tmp: std_logic_vector(3 downto 0); signal tt:std_logic_vector(9 downto 0); begin

process(ob,si,dl,sq)is begin

tmp<=ob&si&dl&sq; case tmp is

30

when \when \when \when \

when \when \when \ when \when \when \when others=>null;

end case; end process; end architecture ch;

------------调度程序-------------------------------------------------------------------------------------------- --------------开始------------------------------------------------------------------------------------------------ library ieee;

use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all;

--------------------------------------------------------------------------------------------------------------------- entity s_gen is

port(clk ,reset: in std_logic;

ob,si,dl,sq: in std_logic;

tc: in std_logic_vector(1 downto 0); a,b,c,d,e,f,g:out std_logic;

wr:out std_logic;

Q:out std_logic_vector(7 downto 0)); end entity s_gen;

31

--------------------------------------------------------------------------------------------------------------------- architecture behav of s_gen is

--------元件定义------------------------------------------------------------------------------------------------- component obl is port(clk,reset:in std_logic;

Q:out std_logic_vector(7 downto 0));

end component obl; component sin is port(clk,reset:in std_logic;

Q:out std_logic_vector(7 downto 0));

end component sin; component dlt is port(clk,reset:in std_logic;

Q:out std_logic_vector(7 downto 0));

end component dlt; component squ is port(clk,reset:in std_logic;

Q:out std_logic_vector(7 downto 0));

end component squ; component chs is

port(ob,si,dl,sq: in std_logic;

obl,sin,dlt,squ: in std_logic_vector(7 downto 0);

Q:out std_logic_vector(7 downto 0)); end component chs;

----------信号定义----------------------------------------------------------------------------------------------- signal J,K,L,Z: std_logic_vector(7 downto 0); signal JJ,KK,LL,ZZ: std_logic_vector(7 downto 0); signal s: std_logic_vector(6 downto 0); begin

32

----------启动DAC0832--------------------------------------------------------------------------------------- process(clk)is begin

if(clk'event and clk='1') then

if(reset='1') then wr<='1'; else wr<='0'; end if;

end if; end process;

----------信号衰减选择----------------------------------------------------------------------------------------- process(tc,J,K,L,Z)is begin case tc is

when \

when \

LL<='0'&L(7 downto 1);ZZ<='0'&Z(7 downto 1);

when \

LL<=\

when \

LL<=\

when others=>null; end case;

if tc=\elsif tc=\elsif tc=\elsif tc=\end if;

33

a<=s(6);b<=s(5);c<=s(4);d<=s(3);e<=s(2);f<=s(1);g<=s(0); end process;

---------元件例化------------------------------------------------------------------------------------------------ u0: obl port map(clk,reset,J); u1: sin port map(clk,reset,K); u2: dlt port map(clk,reset,L); u3: squ port map(clk,reset,Z);

u4: chs port map(ob,si,dl,sq,JJ,KK,LL,ZZ,Q);

--------------------------------------------------------------------------------------------------------------------- end architecture behav;

-----------结束---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------

34

35

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库任意波形信号发生器 - 图文(7)在线全文阅读。

任意波形信号发生器 - 图文(7).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/581283.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: