Difference between blocking and non-blocking, Computer Engineering

Assignment Help:

Difference between blocking and non-blocking

Verilog  language  has  two  forms  of  the  procedural  assignment  statement:  blocking  and  nonblocking. The two are distinguished by = and <= assignment operators. Blocking assignment statement (= operator) acts much like in traditional programming languages. Whole statement is done before control passes on to the next statement. Non-blocking (<= operator) evaluates all the right-hand sides for current time unit and assigns left-hand sides at the end of the time unit.

For example, the following Verilog program

// testing blocking and non-blocking assignment

module blocking;

reg [0:7] A, B;

initial begin: init1

A = 3;

#1 A = A + 1; // blocking procedural assignment

B = A + 1;

$display("Blocking: A= %b B= %b", A, B );

A = 3;

#1 A <= A + 1; // non-blocking procedural assignment

B <= A + 1;

#1 $display("Non-blocking: A= %b B= %b", A, B );



produces the following output:

Blocking: A= 00000100 B= 00000101

Non-blocking: A= 00000100 B= 00000100

The  effect  is  for  all  non-blocking  assignments  to  use  old  values  of  variables  at  the beginning of current time unit and to assign registers new values at the end of the current time unit.  This  reflects  how  register  transfers  take place in  some  hardware  systems.  Blocking  procedural assignment is used for combinational logic and non-blocking procedural assignment for sequential.


Related Discussions:- Difference between blocking and non-blocking

What do you mean by synchronization principles, In multiprocessing several ...

In multiprocessing several processors require to communicate with one another. So synchronisation is needed between them. The correctness and performance of parallel execution reli

Synchronization latency problem, Synchronization Latency Problem:  If two s...

Synchronization Latency Problem:  If two simultaneous processes are performing remote loading, then it is not recognized by what time two processes will load, as the issuing proces

What do you understand by hit ratio, What do you understand by Hit ratio? ...

What do you understand by Hit ratio? When a processor refers a data item from a cache, if the referenced item is in the cache, then such a reference is called hit. If the refer

How to convert binary to octal and hexadecimal, Q. How to convert Binary to...

Q. How to convert Binary to Octal and Hexadecimal? Rules for these conversions are simple. For converting binary to octal binary number is splitted in groups of three, that are

Explain logical shift micro-operations, Q. Explain logical shift Micro-oper...

Q. Explain logical shift Micro-operations? In logical shift data entering by serial input to left most or right most flip-flop (which depends on right or left shift operations

Simplify the expression by using karnaugh map, Simplify   the   following  ...

Simplify   the   following   expression   into   sum   of   products   using   Karnaugh   map F(A, B, C, D) = ∑ (1,3,4,5,6,7,9,12,13) Ans. Simplification of the giv

Automated injection, There are tools to automate the process of SQL Injecti...

There are tools to automate the process of SQL Injection into login and other fields. One hacker process, using a one tool, will be to search out a number of weak targets using Goo

Initial considerations in problem solving, Initial considerations in proble...

Initial considerations in problem solving: Three initial considerations in problem solving for easiest(as described in Russell and Norvig):  Initial State  First

Illustrate processor arrangements, Q. Illustrate processor arrangements? ...

Q. Illustrate processor arrangements? HPF$ PROCESSORS P2 (4, 3) !HPF$ TEMPLATE T2 (17, 20) !HPF$ DISTRIBUTE T2 (BLOCK, *) ONTO P1 Means that first dimension of T2 woul

Trusted publisher, State the criteria which a trusted publisher should meet...

State the criteria which a trusted publisher should meet before adding him? Ans) The following criteria should be met by the publisher before adding him to the list. ? The

Write Your Message!

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd