ISSUE 398

Number 398
Category errata
Synopsis 27.18: Description of return value is incorrect
State lrmdraft
Class errata-ptf
Arrival-DateJul 17 2003
Originator Charles Dawson
Release 2001b
Environment
Description
The description of the return value for
vpi_handle_by_multi_index() refers to "vpiRegWord" and
"vpiNetWord". There are no such types of objects. In
addition, there is no reference to variable objects, modules,
named events, or primitives.
Fix
1. The diagram modifications are:
In diagram 26.6.2, under the Instance array class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.5, under the Ports class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6, under the Nets class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6 under the Net array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7, under the Regs class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7 under the Reg array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.8 under the Variables class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.9 (Memory diagram) under the
regarray diagram add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.11 under the Named Event Array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

2. modify vpi_handle_by_index (27.17) as:
CHANGE description:
The VPI routine vpi_handle_by_index() shall return a
handle to an object based on the index number of the
object within a parent object. This function can be
used to access all objects that can access an
expression using vpiIndex. argument obj shall represent
the parent of the indexed object. For example, to
access a netbit, obj would be the associated net, while
for a memory word, obj would be the associated memory.

TO:
The VPI routine vpi_handle_by_index() shall return a
handle to an object based on the index number of the
object within the reference object, obj. The reference
object shall be an object that has the access by index
property. For example, to access a net bit, obj would
be the associated net, to access an element of a reg
array, obj would be the array. If the selection
represented by the index number does not lead to the
construction of a legal Verilog index select
expression, the routine shall return a null handle.

3. modify vpi_handle_by_multi_index (27.18) as:
CHANGE synopsis section:
Obtain a handle to a sub object using an array of
indexes and a parent object.
TO:
Obtain a handle to a sub object using an array of
indices and a reference object.

CHANGE in the description of the argument num_index:
number of indexes in the index array
TO:
number of indices in the index array

CHANGE in the description of argument index_array
array of indexes.
TO:
array of indices.

CHANGE the Returns description:
Handle to an object of type vpiRegBit, vpiNetBit,
vpiRegWord, or vpiNetWord
TO:
Handle to an object

CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall
return a handle to an object based on the list of
indexes and parent object passed in. The argument
num_index will contain the number of indexes in the
provided array index_array. The order of the indexes
provided, shall be for the left most select first,
progressing to the right most select last. This
function can be used to access all objects whose
property vpiMultiArray is TRUE. This routine shall
only provide access to a bit or word of the parent
object.

TO:
The VPI routine vpi_handle_by_multi_index() shall
provide access to an index selected sub object of the
reference handle. The reference object shall be an
object that has the access by index property. This
routine shall return a handle to a valid Verilog
object based on the list of indices provided by the
argument index_array, and reference handle denoted by
obj. The argument num_index shall contain the number
of indices in the provided array index_array. The
order of the indices provided, shall follow the array
dimension declaration from the left most range to the
right most range of the reference handle; the array
indices may be optionally followed by a bit select
index. If the indices provided do not lead to the
construction of a legal Verilog index select
expression, the routine shall return a null handle.
Audit-Trail

From: Shalom.Bresticker@motorola.com
To: Brad.Pierce@synopsys.com
Cc: ptf-bugs@boyd.com
Subject: Re: errata/398: PROPOSAL - 27.18: Description of return value is
incorrect
Date: Wed, 24 Sep 2003 11:08:44 +0300 (IDT)

If so, then it sounds like the description of vpi_handle_by_multi_index()
("Obtain a handle to a word or bit in an array") in Table 207 in 26.4 is
also incorrect or incomplete.

Similarly, the last sentence in 27.18 says,
"This routine shall only provide access to a bit or word of the parent
object."

And a question:
27.18 says, "This function can be used to access all objects whose property vpiMultiArray is TRUE."

vpiMultiArray is found in Annex G as

"#define vpiMultiArray 59 /* Object is a multidimensional array */"

It does not appear anywhere else in the LRM.
It is not described in Section 26. Should it?

