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

Swing, how to make a dfd of simple calculator?

how to make a dfd of simple calculator?

Illustrate the logical view of a system, Illustrate the Logical view of a s...

Illustrate the Logical view of a system The Logical view of a system serves to describe existence and meaning of key abstractions and mechanism which form problem space, or wh

What is ale and explain the functions of ale in 8085, ALE-> Address latch e...

ALE-> Address latch enable...In the case of microcontroller (8051)& microprocessor 8085 the data line and low order 8 bit address lines are multiplexed. In order to getting address

Which transistor is used in every cell of eprom, Floating gate Avalanche In...

Floating gate Avalanche Injection MOS (FAMOS) transistor is used in every cell of EPROM.

Input-output-processor interconnection network (iopin), Input-Output-Proces...

Input-Output-Processor Interconnection Network (IOPIN): This interconnection network is designed for communication between I/O Channels and processors. Every single one proces

What is the motivation for cell design, Question: a) Evary cell in a ce...

Question: a) Evary cell in a cellular network is assigned a band of frequencies. The allocated frequencies are divided into two types of channels. Indentify and describe each t

Bangla numeral recognition using multilayer feed forward, Assignment 4: Han...

Assignment 4: Handwritten Bangla Numeral Recognition using Multilayer Feed Forward Neural Network. In this assignment, you will design a multi layer feed forward neural network

Conversion of bcd number to binary using a procedure, Q. Conversion of BCD ...

Q. Conversion of BCD number to binary using a procedure? Conversion of BCD number to binary using a procedure. Algorithm for conversion procedure: Take a packed BCD digit

Explain microcode and VLSI technology, Q. Explain Microcode and VLSI Techno...

Q. Explain Microcode and VLSI Technology? It is considered that CU of a computer be assembled using two ways; create micro-program which execute micro-instructions or construct

What is the meaning of aliasing, a. What is the meaning of aliasing? What a...

a. What is the meaning of aliasing? What are its drawbacks? Describe a method to remove aliasing, using post filtering. b. How can you copy a Pixmap from one place to another

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