Line 65... |
Line 65... |
trarg_h=vpi_scan(trarg_itr);
|
trarg_h=vpi_scan(trarg_itr);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
if(trarg_type==vpiConstant)
|
if(trarg_type==vpiConstant)
|
// offset ?
|
// offset ?
|
{
|
{
|
if(vpi_get(vpiConstType,trarg_h)!=vpiBinaryConst)
|
if(vpi_get(vpiConstType,trarg_h)!=vpiDecConst)
|
{
|
{
|
vpi_printf("the offset must be dec constant [%d] \n",vpi_get(vpiConstType,trarg_h));
|
vpi_printf("[%d]the offset must be dec constant [%d] \n",vpi_get(vpiConstType,trarg_h));
|
tf_dofinish();
|
tf_dofinish();
|
return 0;
|
return 0;
|
}
|
}
|
trarg_h=vpi_scan(trarg_itr);
|
trarg_h=vpi_scan(trarg_itr);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
Line 287... |
Line 287... |
|
|
trarg_h=vpi_scan(trarg_itr);
|
trarg_h=vpi_scan(trarg_itr);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
trarg_type=vpi_get(vpiType,trarg_h);
|
}
|
}
|
|
|
if(trarg_type!=vpiConstant&&trarg_type!=vpiReg)
|
if(trarg_type!=vpiConstant&&trarg_type!=vpiReg&&trarg_type!=vpiPartSelect&&trarg_type!=vpiRegBit)
|
{
|
{
|
vpi_printf("error, the last argument is not a constant val [%d]\n",trarg_type);
|
vpi_printf("[%d]error, the last argument is not a constant val [%d]\n",__LINE__,trarg_type);
|
tf_dofinish();
|
tf_dofinish();
|
return 0;
|
return 0;
|
}
|
}
|
if(trarg_type==vpiConstant)
|
if(trarg_type==vpiConstant)
|
{
|
{
|
Line 319... |
Line 319... |
FILE *fp;
|
FILE *fp;
|
|
|
systf_handle = vpi_handle(vpiSysTfCall, NULL);
|
systf_handle = vpi_handle(vpiSysTfCall, NULL);
|
if(systf_handle== NULL)
|
if(systf_handle== NULL)
|
{
|
{
|
vpi_printf("ERROR: $pow failed to obtain systf call handles\n");
|
vpi_printf("ERROR: failed to obtain systf call handles\n");
|
tf_dofinish();
|
tf_dofinish();
|
return(0);
|
return(0);
|
}
|
}
|
arg_itr = vpi_iterate(vpiArgument, systf_handle);
|
arg_itr = vpi_iterate(vpiArgument, systf_handle);
|
if (arg_itr == NULL)
|
if (arg_itr == NULL)
|
{
|
{
|
vpi_printf("ERROR: $pow failed to obtain systf arg handles\n");
|
vpi_printf("ERROR: failed to obtain systf arg handles\n");
|
tf_dofinish();
|
tf_dofinish();
|
return(0);
|
return(0);
|
}
|
}
|
|
|
/* read file name */
|
/* read file name */
|