微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > FPGA,CPLD和ASIC > vhdl 综合后网表的case语句的默认事件没执行

vhdl 综合后网表的case语句的默认事件没执行

时间:10-02 整理:3721RD 点击:

综合前代码,伪代码形态  .......

  1.    b1<=send_grp;
  2.             b2<=b1;
  3.             if rst='0'  then
  4.                 state<="10";
  5.                 send_grp<='0';
  6.                 else  if 上升沿 then
  7.                          case (state  )
  8.                          when "10"=>
  9.                               if  link='0'    then
  10.                               state<="00";
  11.                               end if;
  12.                          when "00"  =>
  13.                          跳到   01状态
  14.                           when "01"    =>
  15.                            跳到11状态
  16.                           when "11"  =>
  17.                           when others =>
  18.                                state<="10";
  19.                                send_grp<='0';
  20.                           end case;                 end if;

复制代码


关键性就是测试b2的输出。而b2源于send_grp。
综合以后我仿真了一下,给link有0或者1时,send_data_grp值是St1或St0,然后给me_wr 不定态x时,send_grp为不定态Stx.
貌似是因为语句
                                 if link='0' then
                              state<="00";
                              end if;            if无法判定link是不是0,所以state就是不定态,然后send_grp就是不定态。
问题: state如果是0x,1x,x1....这些,按默认others都应该会执行
                               when others =>
                               state<="10";
                               send_grp<='0';
  



自己顶起来。

state是几个bit,如果是2bit, 4个状态都写满了还要啥default.



   大神。因为这里好像默认的9值逻辑,0,1,z,x,h,w,l...这些的。貌似是被综合掉了。而这个默认branch的语句还很关键。怎么办啊

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top