[sv-bc] RE: [sv-ec] Mantis 1702 unpacked concatenation of arrays - RESEND missing text

From: Jonathan Bromley <jonathan.bromley_at_.....>
Date: Tue Dec 04 2007 - 05:55:29 PST
Dave

Thanks for this excellent exposition.

> a) the reference is a handle to the element, or
> b) the reference is a handle to the queue + an offset?
> I believe the intent is answer (a)

I definitely agree that this makes the most sense,
partly because it is precisely the behavior that a 
user would likely get if they were to implement a 
double-ended linked list of class objects for 
themselves.  Option (b) simply doesn't do the
things I would want to do with such references -
even the most obvious thing, keeping a reference
to a transaction as it flows through a FIFO, 
requires (a).

> Now to the second issue that is more specific to
> unpacked concatenation. What if the queue methods
> in the example above are replaced with concatenation? 

I guess I've already made my own position clear on this
by writing-up the 1702 proposal to say that any write
to an unpacked array variable trashes any existing
elements in the written array.  I guess I should have
been clearer in 1702 about what happens if you write
to *part* of an array:
    q[2:3] = '{1,2};
My expectation here would be that any references to
q[2] or q[3] would go stale, but references to any
elements in q[0:1] or q[4:$] would remain live.

I just can't see any alternative that would make
consistent sense across all the variety of possible
operations on a queue variable.  I agree that it
forces a potentially inefficient copy in some 
situations where that could perhaps be avoided, 
but I'd far sooner have that than confusing or
fragile behavior.  I also think that it's a
behavior that's easy to define and easy to 
educate users about.  And, as you say, a few new
queue methods could claw back the efficiency
in most of the practically useful cases.
--
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

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

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Dec 4 05:58:24 2007

This archive was generated by hypermail 2.1.8 : Tue Dec 04 2007 - 05:59:18 PST