need clarification regarding vpi

Guest
hi fnd's
i wanna read a constant value from .v to pli code
EX: $wire_rhs(2)
here wire_rhs is user defined function...n am
sending value 2 how can i read constant value 2 in pli code.....thx in
advance.....
 
On Apr 1, 3:05 am, sankar....@gmail.com wrote:
hi fnd's
i wanna read a constant value from .v to pli code
EX: $wire_rhs(2)
here wire_rhs is user defined function...n am
sending value 2 how can i read constant value 2 in pli code.....thx in
advance.....
Something like his:

vpiHandle hArgIter, hArg;
s_vpi_value valStr;

hThisTask = vpi_handle(vpiSysTfCall, NULL);

/*
* Parse fields from task call
*/
hArgIter = vpi_iterate(vpiArgument, hThisTask);
hArg = vpi_scan(hArgIter);

/* Get field1 */
valStr.format = vpiIntVal;
vpi_get_value(hArg, &valStr);
field1 = valStr.value.integer;

/* Get field2 */
hArg = vpi_scan(hArgIter);
if (hArg) {
valStr.format = vpiIntVal;
vpi_get_value(hArg, &valStr);
field2 = valStr.value.integer;
}

You should probably refer to your simulator documentation and/or the
IEEE standard...
/Ed
 

Welcome to EDABoard.com

Sponsor

Back
Top