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



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
Define the types Programmable logic devices? There are mostly three types PLDs. These are vary in the placement of fuses in the AND- OR array. 1. ROM- It has fixed AND array

Parallel Virtual Machine (PVM): PVM (Parallel Virtual Machine) is portable message passing programming system which is designed to link different heterogeneous host machines to

The Transmission-Gate input is linked to the D_LATCH data input (D), the control input to the Transmission-Gate is linked to the D_LATCH enable input (EN) and the Transmission-Gate

Q. Explain Micro-operations performed by CPU? The micro-operations performed by CPU can be categorized as:    Micro-operations for data transfer from register-memory, re

Create your own Subprogram that does *not* use any input parameters. You decide the theme. You should give the pseudocode and an example Subroutine call. Be sure to give an overvie

Write a short note on MMX technology. MMX (Multimedia extensions) technology adds 57 new instructions to instruction set of the Pentium - 4 microprocessors. MMX technology also

What are Addressing Modes Many of instructions that a computer actually executes during running of a program concern movement of data to and from memory. It is not possible sim

Explain definition of fibonacci Where an input value gives a trivial result, it is returned directly, otherwise the function calls itself, passing a changed version of the inpu

Explain advantageand disadvantages of a dynamic document.   The chief advantages of a dynamic document lie in its capability to report current information. For illustratio

In what order do the events of an ASPX page execute. As a developer is it important to understand these events?   If you try to access it in Page_Load that is way previous th