I am posting this question after going through a famous presentation on “understanding verilog blocking and non-blocking assignments by stuart sutherland” which literally discusses every possible variant.
Input
0-10 LOW
10-20 HIGH
20-30 LOW
30-33- HIGH
33-36-LOW
36-45 HIGH
45-end of simulation LOW
For the 2 cases below my analysis is output follows input with the mentioned delay. so the glitch propagates in both cases (transport delay). But in the presentation the one with blocking assignment stays HIGH from 38-50 which is incorrect.
Can anyone confirm the same? The output would be the same for both cases below is my analysis.
Using non-blocking assignments, there is no delay between the successive
@(in) constructs, so every change on
in gets caught. The change to
out gets scheduled for 5 time units later for every change of
in. That is the definition of transport delay.
Using blocking assignments, there is a 5 time unit delay between the successive
@(in) constructs, so every change on
in that happens during that delay is lost.
in cannot change faster the the propagation delay to
out. That is the definition of inertial delay.
I thought that the effect of blocking statements is only on the next statements within a procedural block. Based on the explanation it sounds like even the always block once triggered is paused if the always block has blocking statements and is paused till the blocking statements complete their evaluation and assignment and only then it gets unblocked and start responding again to any triggers on it’s sensitivity list.
whereas in the non-blocking case we evaluate continuously as the always block is never paused by the transport delays in the non-blocking statements. And I guess the same holds even if we had an inertial delay using non-blocking statements.
Please confirm. Thanks a lot Dave for your earlier explanation.