The _vpiNexusId property must return zero when undefined

This was created by a user contributed patch. It resulted in all objects
that cannot have aliases being aliased.
This commit is contained in:
Cary R 2011-12-14 18:34:11 -08:00
parent 831b6d3ad6
commit d198a57d99
1 changed files with 3 additions and 2 deletions

View File

@ -573,14 +573,15 @@ static int signal_get(int code, vpiHandle ref)
case vpiAutomatic:
return (int) vpip_scope(rfp)->is_automatic;
// This private property must return zero when undefined.
case _vpiNexusId:
if (rfp->msb == rfp->lsb)
return (int) (unsigned long) rfp->node;
else
return vpiUndefined;
return 0;
default:
fprintf(stderr, "VPI error: unknow signal_get property %d.\n",
fprintf(stderr, "VPI error: unknown signal_get property %d.\n",
code);
return vpiUndefined;
}