Add some minor VPI/ACC fixes and updates

These were submitted.
This commit is contained in:
Stephen Williams 2014-04-06 15:54:05 -07:00
parent bb182cf3ce
commit f752007e9c
5 changed files with 21 additions and 1 deletions

View File

@ -69,9 +69,13 @@ int acc_configure(PLI_INT32 config_param, const char*value)
fprintf(pli_trace, "acc_configure(config=%d, %s)\n",
(int)config_param, value);
}
#if 0
vpi_printf("XXXX acc_configure(%d, %s)\n", (int)config_param,
value);
#else
/* Parameter is not necessarily a string. */
vpi_printf("XXXX acc_configure(%d, ...)\n", (int)config_param);
#endif
rc = 0;
break;
}

View File

@ -40,3 +40,11 @@ const char* acc_fetch_type_str(PLI_INT32 type)
vpi_printf("acc_fetch_type_str: type %d is what accType?\n", (int)type);
return "acc_fetch_type_str(unknown)";
}
/*
* FIXME: What does this do? How should it be declared in acc_user.h?
*/
PLI_INT32 acc_fetch_paramtype(PLI_INT32 type)
{
return 0;
}

View File

@ -162,6 +162,7 @@ void acc_vcl_add(handle obj, PLI_INT32(*consumer)(p_vc_record),
switch (vpi_get(vpiType, obj)) {
case vpiNet:
case vpiReg:
cur = malloc(sizeof (struct vcl_record));
cur->obj = obj;
cur->consumer = consumer;

View File

@ -334,6 +334,8 @@ typedef struct t_vpi_delay {
#define vpiTimePrecision 12
#define vpiDefFile 15
#define vpiDefLineNo 16
#define vpiScalar 17
#define vpiVector 18
#define vpiDirection 20 /* direction of port: */
# define vpiInput 1

View File

@ -567,6 +567,11 @@ static int signal_get(int code, vpiHandle ref)
case vpiRightRange:
return rfp->lsb;
case vpiScalar:
return (rfp->msb == 0 && rfp->lsb == 0);
case vpiVector:
return (rfp->msb != rfp->lsb);
case vpiAutomatic:
return (int) vpip_scope(rfp)->is_automatic;