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

Lfu, advantages of lfu

advantages of lfu

What are language processor development tools, What are Language Processor ...

What are Language Processor Development Tools (LPDTs)? LPDT that is Language processor development tools focuses upon generation of the analysis phase of language processors. T

How to detect overflow condition, How to detect overflow condition An o...

How to detect overflow condition An overflow condition can be notice by observing the carry into the sign bit position and the carry out of sign bit position. If this carries a

Explain about semiconductor memories, Q. Explain about Semiconductor Memori...

Q. Explain about Semiconductor Memories? Originally IC technology was used for constructing processor however soon it was realized that same technology can be used for construc

How much duration is required for an off-hook signal, An off-hook signal wi...

An off-hook signal will repeat for a/an                   duration. For a/an finite duration, an off-hook signal will repeat.

What is the sequence in which resources may be utilized, What is the sequen...

What is the sequence in which resources may be utilized?  Under normal mode of operation, a process might be utilize a resource in the following sequence:  • Request: If the

Instruction issue degree, Instruction Issue degree : The major concept in s...

Instruction Issue degree : The major concept in superscalar processing is how many instructions we can issue per cycle. If we issue k number of instructions per cycle in a supersca

Serial execution and parallel execution, Serial Execution Execution of ...

Serial Execution Execution of a program consecutively, one statement at a time. In the easiest sense, this is what occurs on a one processor machine. However, even many of the

What are the lists of signal available, What are the lists of signal availa...

What are the lists of signal available? Terminating and suspending method Physical circumstances Available for the Programmer Fault in power supply

Dynamic memory allocation function, Name the dynamic memory allocation func...

Name the dynamic memory allocation function? Three dynamic memory allocation functions are: a) malloc, b) calloc and c) free.

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