这是代码。
5551119900
5551119901
5551119902
5551119910
5551119920
5551119930
0000
9901
9902
9903
9999
这是对应的打印语句和波形。
module temp();
bit a;
bit w_inter_nonblocking, x_inter_blocking, y_intra_blocking, z_intra_nonblocking;
always @ (a)
begin
$display("@%0t : Blocking x_inter_blocking", $time());
#7 x_inter_blocking = a;
end
always @ (a)
begin
$display("@%0t : Nonblocking w_inter_nonblocking", $time());
#7 w_inter_nonblocking <= a;
end
always @ (a)
begin
$display("@%0t : Nonblocking z_intra_nonblocking", $time());
z_intra_nonblocking <= #7 a;
end
always @ (a)
begin
$display("@%0t : Blocking y_intra_blocking", $time());
y_intra_blocking = #7 a;
end
initial
forever #5 a = $random();
initial
#150 $finish();
// initial
// #40 disable karan;
initial
begin
$dumpvars(0, temp);
$dumpfile("temp.vcd");
end
endmodule
如您所见,只有具有无阻塞分配的内部延迟才提供延迟输出,其余所有延迟/分配都提供不同的输出。
我知道内部/内部延迟之间的区别,但是似乎总是不会在替代事件上触发总是块(延迟为@10 : Nonblocking z_intra_nonblocking
@10 : Blocking x_inter_blocking
@10 : Nonblocking w_inter_nonblocking
@10 : Blocking y_intra_blocking
@40 : Nonblocking z_intra_nonblocking
@40 : Blocking x_inter_blocking
@40 : Nonblocking w_inter_nonblocking
@40 : Blocking y_intra_blocking
@45 : Nonblocking z_intra_nonblocking
@55 : Nonblocking z_intra_nonblocking
@55 : Blocking x_inter_blocking
@55 : Nonblocking w_inter_nonblocking
@55 : Blocking y_intra_blocking
@60 : Nonblocking z_intra_nonblocking
@70 : Nonblocking z_intra_nonblocking
@70 : Blocking x_inter_blocking
@70 : Nonblocking w_inter_nonblocking
@70 : Blocking y_intra_blocking
@75 : Nonblocking z_intra_nonblocking
@80 : Nonblocking z_intra_nonblocking
@80 : Blocking x_inter_blocking
@80 : Nonblocking w_inter_nonblocking
@80 : Blocking y_intra_blocking
@85 : Nonblocking z_intra_nonblocking
@90 : Nonblocking z_intra_nonblocking
@90 : Blocking x_inter_blocking
@90 : Nonblocking w_inter_nonblocking
@90 : Blocking y_intra_blocking
@95 : Nonblocking z_intra_nonblocking
@105 : Nonblocking z_intra_nonblocking
@105 : Blocking x_inter_blocking
@105 : Nonblocking w_inter_nonblocking
@105 : Blocking y_intra_blocking
@110 : Nonblocking z_intra_nonblocking
@115 : Nonblocking z_intra_nonblocking
@115 : Blocking x_inter_blocking
@115 : Nonblocking w_inter_nonblocking
@115 : Blocking y_intra_blocking
@130 : Nonblocking z_intra_nonblocking
@130 : Blocking x_inter_blocking
@130 : Nonblocking w_inter_nonblocking
@130 : Blocking y_intra_blocking
@135 : Nonblocking z_intra_nonblocking
@140 : Nonblocking z_intra_nonblocking
@140 : Blocking x_inter_blocking
@140 : Nonblocking w_inter_nonblocking
@140 : Blocking y_intra_blocking
,如果{{1} }延迟)。但是,NBA的Intra Delay总是会被正确触发。
有人可以在这里帮助我吗?
答案 0 :(得分:0)
$regName = $xml->xpath("//RegItem")[0]['Name'];
并不意味着执行always @(expression) statement
更改的statement
传送时间。这意味着等待expression
进行更改,执行expression
,然后重复返回以等待statement
进行更改。
问题是当表达式在执行语句的过程中更改时,更改丢失。您只能等待开始后 发生的更改。
与我先前回答的this one相同。