|
请教下大家!我发现光盘里的例程有一段是这样子的:
always @(dac_sta or wr_act )
begin
dac_load_r <= 1'b1;
bit_counter_rst <= 1'b0;
dac_sta_next <= dac_idle;
case(dac_sta)
dac_idle:
begin
bit_counter_rst <= 1'b1; //空闲时复位发送位计数器
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
bit_counter_rst <= 1'b1; //发送位计数器复位
dac_load_r <= 1'b0; //Load 变低进行数据锁存
if (div_clk) //锁存状态为1个div_clk周期
dac_sta_next <= dac_idle;
else
dac_sta_next <= dac_store;
end
endcase
end
其中:
dac_load_r <= 1'b1;
bit_counter_rst <= 1'b0;
dac_sta_next <= dac_idle;
用了非阻塞赋值,接着下面的CASE里面又分别给他们三个各自再次赋值了一次。请问到时是哪个有效呢?
请教下:对同一个寄存器变量在一个ALWAYS里面多次(重复)非阻塞赋值结果是? |
|