> In 27.18, in the Description of the Returns of
> vpi_handle_by_multi_index()
>
> CHANGE
>
> "vpiRegBit, vpiNetBit, vpiRegWord, or vpiNetWord"
>
> TO
>
> "vpiReg, vpiRegBit, vpiNet, vpiNetBit, vpiGate,
> vpiSwitch, vpiUdp, vpiNamedEvent, vpiIntegerVar,
> vpiTimeVar, vpiRealVar, or vpiModule"

Shalom

From: Francoise Martinolle <fm@cadence.com>
To: ptf-bugs@boyd.com
Cc:
Subject: errata/398: new proposal for vpi_handle_muti_index
Date: Mon, 22 Mar 2004 10:38:28 -0500

--=====================_2878158==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Charles,
I need a number for vpiIsArray.
All,
Please review and let me know if that is okay.

We decided to
1. add boolean property: vpiIsArray property on the following object types:
variables, instance array, reg array, net array, namedEvent array.

add vpiIsArray to vpi_user.h
#define vpiIsArray xxx /* Object is an array */

2. and to modify the vpi_handle_by_multi_index description as:

CHANGE synopsis section:
Obtain a handle to a sub object using an array of indexes and a parent object.

TO:
Obtain a handle to a sub object using an array of indices and a reference
object.

in the description of the argument num_index:
CHANGE:
number of indexes in the index array
TO:
number of indices in the index array

In the description of argument index_array
CHANGE:
array of indexes.
TO:
array of indices

In the table description, CHANGE:
Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or vpiNetWord
TO:
Handle to an object

CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall return a handle to an
object based on the list of
indexes and parent object passed in. The argument num_index will contain
the number of indexes in the provided
array index_array. The order of the indexes provided, shall be for the left
most select first, progressing
to the right most select last. This function can be used to access all
objects whose property vpiMultiArray is
TRUE. This routine shall only provide access to a bit or word of the parent
object.

TO:
The VPI routine vpi_handle_by_multi_index() shall return a handle to an
object based on the list of
indices provided by the argument index_array, and reference handle denoted
by obj. The argument num_index will contain the number of indices in the
provided array index_array. The order of the indices provided, shall be for
the left most select first, progressing to the right most select last. This
routine can be used on a reference handle whose property vpiIsArray is
TRUE. This routine shall only provide access to an array element of the
reference handle.



--=====================_2878158==_.ALT
Content-Type: text/html; charset="us-ascii"


Charles,

 I need a number for vpiIsArray.

All,

Please review and let me know if that is okay.



We decided to

1. add boolean property: vpiIsArray property on the following object
types:

variables, instance array, reg array, net array, namedEvent array.



add vpiIsArray to vpi_user.h

#define vpiIsArray xxx /* Object is an array */



2. and to modify the vpi_handle_by_multi_index description as:



CHANGE synopsis section:

Obtain a handle to a sub object using an array of indexes and a parent
object.



TO:

Obtain a handle to a sub object using an array of indices and a reference
object.



in the description of the argument num_index:

CHANGE:

number of indexes in the index array

TO:

number of indices in the index array



In the description of argument index_array

CHANGE:

array of indexes.

TO:

array of indices



In the table description, CHANGE:

Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or
vpiNetWord

TO:

Handle to an object



CHANGE description:

The VPI routine vpi_handle_by_multi_index() shall return a handle
to an object based on the list of

indexes and parent object passed in. The argument num_index will
contain the number of indexes in the provided

array index_array. The order of the indexes provided, shall be for
the left most select first, progressing

to the right most select last. This function can be used to access all
objects whose property vpiMultiArray is

<font face="Courier, Courier">TRUE. This routine shall only
provide access to a bit or word of the parent object.



TO:

The VPI routine vpi_handle_by_multi_index() shall return a handle
to an object based on the list of

indices provided by the argument index_array, and reference handle
denoted by obj. The argument num_index will contain the
number of indices in the provided array index_array. The order of
the indices provided, shall be for the left most select first,
progressing to the right most select last. This routine can be used on a
reference handle whose property vpiIsArray is
<font face="Courier, Courier">TRUE. This routine shall only
provide access to an array element of the reference handle.







--=====================_2878158==_.ALT--

From: Shalom.Bresticker@motorola.com
To: ptf-bugs@boyd.com
Cc:
Subject: errata/398: 2nd try for proposal of vpi_handle_multi_index
Date: Tue, 23 Mar 2004 18:01:11 +0200 (IST)

