RE: [sv-ec] RE: [sv-bc] 5.6, 22.6: Dynamic Arrays questions

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Nov 09 2005 - 23:39:42 PST
The analogy between a queue and a dynamic array can be seen from the sentences,
"A dynamic array is any dimension of an unpacked array whose size can be set or changed at runtime." (5.6) and "A queue is analogous to a one-dimensional unpacked array that
grows and shrinks automatically." (5.14)

Shalom

________________________________________
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Rich, Dave
Sent: Thursday, November 10, 2005 1:26 AM
To: Chris Spear
Cc: sv-ec@eda.org
Subject: RE: [sv-ec] RE: [sv-bc] 5.6, 22.6: Dynamic Arrays questions

Hi Chris,
 
I think all the queue methods and the dynamic array constructor are currently defined to work on one dimension of an array at a time.
 
I think the concept that has trouble coming across is that a queue or dynamic array is not a data type on its own; it's just one component of the indexing mechanism for unpacked arrays. This confusion comes for the mixed heritage of SystemVerilog. Dynamic arrays came from Vera, Queues and unpacked array terminology came from Super log. 
 
This section will need some major re-wording to make it clearer.
 
Dave
 

________________________________________
From: Chris Spear [mailto:Chris.Spear@synopsys.com]
Sent: Wed 11/9/2005 12:59 PM
To: Rich, Dave
Subject: RE: [sv-ec] RE: [sv-bc] 5.6, 22.6: Dynamic Arrays questions
Yes, my thinking is clouded by my Vera experience!

In my P1800 LRM, section 5.14 Queues, "A queue is analogous to a one-dimensional unpacked array that
grows and shrinks automatically."  I could not find anything that equated a queue with a dynamic array or any examples.  Some of the methods such as push_front() and pop_back are easy to define for a 1-dimensional array, but not a multi-dimensional one.  Do you push a 1-d on a 2-d?


/*********************************************************  
Chris Spear              Verification Specialist            
Synopsys, Inc.           Phone 508-263-8114      ..  __@    
377 Simarano Drive       Fax   508-263-8123        _`\<,_   
Marlboro, MA 01752 USA   Cell  508-254-7223    .. (*)/ (*)  
Spear_ f rom _Synopsys.com       http://Chris.Spear.net%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0%a0
*********************************************************/ 

-----Original Message-----
From: Rich, Dave [mailto:Dave_Rich@mentor.com]
Sent: Wednesday, November 09, 2005 10:48 AM
To: Chris Spear
Subject: RE: [sv-ec] RE: [sv-bc] 5.6, 22.6: Dynamic Arrays questions

This was true in Vera, but not SystemVerilog.

A queue or dynamic array can be of any type.

Section 5.6 "A dynamic array is *any* dimension of an unpacked array whose size can be set or changed at runtime."

> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Chris
> Spear
> Sent: Wednesday, November 09, 2005 3:34 AM
> To: sv-ec@eda.org
> Subject: RE: [sv-ec] RE: [sv-bc] 5.6, 22.6: Dynamic Arrays questions
>
> > int A[$][$];// assume no elements have been added
>
> Actually, queues can only have a single dimension, like dynamic arrays.
>
> /***************************************************************
> Chris Spear               Verification Specialist
> Synopsys, Inc.            Phone 508-263-8114          ..  __@
> 377 Simarano Drive        Fax   508-263-8123            _`\<,_
> Marlboro, MA 01752 USA    Cell  508-254-7223        .. (*)/ (*)
> Spear_ f rom _Synopsys.com        http://Chris.Spear.net
> ***************************************************************/
Received on Wed Nov 9 23:39:49 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 09 2005 - 23:39:58 PST