在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 3092|回复: 7

[求助] 关于组合反馈的问题

[复制链接]
发表于 2013-5-30 23:27:22 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
设计综合,工具报告出现了组合反馈。根据工具提示,应该是这部分代码出了问题,如下:always @ ( posedge hclk_gt or negedge hrstn ) begin
      if ( !hrstn )

     refer_ok_hclk <= 'b0;

  else begin

if ( !break ) begin

        if ( beg_region && count_1023_hclk )

        refer_ok_hclk <= 1'b1;

        else

        refer_ok_hclk <= 'b0;

end

else

         refer_ok_hclk <= 'b0;

   end

end


请问是否是这部分出了组合反馈?怎样判断会出现组合反馈?怎样避免呢?无意识的组合反馈的危害有哪些?请高手解答啊!
发表于 2013-5-31 11:27:18 | 显示全部楼层
组合反馈跟这块应该没关系

多看看你的组合逻辑生成部分代码
回复 支持 反对

使用道具 举报

发表于 2013-5-31 12:26:04 | 显示全部楼层
本帖最后由 warmheard 于 2013-5-31 17:14 编辑

这段代码应该不会生成组合反馈的,把报告贴出来看看,还有把代码全贴出来,问题应该不在这儿


下面的语句会出现组合反馈,不写类似的语句就没有问题

1. assign b = sel ? a : b;

2.非时钟触发的always块中不写else
always@(*)
begin
    if(sel)
        b <= a;
end

3.
always@(*)
begin
    if(sel)
        b <= a;
    else
        b<=b;
end
回复 支持 反对

使用道具 举报

发表于 2013-5-31 12:31:21 | 显示全部楼层
你这段是时序逻辑吧,怎么会有组合反馈
回复 支持 反对

使用道具 举报

发表于 2013-6-2 11:12:15 | 显示全部楼层
只有这段代码看不出什么啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-2 13:54:21 | 显示全部楼层
回复 3# warmheard


   这是综合出来的报告: loop.JPG

这是代码:
always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )
         EN_int_req_reg <= 'b0;
      else
         EN_int_req_reg <= EN_int_req;

   // "EN_gen_req"
   always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )
         EN_gen_req <= 'b0;
      else if ( int_req_eva || int_req_xy || int_req_sum )
         EN_gen_req <= 1'b1;
      else
         if ( EN_int_req && !EN_int_req_reg )
            EN_gen_req <= 'b0;
         else
            EN_gen_req <= EN_gen_req;

   // "clear" will be active if "1 == row_y_pic" and "count_1023_hclk"
   // is active.
   always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )
         clear <= 'b0;
      else if ( int_req_cfg )
         clear <= 'b0;
      else
         if ( 1 == row_y_pic && count_1023_hclk )
            clear <= 1'b1;
         else
            clear <= clear;

   /** ^ Generate "refer_ok" which is in-phase with "ad_clk" ^ **/
   // "hclk_gt" will be assign to "hclk" while "stall_b" is active.
   assign hclk_gt = stall_b && hclk;

   // Generate "stall_b"
   always @ ( refer_ok_hclk or ref_ok_s2f2 )
      if ( ref_ok_s2f2 )

     stall_b = 1'b1;

  else

     if ( refer_ok_hclk )

    stall_b = 'b0;

     else

    stall_b = 1'b1;


   // Generate "ref_ok_s2f1"
   always @ ( posedge hclk or negedge hrstn )
     if ( !hrstn )

    ref_ok_s2f1 <= 'b0;
     else

    if ( refer_ok )

   ref_ok_s2f1 <= 1'b1;

else

   ref_ok_s2f1 <= 'b0;

   
   // Generate "ref_ok_s2f2"
   always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )

     ref_ok_s2f2 <= 'b0;

  else

     ref_ok_s2f2 <= ref_ok_s2f1;

   // The "beg_region" will be set to "1" while "row_y_pic"
   // reach the first row of the last 3 "1/4 region".
   assign beg_region = ( 256 == row_y_pic || 512 == row_y_pic )
                       ? 1'b1

: ( 768 == row_y_pic || 0 == row_y_pic)

? 1'b1

: 'b0;


   // "refer_ok_hclk" will be set to "1" if "beg_region" while
   // "count_1023_hclk" is active and "break" is inactive.
  always @ ( posedge hclk_gt or negedge hrstn ) begin
      if ( !hrstn )

     refer_ok_hclk <= 'b0;

  else begin

if ( !break ) begin

        if ( beg_region && count_1023_hclk )

        refer_ok_hclk <= 1'b1;

        else

        refer_ok_hclk <= 'b0;

end

else

         refer_ok_hclk <= 'b0;

   end

end

   // Generate "ref_ok_f2s1"
   always @ ( posedge ad_clk or negedge hrstn )
      if ( !hrstn )

     ref_ok_f2s1 <= 'b0;

  else

     if ( refer_ok_hclk )

    ref_ok_f2s1 <= 1'b1;

     else

    ref_ok_f2s1 <= 'b0;


   // Generate "ref_ok_f2s2" and "ref_ok_f2s3".
   always @ ( posedge ad_clk or negedge hrstn )
      if ( !hrstn )

     { ref_ok_f2s3, ref_ok_f2s2 } <= 2'b00;

  else

     { ref_ok_f2s3, ref_ok_f2s2 } <= { ref_ok_f2s2, ref_ok_f2s1 };


   // Generate "refer_ok"
   always @ ( ref_ok_f2s3 or ref_ok_f2s2 )
      case ( { ref_ok_f2s3, ref_ok_f2s2 } )

     2'b01    : refer_ok = 1'b1;

      default : refer_ok = 'b0;

  endcase


   /** v Generate "refer_ok" which is in-phase with "ad_clk" v **/
//---------------------------------------------------------------------
   /********** ^ Generate "int_req" ^ **********/   
   // Generate "count_1023_hclk".
   assign count_1023_hclk = ( count_1023_pic && !count_1023_pic_reg )
                             ? 1'b1

     : 'b0;

   // "count_1023_pic_reg" is a circle later than "count_1023_pic"
   always @ ( posedge hclk or negedge hrstn )
      if( !hrstn )

     count_1023_pic_reg <= 'b0;

  else

     count_1023_pic_reg <= count_1023_pic;


   // "beg_region_reg"
   always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )
         beg_region_reg <= 'b0;
      else
         beg_region_reg <= beg_region;

   // Indicate the generation of "int_req" to CPU to read the row
   // of "0", "256", "512" and "768".
   always @ ( posedge hclk or negedge hrstn )
      if ( !hrstn )
         beg_region_index <= 'b0;
      else if ( int_req_ref_ok )
         beg_region_index <= 'b0;
      else
         if ( beg_region && !beg_region_reg )
            beg_region_index <= 1'b1;
         else
            beg_region_index <= beg_region_index;
回复 支持 反对

使用道具 举报

发表于 2013-6-3 12:04:47 | 显示全部楼层
回复 6# hit0821201


    这个恐怕你要自己检查一下了,代码中没有简单的loop。你要检查一下生成的网表,他报的warning中给出了loop的路径,你检查一下是那条?自己分析一下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-3 23:10:37 | 显示全部楼层
回复 7# warmheard


   嗯,我查看了一下那条路径,还没有去看网表。你这么一提醒,我明天去看看网表看看。非常感谢!有不明白的以后再多多请教了!
回复 支持 反对

使用道具 举报

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

本版积分规则

关闭

站长推荐 上一条 /1 下一条


手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-9-14 03:38 , Processed in 0.020914 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表