[sv-ec] Comments on Chapter 4 - Arrays


Subject: [sv-ec] Comments on Chapter 4 - Arrays
From: Jay Lawrence (lawrence@cadence.com)
Date: Mon Jan 06 2003 - 07:27:20 PST


4.2 - Refence to VeraLite
-------------------------

The reference to VeraLite on top of page 22 should be removed/changed.

4.6.1 - Syntax of new[]
-----------------------

If the 'size' specification is an argument to new then () should be
used.

4.7 - "compile-time" error
--------------------------

What is meant by "compile-time" error? Parsing, elaboration, any-time
before simulation starts? We should either define this concept or just
say "error" and have tools produce it when they can.

4.8 - passing dynamic arrays as arguments
-----------------------------------------

Since these dynamic arrays look like handles to a dynamic object this
section should probably state that a copy of the dynamic array is
passed. That also gets rid of the issue of having the dynamic array
deleted while the task is waiting.

4.9 - ordering on associative arrays.
-------------------------------------

At one point this section says an associate array imposes an ordering.
In another (4.9.3) it says the ordering for non-integral indices is
"arbitrary but deterministic". I think we need to provide a way to
guarantee deterministic ordering across implementations.

I would propose an interface similar to qsort() or the perl sort()
capability on hashes, that allows the user to provide a function to
specify the ordering. This would return -1, 0, 1 a la strcmp().

4.9.1 - unspecified index type
------------------------------

This currently says "The array can be indexed by any integral data type,
including integers, packed arrays of arbitrary length, string literals,
and packed structures"

Was enum's left out explicitly or should they be added. I believe they
should be added.

4.9.1 - length of index expression is significant
-------------------------------------------------

This seems to imply that 1'b1 and 2'b01 would index different elements
in the array, is this true? If so I don't like it. What is the ordering
of these overlapping indices?

4.9.4 - why is 'x' and 'z' disallowed
-------------------------------------

If I declare an integer associative array why are 'x' and 'z' disallowed
as indices?

If I want it 2 state I should use 'int'.

4.9.6 - use of event as array indices?
--------------------------------------

Why is 'event' included in table 4.5. The value of an event can't be
tested like this or are you assuming they can?



This archive was generated by hypermail 2b28 : Mon Jan 06 2003 - 07:28:04 PST