For Francoise:

Rather than adding a new property, Charles proposed to annotate the VPI
diagrams with the vpi_handle_by_index and vpi_handle_by_multi_index
functions in the following fashion:


In diagram 26.6.2, under the Instance array class add:
-> instance array element
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.5, under the Ports class add:
-> port bit
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.6, under the Nets class add:
-> net bit
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.6 under the Net array class, add:
-> net array element
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.7, under the Regs class add:
-> reg bit
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.7 under the Reg array class, add:
-> reg array element
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.8 under the Variables class, add:
-> var select
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.9 (Memory diagram) under the regarray diagram, add:
-> memory work
vpi_handle_by_index
vpi_handle_by_multi_index

In diagram 26.6.11 under the Named Event Array class, add:
-> named event array element
vpi_handle_by_index
vpi_handle_by_multi_index


2. modify the vpi_handle_by_multi_index description as:

CHANGE synopsis section:
Obtain a handle to a sub object using an array of indexes and a parent object.

TO:
Obtain a handle to a sub object using an array of indices and a reference object.


In the description of the argument num_index:

CHANGE: number of indexes in the index array
TO: number of indices in the index array

In the description of argument index_array
CHANGE: array of indexes.
TO: array of indices

In the table description,
CHANGE:
Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or vpiNetWord
TO:
Handle to an object


CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall return a handle to an
object based on the list of indexes and parent object passed in. The
argument num_index will contain the number of indexes in the provided
array index_array. The order of the indexes provided, shall be for the left
most select first, progressing to the right most select last. This function
can be used to access all objects whose property vpiMultiArray is TRUE.
This routine shall only provide access to a bit or word of the parent object.

TO:
The VPI routine vpi_handle_by_multi_index() routine shall provide access to
an index selected sub object of the reference handle. This routine shall
return a handle to a valid Verilog object based on the list of
indices provided by the argument index_array, and reference handle denoted
by obj. The argument num_index shall contain the number of indices in the
provided array index_array. The order of the indices provided, shall first
follow the array dimension declaration from the left most range and
progressing to the right ranges of the reference handle; the array indices
may be optionally followed by a bit select index. If the indices provided
do not lead to the construction of a legal Verilog index select expression,
the routine shall return a null handle.



From: "Stuart Sutherland" <stuart@sutherland-hdl.com>
To: <ptf-bugs@boyd.com>
Cc:
Subject: errata/398: suggested wording for vpi_handle_by_index()
Date: Mon, 5 Apr 2004 13:37:57 -0700

For purposes of discussion, here is what I suggest for new wording on the
description of vpi_handle_by_index()

The VPI routine vpi_handle_by_index() shall return a handle to an object
based on the index number of the object within a parent object. Argument
obj shall represent the parent of the indexed object. This parent can be a
net or reg vector or an array. For example, to access a net-bit, obj would
be the associated net. To access a member of a reg array, obj would be the
array. If the selection represented by the index number does not lead to
the construction of a legal Verilog index select expression, the routine
shall return a null handle.


~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
stuart@sutherland-hdl.com
503-692-0898

From: Francoise Martinolle <fm@cadence.com>
To: ptf-bugs@boyd.com
Cc:
Subject: errata/398: 3rd try for proposal 398
Date: Mon, 05 Apr 2004 17:37:06 -0400

--=====================_25979316==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Steve suggested to define a new property access by name for use in the
diagrams to list vpi_handle_by_index and vpi_handle_multi_index.
Stuart suggested we also change vpi_handle_by_index description.

This is the new proposal which takes care of both functions.There are 3
actions:
changes to the diagrams, changes to 27.17 and changes to 27.18

1. The diagram modifications are:
In diagram 26.6.2, under the Instance array class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.5, under the Ports class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6, under the Nets class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6 under the Net array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7, under the Regs class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7 under the Reg array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.8 under the Variables class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.9 (Memory diagram) under the regarray diagram
add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.11 under the Named Event Array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

2. modify vpi_handle_by_index (27.17) as:
CHANGE description:
The VPI routine vpi_handle_by_index() shall return a handle to an object
based on the index number of the
object within a parent object. This function can be used to access all
objects that can access an expression
using vpiIndex. Argument obj shall represent the parent of the indexed
object. For example, to access a netbit,
obj would be the associated net, while for a memory word, obj would be the
associated memory.


