[sv-bc] RE: [sv-ec] Mantis 1702 - queue concatenation

From: Jonathan Bromley <jonathan.bromley_at_.....>
Date: Wed Nov 14 2007 - 09:47:38 PST
Moumita,

I think you and I share the same concerns.  It's exactly
these issues that we want to clarify.

> According to SV LRM 3.1a -

I'm not too worried about what 3.1a says.  The assignment
pattern syntax was invented to work around some intolerable
ambiguities introduced by the many uses of {} in 3.1a, and
it's unfortunate that there was by that time so much 
existing code using {} for aggregates that many tool 
vendors felt obliged to maintain legacy support for it.

> So my question is-
> 1. whether queue is considered as aggregate expression
> or not in 2008 SV LRM?

I need to do some more work on this.  I'd like to see '{}
useful to create assignment patterns of queue type, in which
every item should be of the queue's element type (i.e.
no multi-element items allowed).  {} could then have the
special status that when used in an assignment-like 
context it could represent a queue-concatenation with
items of both element type and queue type.  But we need
to take very great care to avoid introducing ambiguity.

> 2. If we have an array like a[$][2:0][] then to
> assign the array user needs to use {}(for queue)
> and '{} both in nested way, which may make more confusion. 

If my answer to your question (1) can be made to work, we can
use '{} at all levels of the assignment, just as we can today
with arrays like "int a[0:2][3:0]".  {} would be needed only
to form queue aggregates that contain both elements and queues.

> I think there should be an uniform guideline for all types
> of arrays in the LRM to avoid any confusion in future.

I rather strongly agree, but there is also a strong desire
to rescue the queue-concatenation syntax (from Superlog)
shown in section 7.11.1 of draft 4.  Many people have pointed
out that this is completely incompatible with the way '{}
could reasonably be expected to work.  That's why I want to
find a good definition of {} in this special case.  I think
we should consider '{} to be the standard way to write any
unpacked aggregate, including queues where we simply have 
a list of element values, and reserve {} for the unusual 
(but very useful) case where we want to make a queue 
from a mixture of queue values and element values.

Thanks for the comments.
--
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 Wed Nov 14 09:48:24 2007

This archive was generated by hypermail 2.1.8 : Wed Nov 14 2007 - 09:48:41 PST