Difference between blocking and non-blocking, Computer Engineering

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.

 

Posted Date: 9/17/2013 2:58:04 AM | Location : United States







Related Discussions:- Difference between blocking and non-blocking, Assignment Help, Ask Question on Difference between blocking and non-blocking, Get Answer, Expert's Help, Difference between blocking and non-blocking Discussions

Write discussion on Difference between blocking and non-blocking
Your posts are moderated
Related Questions
How to configure TSM server

This unit starts by discussing the importance of involving users in the interaction design process, explaining the reasons why user involvement can be useful, the different degrees

What is Machine.config?  Machine configuration file: The machine. config file contains settings that apply to the whole computer.  The machine.config, which can be found in the

algorithm for deleteing a node

Multiple Instruction and Single Data stream (MISD): In this type of organization multiple processing elements are ordered under the control of multiple control units. Every contro

DETERMINE ANALYTICALY IF THE SIGNAL IS PERIODIC OR NOT - X[n] = 4Cos(Pi n)

develop system engineering hirarcy for public health care?

Stack Organization The CPU of the most computers comprises of stack or called as last-in-first-out (LIFO) list in which information is stored in such a manner that item stored

Q. Explain Functional Roles of Information System? Functional Roles of Information System 1 Lower Costs - a) Use IT to significantly reduce the cost of business proce

For what an append query be used? It is simple to append records from one table to another using an append query. There is no requirement for the tables to have the similar num