TO:
The VPI routine vpi_handle_by_index() shall return a handle to an object
based on the index number of the object within the reference object, obj.
The reference object shall be an object that has the access by
index property. For example, to access a net bit, obj would be the
associated net.
To access an element of a reg array, obj would be the array. If the selection
represented by the index number does not lead to the construction of a legal
Verilog index select expression, the routine shall return a null handle.



3. modify vpi_handle_by_multi_index (27.18) as:
CHANGE synopsis section:
Obtain a handle to a sub object using an array of indexes and a parent object.
TO:
Obtain a handle to a sub object using an array of indices and a reference
object.

in the description of the argument num_index:
CHANGE:
number of indexes in the index array
TO:
number of indices in the index array

In the description of argument index_array
CHANGE:
array of indexes.
TO:
array of indices

In the table description, CHANGE:
Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or vpiNetWord
TO:
Handle to an object

CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall return a handle to an
object based on the list of
indexes and parent object passed in. The argument num_index will contain
the number of indexes in the provided
array index_array. The order of the indexes provided, shall be for the left
most select first, progressing
to the right most select last. This function can be used to access all
objects whose property vpiMultiArray is
TRUE. This routine shall only provide access to a bit or word of the parent
object.
TO:
The VPI routine vpi_handle_by_multi_index() shall provide access to
an index selected sub object of the reference handle. The reference object
shall be
an object that has the access by index property. This routine shall return
a handle
to a valid Verilog object based on the list of indices provided by the
argument index_array,
and reference handle denoted by obj. The argument num_index shall contain
the number of
indices in the provided array index_array. The order of the indices
provided, shall first
follow the array dimension declaration from the left most range and
progressing to the right ranges of the reference handle; the array indices
may be optionally followed by a bit select index. If the indices provided
do not lead to the construction of a legal Verilog index select expression,
the routine shall return a null handle.

--=====================_25979316==_.ALT
Content-Type: text/html; charset="us-ascii"


Steve suggested to define a new property access by name for use in the
diagrams to list vpi_handle_by_index and vpi_handle_multi_index.

Stuart suggested we also change vpi_handle_by_index description.



This is the new proposal which takes care of both functions.There are 3
actions:

changes to the diagrams, changes to 27.17 and changes to 27.18



1. The diagram modifications are:

In diagram 26.6.2, under the Instance array class add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.5, under the Ports class add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.6, under the Nets class add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.6 under the Net array class, add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.7, under the Regs class add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.7 under the Reg array class, add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.8 under the Variables class, add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.9 (Memory diagram) under the regarray diagram

add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



In diagram 26.6.11 under the Named Event Array class, add:

-> access by index

    vpi_handle_by_index()

    vpi_handle_by_multi_index()



2. modify vpi_handle_by_index (27.17) as:

CHANGE description:

<font face="Arial, Helvetica">The VPI routine
<font face="Arial, Helvetica">vpi_handle_by_index()
<font face="Arial, Helvetica">shall return a handle to an
object based on the index number of the

object within a parent object. This function can be used to access all
objects that can access an expression

using
<font face="Arial, Helvetica">vpiIndex<font face="Arial, Helvetica">.
Argument <font face="Arial, Helvetica">obj
<font face="Arial, Helvetica">shall represent the parent of
the indexed object. For example, to access a netbit,

<font face="Arial, Helvetica">obj
<font face="Arial, Helvetica">would be the associated net,
while for a memory word, <font face="Arial, Helvetica">obj
<font face="Arial, Helvetica">would be the associated
memory.





TO:

The VPI routine vpi_handle_by_index() shall return a handle to an
object

based on the index number of the object within the reference object,
obj.

The reference object shall be an object that has the access by

index
property. For example, to access a net bit, obj would be
the associated net.

To access an element of a reg array, obj would be the array. If
the selection

represented by the index number does not lead to the construction of a
legal

Verilog index select expression, the routine shall return a null handle.








3. modify vpi_handle_by_multi_index (27.18) as:

CHANGE synopsis section:

Obtain a handle to a sub object using an array of indexes and a parent
object.

TO:

Obtain a handle to a sub object using an array of indices and a reference


object.



