ISSUE 622

Number 622
Notify-List
Category errata
Synopsis Return value for left/right range of unsize parameter
State ptfpassed
Class errata-ptf
Arrival-DateSep 16 2004
Originator James H. Vellenga
Release
Environment
Description
Our users, in order to be able to do range checking on parameter
indexing and bit selects, want to be able to know the bounds for
parameters, whether or not the parameter has an explicitly declared
range. The specification does not say what should happen if an
application attempts to access the left or right range of a parameter
when the parameter does not have ranges specified in the HDL.

To allow users to distinguish the two forms of declaration, we propose
that VPI return NULL handles for left and right ranges of unsized
parameters without reporting an error.

Proposal:

In section 26.6.12, "Parameter, specparam", add the following note:

3) If a parameter does not have an explicitly declared range,
vpiLeftRange and vpiRightRange shall return a NULL handle.

James H. Vellenga
Cadence Design Systems, Inc.
Fix
This has been resolved via:

http://www.eda.org/svdb/bug_view_page.php?bug_id=0000309
Audit-Trail
From: Shalom.Bresticker@freescale.com
To: vellenga@cadence.com
Cc: ptf-bugs@boyd.com
Subject: Re: errata/622: Return value for left/right range of unsize parameter
Date: Sun, 19 Sep 2004 15:35:01 +0300 (IDT)

3.11.1 says,

"A parameter with no range specification, and with either a signed type
specification or no type specification, shall have an implied range with
an lsb equal to 0 and an msb equal to one less than the size of the final
value assigned to the parameter.

"A parameter with no range specification, and with either a signed type
specification or no type specification, and for which the final value assigned
to it is unsized, shall have an implied range with
an lsb equal to 0 and an msb equal to an implementation-dependent value of
at least 31."

> Our users, in order to be able to do range checking on parameter
> indexing and bit selects, want to be able to know the bounds for
> parameters, whether or not the parameter has an explicitly declared
> range. The specification does not say what should happen if an
> application attempts to access the left or right range of a parameter
> when the parameter does not have ranges specified in the HDL.

Shalom

--
Shalom Bresticker Shalom.Bresticker @freescale.com
Design & Verification Methodology Tel: +972 9 9522268
Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478

[ ]Freescale Internal Use Only [ ]Freescale Confidential Proprietary

From: "Jim Vellenga" <vellenga@cadence.com>
To: <Shalom.Bresticker@freescale.com>
Cc: <ptf-bugs@boyd.com>
Subject: RE: errata/622: Return value for left/right range of unsize parameter
Date: Mon, 20 Sep 2004 08:47:20 -0400

Thank you, Shalom. As you have observed, a parameter that has no range
specification does indeed have implicit left and right range values.
So an alternative would be to have the vpiLeftRange and vpiRightRange
relationships return the implicit values.

The one advantage to having vpiLeftRange and vpiRightRange return NULL
handles is that this allows the user to determine whether or not the
parameter does have a range specification. This could be useful, for
example, in a decompiler application. This is the reason that I
favored having these relations return NULL handles.

For a parameter that has no range specification, the user can still use
the vpiSize property to determine the left and right range values, so
there is no loss of information.

Regards,
James H. Vellenga
Cadence Design Systems, Inc.

---------------------------------------------------------
James H. Vellenga 978-262-6381
Engineering Director (FAX) 978-262-6636
Cadence Design Systems, Inc. vellenga@cadence.com
270 Billerica Rd
Chelmsford, MA 01824-4179
"We all work with partial information."
----------------------------------------------------------

From: Shalom.Bresticker@freescale.com
To: Jim Vellenga <vellenga@cadence.com>
Cc: ptf-bugs@boyd.com
Subject: RE: errata/622: Return value for left/right range of unsize parameter
Date: Mon, 20 Sep 2004 22:38:09 +0300 (IDT)

What is done for integer variables?

They also have an implicit range.

--
Shalom Bresticker Shalom.Bresticker @freescale.com
Design & Verification Methodology Tel: +972 9 9522268
Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478

From: "Jim Vellenga" <vellenga@cadence.com>
To: <Shalom.Bresticker@freescale.com>
Cc: <ptf-bugs@boyd.com>
Subject: RE: errata/622: Return value for left/right range of unsize parameter
Date: Mon, 20 Sep 2004 15:51:28 -0400

The notes in section 26.6.8 say that vpiLeftRange and
vpiRightRange apply to variables when and only when
vpiArray is TRUE (Note 5). Note 3 says that vpiArray
is TRUE if and only if the variable handle references
and array of variables. So a single variable (integer,
time, or real) that is not part of an array does
not have a vpiLeftRange or a vpiRightRange.

But in this case, it is also an error to return a
vpiLeftRange or vpiRightRange. These relations do
not return a NULL handle for a non-array variable.

Regards,
Jim V.

---------------------------------------------------------
James H. Vellenga 978-262-6381
Engineering Director (FAX) 978-262-6636
Cadence Design Systems, Inc. vellenga@cadence.com
270 Billerica Rd
Chelmsford, MA 01824-4179
"We all work with partial information."
----------------------------------------------------------



] -----Original Message-----
] From: shalom@eagle.msil.sps.mot.com
] [mailto:shalom@eagle.msil.sps.mot.com] On Behalf Of
] Shalom.Bresticker@freescale.com
] Sent: Monday, September 20, 2004 3:38 PM
] To: Jim Vellenga
] Cc: ptf-bugs@boyd.com
] Subject: RE: errata/622: Return value for left/right range of
] unsize parameter
]
] What is done for integer variables?
]
] They also have an implicit range.
]
] --
] Shalom Bresticker Shalom.Bresticker
] @freescale.com
] Design & Verification Methodology Tel:
] +972 9 9522268
] Freescale Semiconductor Israel, Ltd. Fax:
] +972 9 9522890
] POB 2208, Herzlia 46120, ISRAEL Cell:
] +972 50 5441478
]
]
]


Fix replaced by chas@cadence.com on Thu Mar 17 10:06:29 2005
This has been resolved via:

http://www.eda.org/svdb/bug_view_page.php?bug_id=0000309

Unformatted



Hosted by Boyd Technology