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

Desirable choice for the partitioning element in quick sort, A desirable ch...

A desirable choice for the partitioning element in quick sort is First element of the list.

What are advantages and disadvantages of using eeprom, What are advantages ...

What are advantages and disadvantages of using EEPROM? The benefits are that EEPROM do not have to be removed for erasure. Also it is possible to delete the cell contents selec

What is nv-ram, Nonvolatile Read Write Memory, also kown as Flash memory. I...

Nonvolatile Read Write Memory, also kown as Flash memory. It is also called as shadow RAM.

Device controllers, All components of computer communicate with processor b...

All components of computer communicate with processor by the system bus. Which means I/O devices required to be attached to system bus. But I/O devices aren't connected directly to

C programming, A palindrome is a string that reads the same from both the e...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Explain the main tags of wireless markup language, Discuss the main tags of...

Discuss the main tags of WML. Tag Definition of Wireless Markup Language: This defines the starting and the ending of the page, as .   this explains

Logical database reads the data from the database, Is it true that the Logi...

Is it true that the Logical Database reads the data from the database tables using Select Statements. Yes. We are coding that in Database part of LDB.

What do you mean by decoders, Q. What do you mean by Decoders? Decoder ...

Q. What do you mean by Decoders? Decoder transforms one kind of coded information to other form. A decoder has n inputs and one enable line (sort of selection line) and 2 n ou

Exception handling and recursion, In the previous assignment, you implement...

In the previous assignment, you implemented a stack and a list that both inherited from the abstract class ArrayIntCollection. In this task you are supposed to extend that implemen

Various connectivity option available to internet subscriber, What are the ...

What are the various connectivity options available to Internet Subscribers? Internet Connectivity Options: Internet access is perhaps one of the most admired services that

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