dswei
驱动牛犊
驱动牛犊
  • 注册日期2003-03-19
  • 最后登录2010-06-13
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望40点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1054回复:1

通过计数器的值来赋值的问题

楼主#
更多 发布于:2004-02-26 19:35
querypwr:process(osc_clk)
  begin
    if(osc_clk'event and osc_clk='1')then
        if(pwr_ok='1')then
           count_for_pwr_alternation<=20;
      elsif(count_for_pwr_alternation>0)then
count_for_pwr_alternation<=count_for_pwr_alternation-1;
      end if;
    end if;
end process querypwr;

switchpwr:process(count_for_pwr_alternation)
  begin
    if(count_for_pwr_alternation=0)then
      pwr_switch<='0';
    elsif(count_for_pwr_alternation=20)then
      pwr_switch<='1';
    end if;
end process switchpwr;

这几句程序会出现warning:Too many clocks (> 8) for set/reset analysis of pwr_switch, try moving enabling expressions outside process,
如何达到我的目的并且避免这种warning呢

[编辑 -  2/26/04 by  dswei]

[编辑 -  2/26/04 by  dswei]
link_bridge
驱动巨牛
驱动巨牛
  • 注册日期2002-11-28
  • 最后登录2011-05-15
  • 粉丝0
  • 关注0
  • 积分31分
  • 威望13点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-02-27 17:45
switchpwr:process(count_for_pwr_alternation)

敏感信号count_for_pwr_alternation改为cp.


[编辑 -  2/27/04 by  link_bridge]
游客

返回顶部