vhdl 综合后网表的case语句的默认事件没执行
时间:10-02
整理:3721RD
点击:
综合前代码,伪代码形态 .......
- b1<=send_grp;
- b2<=b1;
- if rst='0' then
- state<="10";
- send_grp<='0';
- else if 上升沿 then
- case (state )
- when "10"=>
- if link='0' then
- state<="00";
- end if;
- when "00" =>
- 跳到 01状态
- when "01" =>
- 跳到11状态
- when "11" =>
- when others =>
- state<="10";
- send_grp<='0';
- 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的语句还很关键。怎么办啊
