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

Arithmetic pipeline, Arithmetic Pipeline The complex arithmetic operati...

Arithmetic Pipeline The complex arithmetic operations like floating point and multiplication operations use a lot of the time of the ALU. These operations can also be pipelined

Define cloud computing with example, Define Cloud Computing with example. ...

Define Cloud Computing with example. Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., se

State the features of pentium series of microprocessors, State the features...

State the features of Pentium series of microprocessors: Pentium is a 32-bit superscalar, CISC microprocessor.  The term superscalar is used for processor that contains more th

Display frames (horizontal and vertical lines) in lists, How can you displa...

How can you display frames (horizontal and vertical lines) in lists? You can show tabular lists with horizontal and vertical lines (FRAMES) using the ULINE command and the syst

Dynamic programming, Given: • A sequence of n arrival times t0, t1, ..., ...

Given: • A sequence of n arrival times t0, t1, ..., tn-1, • a library of mlogically equivalent gates {(d0, c0), (d1, c1), ..., (dm-1,cm-1)} where d is delay and c is cost • a

Explain the storage class auto, Explain The Storage Class auto The Stor...

Explain The Storage Class auto The Storage Class auto : Variables declared within function bodies are automatic by default. Thus, automatic is the most common of the four stora

Propositional versions of resolution, Propositional versions of resolution:...

Propositional versions of resolution: Just because of so far we've only looked at propositional versions of resolution. However in first-order logic we require to also deal wi

Describe about physical systems, Q. Describe about Physical Systems? Ph...

Q. Describe about Physical Systems? Physical Systems are tangible entities which may be dynamic or static.   Computer Systems, Buildings,Vehicles etc. are illustrations of p

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 knowledge representation and reasoning, Artificial Intelligence Kno...

Artificial Intelligence Knowledge show (KR) is an area of artificial intelligence research aimed at showing knowledge in symbols to facilitate inferrencing from those knowledge ele

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