blocking and non-blocking assignment 
Author Message
 blocking and non-blocking assignment

hi

Do blocking and non-blocking assignment synthesize differently?



Mon, 14 Nov 2005 00:58:20 GMT  
 blocking and non-blocking assignment

They're not supposed to.  I imagine someone could find an example
where they did synthesize differently, but it would be pretty obscure.

They do simulate differently.  That's why it's important to use the
correct one.

There's a couple of white papers on the web about it, but generally,
use non-blocking for clocked processes, blocking otherwise.

SH7

Quote:

>hi

>Do blocking and non-blocking assignment synthesize differently?



Sun, 13 Nov 2005 23:59:22 GMT  
 blocking and non-blocking assignment

Quote:

> hi

> Do blocking and non-blocking assignment synthesize differently?

In certain special cases, yes:


     foo = x;
     bar = foo+1;
   end

vs.


     foo <= x;
     bar <= foo+1;
   end

In the first example, only bar is registered, foo is an intermediate
value for the combinational expression. In the second example, both
foo and bar are registered.

Other then due to nesting issues like this, = and <= synthesize
identically.

--
Steve Williams                "The woods are lovely, dark and deep.
steve at icarus.com           But I have promises to keep,
steve at picturel.com         and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."



Mon, 14 Nov 2005 00:33:37 GMT  
 blocking and non-blocking assignment


Quote:

> >Do blocking and non-blocking assignment synthesize differently?
> They're not supposed to.  I imagine someone could find an example
> where they did synthesize differently, but it would be pretty obscure.

I don't think this is obscure:

module delay2(ck, d, q);  |   module delay1(ck, d, q);
  input ck, d;            |     input ck, d;
  output q;               |     output q;
  reg q, r;               |     reg q, r;
                          |

  begin                   |     begin
    r <= d;               |       r = d;
    q <= r;               |       q <= r;
  end                     |     end
                          |
endmodule                 |   endmodule

And I would be very, very upset indeed if my synthesis tool
gave me the same results for both.

Quote:
> There's a couple of white papers on the web about it,
> but generally, use non-blocking for clocked processes,
> blocking otherwise.

That's a good starting point, but no substitute for
getting it right.  The best-known paper on this is probably
http://www.sunburst-design.com/papers/CummingsSNUG2000SJ_NBA_rev1_2.pdf
although it doesn't tell the whole story - for example, its
recommendations would outlaw my "delay1", but there are
situations where that trick is very useful and appropriate.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK

Fax: +44 (0)1425 471573                           Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.



Mon, 14 Nov 2005 00:35:13 GMT  
 blocking and non-blocking assignment
On Wed, 28 May 2003 17:35:13 +0100, "Jonathan Bromley"

-- SNIP --

Quote:

>And I would be very, very upset indeed if my synthesis tool
>gave me the same results for both.

I hadn't thought of that one.  Thank you for the correction.
(both of you)

SH7



Mon, 14 Nov 2005 13:49:44 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Strange behaviour with blocking and non-blocking assignment

2. Blocking and Non-blocking assignment ?

3. "Blocking and non-blocking" assignments

4. blocking/non-blocking

5. Blocking/Non-Blocking

6. block and non-block?

7. blocking vs non blocking

8. Blocking vs Non-Blocking Assignemts

9. blocking vs non-blocking

10. Blocking and non-blocking sockets

11. blocking/non-blocking

12. Technical question (blocking/non-blocking)

 

 
Powered by phpBB® Forum Software