这两个代码在verilog阻塞和非阻塞赋值方面有什么区别? [英] What is the difference between these two codes interms of verilog blocking and non blocking assignments?
问题描述
块 1:
begin : block1
X<= #50 10;
X<= #150 100;
#50
X<= #200 200;
#500
X<=#250 250;
end
块 2:
begin : block2
X= #50 10;
X= #150 100;
#50
X= #200 200;
#500
X=#250 250;
end
我想知道 X 被分配值的时间延迟方面的差异,有人能帮我吗????
I want to know the difference in terms of time delay the X is assigned values, can anybody help me out????
推荐答案
我可以帮助您解决问题,而无需为您做任何工作.
I can help you figure it out without doing your work for you.
阻塞赋值意味着下一个语句被阻塞,直到对变量的赋值完成.非阻塞赋值意味着对变量的赋值是在未来进行的,但下一条语句执行不会被阻塞.
A blocking assignment means the next statement is blocked until the assignment to the variable completes. A non-blocking assignment means the assignment to the variable is schedule in the future, but next statement executes without being blocked.
假设 block1
和 block2
是 begin/end
块,它们都从时间 0 开始,block1 将到达它的 end
在时间 550 和 block2 将在时间 1200 到达它的 end
.
Assuming block1
and block2
are begin/end
blocks that both start at time 0, block1 would reach its end
at time 550 and block2 would reach its end
at time 1200.
这篇关于这两个代码在verilog阻塞和非阻塞赋值方面有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!