- UID
- 1029342
- 性别
- 男
|
非阻塞赋值容易错语法点讨论请教下大家!我发现光盘里的例程有一段是这样子的:
always @(dac_sta)
begin
dac_sta_next <= dac_idle;
case(dac_sta)
dac_idle:
begin
if (wr_act) //有写数据信号时,进入发送状态
dac_sta_next <= dac_send;
else
dac_sta_next <= dac_idle;
end
dac_send:
begin
if (dac_dat_send_finish) //位数据发送完成后进入数据锁存状态
dac_sta_next <= dac_store;
else
dac_sta_next <= dac_send;
end
dac_store:
begin
if (div_clk) //锁存状态为1个div_clk周期
dac_sta_next <= dac_idle;
else
dac_sta_next <= dac_store;
end
endcase
end
其中:
dac_sta_next <= dac_idle;
用了非阻塞赋值,接着下面的CASE里面又分别给他们三个各自再次赋值了一次。请问到时是哪个有效呢?
请教下:对同一个寄存器变量在一个ALWAYS里面多次(重复)非阻塞赋值结果是? |
|