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

基于CPLD的多功能脉冲分配器的设计说明书(7)

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

盐城工学院本科生毕业设计说明书(2007)

rst => rst,

clk_out => clk_T); u2 : double3and6 port map (cp => clk_T, dir => dir, ex => ex,

mode => mode, outA => outA, outB => outB, end rt1_top_level;

outC => outC); 27

基于CPLD的多功能脉冲分配器系统的设计

附录2 分频程序清单 library IEEE;

use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL; entity divider is

port(cp: in std_logic;

a1,a2,a3: in std_logic; rst: in std_logic;

clk_out: out std_logic); end divider;

architecture a of divider is

signal count:std_logic_vector(1 downto 0); signal mode:std_logic_vector(2 downto 0); signal clk_temp:std_logic;

signal cnt1,cnt2:integer range 0 to 2; signal cnt3,cnt4:integer range 0 to 4; signal cnt5,cnt6:integer range 0 to 6;

signal clk1,clk2,clk3,clk4,clk5,clk6:std_logic;

signal clk_out1,clk_out2,clk_out3,clk_out4,clk_outT,clk_outTT:std_logic; begin

mode <= a3&a2&a1;

process(cp, count, mode, clk_temp) begin

if(cp'event and cp = '1') then if mode = \ if (count = \ count <= (others=>'0'); clk_temp <= not clk_temp; end if; end if;

if mode = \ if (count = \ count <= (others=>'0'); clk_temp <= not clk_temp; else

count <= count + 1; end if; end if;

28

盐城工学院本科生毕业设计说明书(2007)

if mode = \ if (count = \ count <= (others=>'0'); clk_temp <= not clk_temp; else

count <= count + 1; end if; end if;

if mode = \ if (count = \ count <= (others=>'0'); clk_temp <= not clk_temp; else

count <= count + 1; end if; end if; end if; end process;

clk_out1 <= clk_temp;

process(cp, mode,clk1,cnt1) begin

if(cp'event and cp = '1') then if mode = \ if(cnt1 < 2) then cnt1 <= cnt1 + 1; else

cnt1 <= 0; end if;

if(cnt1 < 1) then clk1 <= '1'; else

clk1 <= '0'; end if; end if; end if; end process;

process(cp, mode,clk2,cnt2) begin

if(cp'event and cp = '0') then if mode = \

29

基于CPLD的多功能脉冲分配器系统的设计

if(cnt2 < 2) then cnt2 <= cnt2 + 1; else

cnt2 <= 0; end if;

if(cnt2 < 1) then clk2 <= '1'; else

clk2 <= '0'; end if; end if; end if; end process;

clk_out2 <= clk1 or clk2; process(cp, mode,clk3,cnt3) begin

if(cp'event and cp = '1') then if mode = \ if(cnt3 < 4) then cnt3 <= cnt3 + 1; else

cnt3 <= 0; end if;

if(cnt3 < 2) then clk3 <= '1'; else

clk3 <= '0'; end if; end if; end if; end process;

process(cp, mode,clk4,cnt4) begin

if(cp'event and cp = '0') then if mode = \ if(cnt4 < 4) then cnt4 <= cnt4 + 1; else

cnt4 <= 0; end if;

30

盐城工学院本科生毕业设计说明书(2007)

if(cnt4 < 2) then clk4 <= '1'; else

clk4 <= '0'; end if; end if; end if; end process;

clk_out3 <= clk3 or clk4; process(cp, mode,clk5,cnt5) begin

if(cp'event and cp = '1') then if mode = \ if(cnt5 < 6) then cnt5 <= cnt5 + 1; else

cnt5 <= 0; end if;

if(cnt5 < 3) then clk5 <= '1'; else

clk5 <= '0'; end if; end if; end if; end process;

process(cp, mode,clk6,cnt6) begin

if(cp'event and cp = '0') then if mode = \ if(cnt6 < 6) then cnt6 <= cnt6 + 1; else

cnt6 <= 0; end if;

if(cnt6 < 3) then clk6 <= '1'; else

clk6 <= '0'; end if;

31

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库基于CPLD的多功能脉冲分配器的设计说明书(7)在线全文阅读。

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