in the description of the argument num_index:

CHANGE:

number of indexes in the index array

TO:

number of indices in the index array



In the description of argument index_array

CHANGE:

array of indexes.

TO:

array of indices



In the table description, CHANGE:

Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or
vpiNetWord

TO:

Handle to an object



CHANGE description:

The VPI routine vpi_handle_by_multi_index() shall return a handle
to an

object based on the list of

indexes and parent object passed in. The argument num_index will contain


the number of indexes in the provided

array index_array. The order of the indexes provided, shall be for the
left

most select first, progressing

to the right most select last. This function can be used to access all


objects whose property vpiMultiArray is

TRUE. This routine shall only provide access to a bit or word of the
parent

object.

TO:

The VPI routine vpi_handle_by_multi_index() shall provide access
to

an index selected sub object of the reference handle. The reference
object shall be

an object that has the access by index property. This routine
shall return a handle

to a valid Verilog object based on the list of indices provided by the
argument index_array,

and reference handle denoted by obj. The argument num_index
shall contain the number of

indices in the provided array index_array. The order of the
indices provided, shall first

follow the array dimension declaration from the left most range and


progressing to the right ranges of the reference handle; the array
indices

may be optionally followed by a bit select index. If the indices provided


do not lead to the construction of a legal Verilog index select
expression,

the routine shall return a null handle.



--=====================_25979316==_.ALT--

From: Francoise Martinolle <fm@cadence.com>
To: ptf-bugs@boyd.com
Cc:
Subject: errata/398: friendly amendment for proposal 398
Date: Wed, 05 May 2004 10:13:30 -0400

This is the final proposal which was voted on and passed on 5/3:
There are 3
actions:
changes to the diagrams, changes to 27.17 and changes to 27.18

1. The diagram modifications are:
In diagram 26.6.2, under the Instance array class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.5, under the Ports class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6, under the Nets class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6 under the Net array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7, under the Regs class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7 under the Reg array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.8 under the Variables class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.9 (Memory diagram) under the regarray diagram
add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.11 under the Named Event Array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

2. modify vpi_handle_by_index (27.17) as:
CHANGE description:
The VPI routine vpi_handle_by_index() shall return a handle to an object
based on the index number of the
object within a parent object. This function can be used to access all
objects that can access an expression
using vpiIndex. Argument obj shall represent the parent of the indexed
object. For example, to access a netbit,
obj would be the associated net, while for a memory word, obj would be the
associated memory.


TO:
The VPI routine vpi_handle_by_index() shall return a handle to an object
based on the index number of the object within the reference object, obj.
The reference object shall be an object that has the access by
index property. For example, to access a net bit, obj would be the
associated net, to access an element of a reg array, obj would be the
array. If the selection
represented by the index number does not lead to the construction of a legal
Verilog index select expression, the routine shall return a null handle.



3. modify vpi_handle_by_multi_index (27.18) as:
CHANGE synopsis section:
Obtain a handle to a sub object using an array of indexes and a parent
object.
TO:
Obtain a handle to a sub object using an array of indices and a reference
object.

in the description of the argument num_index:
CHANGE:
number of indexes in the index array
TO:
number of indices in the index array

In the description of argument index_array
CHANGE:
array of indexes.
TO:
array of indices

In the table description, CHANGE:
Handle to an object of type vpiRegBit, vpiNetBit, vpiRegWord, or vpiNetWord
TO:
Handle to an object

CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall return a handle to an
object based on the list of
indexes and parent object passed in. The argument num_index will contain
the number of indexes in the provided
array index_array. The order of the indexes provided, shall be for the left
most select first, progressing
to the right most select last. This function can be used to access all
objects whose property vpiMultiArray is
TRUE. This routine shall only provide access to a bit or word of the parent
object.

TO:
The VPI routine vpi_handle_by_multi_index() shall provide access to
an index selected sub object of the reference handle. The reference object
shall be an object that has the access by index property. This routine
shall return
a handle to a valid Verilog object based on the list of indices provided
by the
argument index_array, and reference handle denoted by obj. The argument
num_index
shall contain the number of indices in the provided array index_array.
The order of the indices
provided, shall follow the array dimension declaration from the left most
range to the right
most range of the reference handle; the array indices
may be optionally followed by a bit select index. If the indices provided
do not lead to the construction of a legal Verilog index select expression,
the routine shall return a null handle.


