非阻塞赋值的问题,求解释?

2019-03-25 08:47发布

关于非阻塞赋值的问题,求解释?
Stop: begin
           if (clk_low) begin
                  mode <= 1'b0;
          State <= Stop;
                end  
          else if (clk_high) begin
                  ctrl_cnt <= ctrl_cnt + 1'b1;
                  if (ctrl_cnt[0] == 1'b0)
                      State <= Start;
                  else
                      State <= Idle;
                  end
         else
              State <= Stop;
End
如果一开始ctrl_cnt为0,那么第一次执行else if (clk_high) begin……end中的语句时,State是跳到Start还是Idle? 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
3条回答
kready
2019-03-25 13:18
< / 可不可以这样理解:当clk_high为1时,  ctrl_cnt <= ctrl_cnt + 1'b1 和 if (ctrl_cnt[0] == 1'b0) 同时被触发,所以这个时钟结束后,  ctrl_cnt 加1变为1,同时 State跳到 Start

一周热门 更多>