RE: [sv-ec] RE: [sv-bc] Issues on Queue Operators

From: Jonathan Bromley <jonathan.bromley_at_.....>
Date: Wed May 31 2006 - 06:01:02 PDT
[me]
> > >a queue has the property, not shared with a
> > >dynamic array, that it may be resized merely by being
> > >the target of an assignment.

[Dave Rich]
> Both dynamic arrays and queues can be resized by being the 
> target of an assignment (a copy). 

My error; of course you're exactly right.

> The real difference between the two is pass by reference semantics.
> Queues guarantee references to unaffected elements when their size
> changes. Dynamic arrays references become outdated whenever they are
> re-sized.

OK, that's very important and makes a big difference to my suggestion
that queues and dynamic arrays should be merged, but I didn't find 
it in the LRM... what did I miss?

> The only other difference is that a dynamic array has a malloc-like
> constructor, whereas queues have incremental push and pop methods for
> changing their size.

I'm not entirely sure I follow how this difference is important when 
I assign to a queue from entirely new data using Q={,,,}; syntax.
-- 
Jonathan Bromley, Consultant

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

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK
Tel: +44 (0)1425 471223                   Email: jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573                           Web: http://www.doulos.com

This e-mail and any  attachments are  confidential and Doulos Ltd. reserves 
all rights of privilege in  respect thereof. It is intended for the use of 
the addressee only. If you are not the intended recipient please delete it 
from  your  system, any  use, disclosure, or copying  of this  document is 
unauthorised. The contents of this message may contain personal views which 
are not the views of Doulos Ltd., unless specifically stated.
Received on Wed May 31 06:00:40 2006

This archive was generated by hypermail 2.1.8 : Wed May 31 2006 - 06:01:04 PDT