From: Shalom.Bresticker@freescale.com
To: ptf-bugs@boyd.com
Cc:
Subject: Re: errata/398: friendly amendment for proposal 398
Date: Sun, 9 May 2004 08:35:11 +0300 (IDT)

I hope this has been entered into the FIX field of this issue in the database.

I have a couple of questions:


On Wed, 5 May 2004, Francoise Martinolle wrote:

> This is the final proposal which was voted on and passed on 5/3:
...
> 2. modify vpi_handle_by_index (27.17) as:
> CHANGE description:
...
> TO:
> The VPI routine vpi_handle_by_index() shall return a handle to an object
> based on the index number of the object within the reference object, obj.
> The reference object shall be an object that has the access by
> index property. For example, to access a net bit, obj would be the
> associated net, to access an element of a reg array, obj would be the
> array. If the selection
> represented by the index number does not lead to the construction of a legal
> Verilog index select expression, the routine shall return a null handle.

So this routine is appropriate only for vectors of nets/variables and for
one-dimensional arrays of any type?

...

> 3. modify vpi_handle_by_multi_index (27.18) as:
...
> CHANGE description:
...
> TO:
> The VPI routine vpi_handle_by_multi_index() shall provide access to
> an index selected sub object of the reference handle. The reference object
> shall be an object that has the access by index property. This routine
> shall return
> a handle to a valid Verilog object based on the list of indices provided
> by the
> argument index_array, and reference handle denoted by obj. The argument
> num_index
> shall contain the number of indices in the provided array index_array.
> The order of the indices
> provided, shall follow the array dimension declaration from the left most
> range to the right
> most range of the reference handle; the array indices
> may be optionally followed by a bit select index. If the indices provided
> do not lead to the construction of a legal Verilog index select expression,
> the routine shall return a null handle.

So for an n-dimensional net/variable array, the number of indices in
index_array may be n or n+1 ?

Can the object be a vector which is not an array (with num_index 0 or 1)?


From: Francoise Martinolle <fm@cadence.com>
To: ptf-bugs@boyd.com, Shalom.Bresticker@freescale.com
Cc:
Subject: Re: errata/398: friendly amendment for proposal 398
Date: Mon, 10 May 2004 10:10:33 -0400 (EDT)

>Date: Sat, 8 May 2004 22:20:00 -0700
>From: Shalom.Bresticker@freescale.com
>To: ptf-bugs@boyd.com
>Subject: Re: errata/398: friendly amendment for proposal 398
>X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on wa.boyd.com
>X-Spam-Level:
>X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,NO_REAL_NAME autolearn=no
version=2.63
>X-pstn-levels: (S:99.90000/99.90000 R:95.9108 P:95.9108 M:98.0742 C:65.4890 )
>X-Received: By mailgate.Cadence.COM as WAA17844 at Sat May 8 22:40:37 2004
>
>The following reply was made to PR errata/398; it has been noted by GNATS.
>
>From: Shalom.Bresticker@freescale.com
>To: ptf-bugs@boyd.com
>Cc:
>Subject: Re: errata/398: friendly amendment for proposal 398
>Date: Sun, 9 May 2004 08:35:11 +0300 (IDT)
>
> I hope this has been entered into the FIX field of this issue in the database.
>

Shalom,

I have not yet enter this in the FIX field. I did not know I needed to do
this.I will ask Charles.

> I have a couple of questions:
>
>
> On Wed, 5 May 2004, Francoise Martinolle wrote:
>
> > This is the final proposal which was voted on and passed on 5/3:
> ...
> > 2. modify vpi_handle_by_index (27.17) as:
> > CHANGE description:
> ...
> > TO:
> > The VPI routine vpi_handle_by_index() shall return a handle to an object
> > based on the index number of the object within the reference object, obj.
> > The reference object shall be an object that has the access by
> > index property. For example, to access a net bit, obj would be the
> > associated net, to access an element of a reg array, obj would be the
> > array. If the selection
> > represented by the index number does not lead to the construction of a
legal
> > Verilog index select expression, the routine shall return a null handle.
>
> So this routine is appropriate only for vectors of nets/variables and for
> one-dimensional arrays of any type?
>

