开发者

What's the difference when time delay specified in LHS or RHS?

a = #5 b;
#5 a = b;

Is there any difference between above 2 开发者_运维技巧statements?


The # on the RHS is known as an intra-assignment delay. Read about the distinction in the IEEE Std (1800-2009), section 9.4.5 "Intra-assignment timing controls".

An intra-assignment delay or event control shall delay the assignment of the new value to the left-hand side, but the right-hand expression shall be evaluated before the delay, instead of after the delay.

Run a simulation with both statements to see what difference (if any) you observe. Use $monitor and $time.


To be precise that second statement doesn't specify a timing delay on the LHS of the blocking assignment. It is prefixed by a procedural_timing_control construct which can used before any type of procedural statement, not just assignment statements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