ISSUE 496

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 496
Notify-List
Category enhancement
Synopsis Want safe VPI methods to call.
State open
Class enhancement-ptf
Arrival-DateOct 28 2003
Originator Adam Krolnik
Release 2001b
Environment
Description
The VPI diagrams show which methods are callable for a given
element. But when coding, use of the methds is conditional based on the specific type of the object. One thus needs
to check the object type (vpiOpType, vpiType, etc.) and hope
that their checking list is complete to call the method.
Simple example:

my $etype = vpi_get($vpiType, $H);

if (! grep $etype == $_, ($vpiNet, $vpiNetBit, $vpiReg,
$vpiRegBit, $vpiPartSelect, $vpiRealVar,
$vpiParameter, $vpiConstant,
$vpiFuncCall, $vpiIntegerVar,
$vpiSysFuncCall, $vpiMemory, $vpiMemoryWord))
// Only look up the operation type if the object
// is not one of the above.
{
$optype = vpi_get($vpiOpType, $H);
...

It would be better to have a method or macro or etc.
that encapsulates this information so that it doesn't have
to be built be each implementer. If a method was
available, one could instead write:

// Is there an OpType attribute to get?
if (vpi_test($vpiOpType, $H))
{
$optype = vpi_get($vpiOpType, $H);

Fix
Unknown
Unformatted

Hosted by Boyd Technology