Yes

> ...
>
> > 3. modify vpi_handle_by_multi_index (27.18) as:
> ...
> > CHANGE description:
> ...
> > TO:
> > The VPI routine vpi_handle_by_multi_index() shall provide access to
> > an index selected sub object of the reference handle. The reference
object
> > shall be an object that has the access by index property. This routine
> > shall return
> > a handle to a valid Verilog object based on the list of indices provided
> > by the
> > argument index_array, and reference handle denoted by obj. The argument
> > num_index
> > shall contain the number of indices in the provided array index_array.
> > The order of the indices
> > provided, shall follow the array dimension declaration from the left most
> > range to the right
> > most range of the reference handle; the array indices
> > may be optionally followed by a bit select index. If the indices provided
> > do not lead to the construction of a legal Verilog index select
expression,
> > the routine shall return a null handle.
>
> So for an n-dimensional net/variable array, the number of indices in
> index_array may be n or n+1 ?
>
> Can the object be a vector which is not an array (with num_index 0 or 1)?

Yes. The intent is to support vectors and arrays and only allow to contruct a
Verilog expression tht is a legal Verilog expression.
This wording allows for future extensions and for example will allow sub-arrays
to be returned as they are legal in SystemVerilog.
>
>
>


Fix replaced by chas@cadence.com on Mon May 17 07:23:08 2004
1. The diagram modifications are:
In diagram 26.6.2, under the Instance array class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.5, under the Ports class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6, under the Nets class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.6 under the Net array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7, under the Regs class add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.7 under the Reg array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.8 under the Variables class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.9 (Memory diagram) under the
regarray diagram add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

In diagram 26.6.11 under the Named Event Array class, add:
-> access by index
vpi_handle_by_index()
vpi_handle_by_multi_index()

2. modify vpi_handle_by_index (27.17) as:
CHANGE description:
The VPI routine vpi_handle_by_index() shall return a
handle to an object based on the index number of the
object within a parent object. This function can be
used to access all objects that can access an
expression using vpiIndex. argument obj shall represent
the parent of the indexed object. For example, to
access a netbit, obj would be the associated net, while
for a memory word, obj would be the associated memory.

TO:
The VPI routine vpi_handle_by_index() shall return a
handle to an object based on the index number of the
object within the reference object, obj. The reference
object shall be an object that has the access by index
property. For example, to access a net bit, obj would
be the associated net, to access an element of a reg
array, obj would be the array. If the selection
represented by the index number does not lead to the
construction of a legal Verilog index select
expression, the routine shall return a null handle.

3. modify vpi_handle_by_multi_index (27.18) as:
CHANGE synopsis section:
Obtain a handle to a sub object using an array of
indexes and a parent object.
TO:
Obtain a handle to a sub object using an array of
indices and a reference object.

CHANGE in the description of the argument num_index:
number of indexes in the index array
TO:
number of indices in the index array

CHANGE in the description of argument index_array
array of indexes.
TO:
array of indices.

CHANGE the Returns description:
Handle to an object of type vpiRegBit, vpiNetBit,
vpiRegWord, or vpiNetWord
TO:
Handle to an object

CHANGE description:
The VPI routine vpi_handle_by_multi_index() shall
return a handle to an object based on the list of
indexes and parent object passed in. The argument
num_index will contain the number of indexes in the
provided array index_array. The order of the indexes
provided, shall be for the left most select first,
progressing to the right most select last. This
function can be used to access all objects whose
property vpiMultiArray is TRUE. This routine shall
only provide access to a bit or word of the parent
object.

TO:
The VPI routine vpi_handle_by_multi_index() shall
provide access to an index selected sub object of the
reference handle. The reference object shall be an
object that has the access by index property. This
routine shall return a handle to a valid Verilog
object based on the list of indices provided by the
argument index_array, and reference handle denoted by
obj. The argument num_index shall contain the number
of indices in the provided array index_array. The
order of the indices provided, shall follow the array
dimension declaration from the left most range to the
right most range of the reference handle; the array
indices may be optionally followed by a bit select
index. If the indices provided do not lead to the
construction of a legal Verilog index select
expression, the routine shall return a null handle.

Unformatted


Hosted by Boyd Technology