CPLD分频器问题

[复制链接]
2811|2
 楼主| epsmc 发表于 2010-4-23 11:08 | 显示全部楼层 |阅读模式
本帖最后由 epsmc 于 2010-5-7 15:23 编辑

architecture a of counter is
begin
process(clk)  ---div frequancy process
variable cnt1: integer ;
variable cnt2: integer;
begin
  if clk'event and clk ='1' then
   if(cnt1 >1) then
    cnt1:=0;
    if(cnt2>1) then
     cnt2:=0;
     clock <= not clock;
    else
     cnt2:= cnt2 +1;
    end if;
   else
   cnt1:= cnt1 +1;
   end if;
  end if;
end process;
end a;
仿真时怎么是20分频呢?
 楼主| epsmc 发表于 2010-4-23 11:15 | 显示全部楼层
[img][/img]
 楼主| epsmc 发表于 2010-4-23 11:16 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

74

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部