Differences between blocking and Non-blocking statements in
Verilog?

Answers were Sorted based on User's Feedback



Differences between blocking and Non-blocking statements in Verilog?..

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

Differences between blocking and Non-blocking statements in Verilog?..

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

Differences between blocking and Non-blocking statements in Verilog?..

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

Differences between blocking and Non-blocking statements in Verilog?..

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

Differences between blocking and Non-blocking statements in Verilog?..

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

Post New Answer

More VLSI Interview Questions

A circuit has 1 input X and 2 outputs A and B. If X = HIGH for 4 clock ticks, A = 1. If X = LOW for 4 clock ticks, B = 1. Draw a state diagram for this Spec?

3 Answers   Intel,


If an/ap = 0.5, an/ap = 1, an/ap = 3, for 3 inverters draw the transfer characteristics?

0 Answers   Intel,


How does a pn junction works?

2 Answers   Wipro,


Are you familiar with the term MESI?

1 Answers   Intel,


What are set up time & hold time constraints? What do they signify?

3 Answers  






What is look up table in vlsi?

0 Answers  


what is body effect?

1 Answers  


Mention what are three regions of operation of mosfet and how are they used?

0 Answers  


Tell me how MOSFET works.

0 Answers  


How do you detect a sequence of "1101" arriving serially from a signal line?

7 Answers   nvidia,


In Verilog code what does “timescale 1 ns/ 1 ps” signifies?

0 Answers  


Explain various adders and diff between them?

1 Answers   Intel,


Categories