打印

CPLD分频器问题

[复制链接]
1992|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 | 只看该作者

新建 BMP 图像.JPG (38.49 KB )

新建 BMP 图像.JPG

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

74

帖子

1

粉丝