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 );

end

endmodule

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

Difference between visual basic, Visual basic is useful if you are planning...

Visual basic is useful if you are planning to make the programs from scratch. This language helps you in producing Active x controls, exe files, etc. Visual script is a powerful t

Expalin johnson counter, Write short note on the Johnson counter. Ans:...

Write short note on the Johnson counter. Ans:  Johnson Counter: It is a synchronous counter, where all flip-flops are clocked concurrently and the clock pulses drive the

An example of the subscriber traffic in erlangs, A subscriber makes three p...

A subscriber makes three phone calls of 3 minutes, 4 minutes and 2 minutes duration in a one hour period. Calculate the subscriber traffic in erlangs, CCS and CM. Subscriber tr

Basic of C, write algorithm and draw flowchart for exchange the values of t...

write algorithm and draw flowchart for exchange the values of two variables.

Explain bitwise-inclusive-or operato, Bitwise-Inclusive-OR Operator: i...

Bitwise-Inclusive-OR Operator: inclusive-OR-expression : exclusive-OR-expression inclusive-OR-expression | exclusive-OR-expression The  bitwise-inclusive-OR  operator

Explain characteristics of program translation model, Explain characteristi...

Explain characteristics of program translation model. The program translation model characteristics are: A program should be translated before this can be executed.

Model a disaster recovery system for the cyber city, Question: (a) Stat...

Question: (a) State possible Large Scale System Applications different from those mentioned in (c) which may have a component running in the Cyber City. (b) According to you

Which scheduling is suitable for time-shared operatin system, Which schedul...

Which scheduling policy is most suitable for a time-shared operating system? Ans. Round-Robin scheduling policy is most appropriate for a time-shared operating system.

What is the significance of the screen number ''0'', What is the significan...

What is the significance of the screen number '0'? In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to the last call level.  Th

Give some examples of malicious data, Give some examples of malicious data....

Give some examples of malicious data. In May 2002 year, the Norton Anti-Virus software for Windows operating systems detected around 61000 malicious programs. Several of them a

Write Your Message!

Captcha
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