Differences between blocking and Non-blocking statements in
Verilog?
Answers were Sorted based on User's Feedback
Answer / amit malik
cp mistake in 1st one.
-----------------------------------
Blocking statements are executed on after another
represented by '='
Ex. lets take two variables
reg A:0;
reg B:1;
initial
begin
A = B;
B = A;
end
Ans
A = 1
B = 1
Non Blocking
instructions are executed concurrently
represented by '<='
Ex. lets take two variables
reg A:0;
reg B:1;
initial
begin
A <= B;
B <= A;
end
Ans
A = 1
B = 0
| Is This Answer Correct ? | 66 Yes | 1 No |
Answer / appu
@ Remya,
With non-blocking statements as shown above, A will always
get the OLD/previous value of B, and B will always get the
OLD/previous value of A.
Because, in a non-blocking statement assignment, the right
hand side of the statement gets evaluated right away, but
doesn't get assigned to the left hand side of the statement
until at the end of the time step.
| Is This Answer Correct ? | 20 Yes | 1 No |
Answer / amit malik
Blocking statements are executed on after another
represented by '='
Ex. lets take two variables
reg A:0;
reg B:1;
initial
begin
A = B;
B = A;
end
Ans
A = 1
B = 1
Non Blocking
instructions are executed concurrently
represented by '=>'
Ex. lets take two variables
reg A:0;
reg B:1;
initial
begin
A = B;
B = A;
end
Ans
A = 1
B = 0
| Is This Answer Correct ? | 35 Yes | 18 No |
Answer / darshan
DURING BLOCKING STATEMENTS, PREVIOUS VALUES GETS STORED TO
THE LHS.
WHERE AS IN NON BLOCKING STATEMENT, SINCE IT IS EXECUTING IN
PARALLEL 1ST SIMULATOR READS AND STORES IN TEMPORARY
REGISTER INTERNALLY IN SIMULATOR. THEN AT THE END OF THE
TIME UNIT IT IS ASSIGNED TO THE LHS.
ANYWAYS FROM MY POINT OF VIEW A OR B DONT GET THE PREV/OLD
VALUE
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / remya
Yes,the explanation is ok but after a particular time
units,the value of B must be equal to 1 no?
| Is This Answer Correct ? | 6 Yes | 9 No |
What are the total number of lines written by you in C/C++? What compiler was used?
Tell me how BJT works.
What transistor level design tools are you proficient with? What types of designs were they used on?
Draw Vds-Ids curve for a MOSFET. Now, show how this curve changes with increasing Vgs.
Given a layout, draw its transistor level circuit. (I was given a 3 input AND gate and a 2 input Multiplexer. You can expect any simple 2 or 3 input gates)
What are the different classification of the timing control?
What is the function of tie-high and tie-low cells?
Write a VLSI program that implements a toll booth controller?
You have a driver that drives a long signal & connects to an input device. At the input device there is either overshoot, undershoot or signal threshold violations, what can be done to correct this problem?
Write a pseudo code for sorting the numbers in an array?
What transistor level design tools are you proficient with? What types of designs were they used on?
What does it mean “the channel is pinched off”?