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

From: Jonathan Bromley <jonathan.bromley_at_.....>
Date: Tue Nov 13 2007 - 00:16:21 PST
A follow-up to the previous email:

It seems to me that assignment-pattern syntax '{} 
should also be legal for creating queue expressions,
with the proviso that every item in the '{} should
be an individual element of the queue.  This matches
the use of '{} for dynamic arrays.

Consequently, all the following would be legal:

  int Q[$];

  Q = {1,2,3}; // queue concat
  Q = '{1,2,3}; // assignment pattern
  Q = {4, Q, 5}; // queue concat

but this would not:

  Q = '{4, Q, 5};  // 2nd item is wrong type

The LRM is currently fairly quiet about whether
'{} is OK for queue expressions; would everyone
be OK with making it legal explicitly?

Having both forms is quite useful.  Items in a
'{} are in an assignment-like context, making 
some items legal that would not be legal in 
a queue concat.  But there's no plausible way
(as far as I can see) to make '{} accept a 
mixture of queue and element items.  So I think
we should permit both forms.
-- 
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 Nov 13 00:16:44 2007

This archive was generated by hypermail 2.1.8 : Tue Nov 13 2007 - 00:17:22 PST