1) setlinebuf() for vpi_trace

2) Addes error checks for trace file opens
 3) removes now extraneous flushes
 4) fixes acc_next() bug
This commit is contained in:
steve 2003-06-17 16:55:07 +00:00
parent b544b319fa
commit bbdf03b457
14 changed files with 164 additions and 73 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_close.c,v 1.3 2003/05/18 00:16:35 steve Exp $"
#ident "$Id: a_close.c,v 1.4 2003/06/17 16:55:07 steve Exp $"
#endif
# include <acc_user.h>
@ -27,12 +27,17 @@ void acc_close(void)
{
if (pli_trace) {
fprintf(pli_trace, "acc_close()\n");
fflush(pli_trace);
}
}
/*
* $Log: a_close.c,v $
* Revision 1.4 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.3 2003/05/18 00:16:35 steve
* Add PLI_TRACE tracing of PLI1 modules.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_configure.c,v 1.2 2003/05/18 00:16:35 steve Exp $"
#ident "$Id: a_configure.c,v 1.3 2003/06/17 16:55:07 steve Exp $"
#endif
#include <acc_user.h>
@ -36,7 +36,6 @@ int acc_configure(PLI_INT32 config_param, const char*value)
fprintf(pli_trace,
"acc_configure(accDevelopmentVersion, %s)\n",
value);
fflush(pli_trace);
}
break;
@ -45,7 +44,6 @@ int acc_configure(PLI_INT32 config_param, const char*value)
if (pli_trace) {
fprintf(pli_trace, "acc_configure(config=%d, %s)\n",
config_param, value);
fflush(pli_trace);
}
vpi_printf("XXXX acc_configure(%d, %s)\n", config_param, value);
@ -58,6 +56,12 @@ int acc_configure(PLI_INT32 config_param, const char*value)
/*
* $Log: a_configure.c,v $
* Revision 1.3 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.2 2003/05/18 00:16:35 steve
* Add PLI_TRACE tracing of PLI1 modules.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_fetch_param.c,v 1.3 2003/05/18 00:16:35 steve Exp $"
#ident "$Id: a_fetch_param.c,v 1.4 2003/06/17 16:55:07 steve Exp $"
#endif
#include <assert.h>
@ -38,7 +38,6 @@ double acc_fetch_paramval(handle object)
if (pli_trace) {
fprintf(pli_trace, "acc_fetch_paramval(%s) --> \"%s\"\n",
vpi_get_str(vpiName, object), val.value.str);
fflush(pli_trace);
}
return (double) (long)val.value.str;
@ -52,6 +51,12 @@ double acc_fetch_paramval(handle object)
/*
* $Log: a_fetch_param.c,v $
* Revision 1.4 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.3 2003/05/18 00:16:35 steve
* Add PLI_TRACE tracing of PLI1 modules.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_fetch_value.c,v 1.4 2003/05/18 00:16:35 steve Exp $"
#ident "$Id: a_fetch_value.c,v 1.5 2003/06/17 16:55:07 steve Exp $"
#endif
# include <acc_user.h>
@ -57,7 +57,6 @@ static char* fetch_struct_value(handle obj, s_acc_value*value)
"accScalarVal) --> %d\n",
vpi_get_str(vpiFullName,obj),
value->value.scalar);
fflush(pli_trace);
}
break;
@ -71,7 +70,6 @@ static char* fetch_struct_value(handle obj, s_acc_value*value)
"accIntVal) --> %d\n",
vpi_get_str(vpiFullName,obj),
value->value.integer);
fflush(pli_trace);
}
break;
@ -85,7 +83,6 @@ static char* fetch_struct_value(handle obj, s_acc_value*value)
"accRealVal) --> %g\n",
vpi_get_str(vpiFullName,obj),
value->value.real);
fflush(pli_trace);
}
break;
@ -112,7 +109,6 @@ static char* fetch_strength_value(handle obj)
if (pli_trace) {
fprintf(pli_trace, "acc_fetch_value(<%s>, \"%%v\") --> %s\n",
vpi_get_str(vpiFullName,obj), str);
fflush(pli_trace);
}
return __acc_newstring(str);
@ -133,6 +129,12 @@ char* acc_fetch_value(handle obj, const char*fmt, s_acc_value*value)
/*
* $Log: a_fetch_value.c,v $
* Revision 1.5 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.4 2003/05/18 00:16:35 steve
* Add PLI_TRACE tracing of PLI1 modules.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_handle_by_name.c,v 1.1 2003/05/24 03:02:04 steve Exp $"
#ident "$Id: a_handle_by_name.c,v 1.2 2003/06/17 16:55:07 steve Exp $"
#endif
# include <acc_user.h>
@ -46,7 +46,6 @@ handle acc_handle_by_name(const char*obj_name, handle scope)
fprintf(pli_trace, "acc_handle_by_name(\"%s\", scope=%s) "
" --> %p\n", obj_name,
vpi_get_str(vpiFullName, scope), res);
fflush(pli_trace);
}
return res;
@ -54,6 +53,12 @@ handle acc_handle_by_name(const char*obj_name, handle scope)
/*
* $Log: a_handle_by_name.c,v $
* Revision 1.2 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.1 2003/05/24 03:02:04 steve
* Add implementation of acc_handle_by_name.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_next.c,v 1.2 2003/06/04 01:56:20 steve Exp $"
#ident "$Id: a_next.c,v 1.3 2003/06/17 16:55:07 steve Exp $"
#endif
#include <stdio.h>
@ -63,7 +63,7 @@ handle acc_next(PLI_INT32 *type, handle scope, handle prev)
}
/* scan for next */
if (hand) {
if (!prev || hand) {
while ((hand = vpi_scan(iter))) {
if (acc_object_in_typelist(hand, type))
break;
@ -94,6 +94,12 @@ handle acc_next_scope(handle scope, handle prev)
/*
* $Log: a_next.c,v $
* Revision 1.3 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.2 2003/06/04 01:56:20 steve
* 1) Adds configure logic to clean up compiler warnings
* 2) adds acc_compare_handle, acc_fetch_range, acc_next_scope and

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: a_vcl.c,v 1.5 2003/05/18 00:16:35 steve Exp $"
#ident "$Id: a_vcl.c,v 1.6 2003/06/17 16:55:07 steve Exp $"
#endif
#include <vpi_user.h>
@ -144,7 +144,6 @@ static PLI_INT32 vcl_value_callback(struct t_cb_data*cb)
vcr.out_value.strengths_s.logic_value,
vcr.out_value.strengths_s.strength1,
vcr.out_value.strengths_s.strength2);
fflush(pli_trace);
}
break;
@ -187,7 +186,6 @@ void acc_vcl_add(handle obj, PLI_INT32(*consumer)(p_vc_record),
if (pli_trace) {
fprintf(pli_trace, "acc_vcl_add(<%s>, ..., %p, %d)\n",
vpi_get_str(vpiFullName, obj), data, vcl_flag);
fflush(pli_trace);
}
break;
@ -208,6 +206,12 @@ void acc_vcl_delete(handle obj, PLI_INT32(*consumer)(p_vc_record),
/*
* $Log: a_vcl.c,v $
* Revision 1.6 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.5 2003/05/18 00:16:35 steve
* Add PLI_TRACE tracing of PLI1 modules.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: delay.c,v 1.2 2003/05/28 02:42:43 steve Exp $"
#ident "$Id: delay.c,v 1.3 2003/06/17 16:55:07 steve Exp $"
#endif
#include <veriuser.h>
@ -44,7 +44,6 @@ int tf_isetdelay(PLI_INT32 delay, void*ss)
fprintf(pli_trace, "%s: tf_isetdelay(%d, ...)"
" <unit=%d, prec=%d>;\n",
vpi_get_str(vpiName, sys), delay, unit, prec);
fflush(pli_trace);
}
@ -82,6 +81,12 @@ int tf_setdelay(PLI_INT32 delay)
/*
* $Log: delay.c,v $
* Revision 1.3 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.2 2003/05/28 02:42:43 steve
* compiler warnings.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: getp.c,v 1.5 2003/05/30 04:22:13 steve Exp $"
#ident "$Id: getp.c,v 1.6 2003/06/17 16:55:07 steve Exp $"
#endif
# include <assert.h>
@ -66,7 +66,6 @@ out:
if (pli_trace) {
fprintf(pli_trace, "tf_igetp(n=%d, obj=%p) --> %d\n",
n, obj, rtn);
fflush(pli_trace);
}
return rtn;
@ -114,7 +113,6 @@ out:
if (pli_trace) {
fprintf(pli_trace, "tf_igetrealp(n=%d, obj=%p) --> %f\n",
n, obj, rtn);
fflush(pli_trace);
}
return rtn;
@ -172,7 +170,6 @@ out:
if (pli_trace) {
fprintf(pli_trace, "tf_istrgetp(n=%d, fmt=%c, obj=%p) --> \"%s\"\n",
n, fmt, obj, rtn);
fflush(pli_trace);
}
return rtn;
@ -187,6 +184,12 @@ char *tf_strgetp(PLI_INT32 n, PLI_INT32 fmt)
/*
* $Log: getp.c,v $
* Revision 1.6 2003/06/17 16:55:07 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.5 2003/05/30 04:22:13 steve
* Add tf_strgetp functions.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: putp.c,v 1.4 2003/05/29 03:46:21 steve Exp $"
#ident "$Id: putp.c,v 1.5 2003/06/17 16:55:08 steve Exp $"
#endif
# include <assert.h>
@ -64,7 +64,6 @@ out:
if (pli_trace) {
fprintf(pli_trace, "tf_iputp(n=%d, value=%d, obj=%p) --> %d\n",
n, value, obj, rtn);
fflush(pli_trace);
}
return rtn;
@ -114,7 +113,6 @@ out:
if (pli_trace) {
fprintf(pli_trace, "tf_iputrealp(n=%d, value=%f, obj=%p) --> %d\n",
n, value, obj, rtn);
fflush(pli_trace);
}
return rtn;
@ -128,6 +126,12 @@ PLI_INT32 tf_putrealp(PLI_INT32 n, double value)
}
/*
* $Log: putp.c,v $
* Revision 1.5 2003/06/17 16:55:08 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.4 2003/05/29 03:46:21 steve
* Add tf_getp/putp support for integers
* and real valued arguments.

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: spname.c,v 1.3 2003/05/29 03:46:21 steve Exp $"
#ident "$Id: spname.c,v 1.4 2003/06/17 16:55:08 steve Exp $"
#endif
#include <assert.h>
@ -37,7 +37,6 @@ char* tf_spname(void)
if (pli_trace) {
fprintf(pli_trace, "%s: tf_spname() --> %s\n",
vpi_get_str(vpiName,sys), rtn);
fflush(pli_trace);
}
return rtn;
@ -55,6 +54,12 @@ char *tf_mipname(void)
/*
* $Log: spname.c,v $
* Revision 1.4 2003/06/17 16:55:08 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.3 2003/05/29 03:46:21 steve
* Add tf_getp/putp support for integers
* and real valued arguments.

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: veriusertfs.c,v 1.11 2003/06/04 01:56:20 steve Exp $"
#ident "$Id: veriusertfs.c,v 1.12 2003/06/17 16:55:08 steve Exp $"
#endif
/*
@ -59,11 +59,15 @@ void veriusertfs_register_table(p_tfcell vtable)
s_vpi_systf_data tf_data;
p_pli_data data;
if ((pli_trace == 0) && (path = getenv("PLI_TRACE"))) {
if (!pli_trace && (path = getenv("PLI_TRACE"))) {
if (strcmp(path,"-") == 0)
pli_trace = stdout;
else {
pli_trace = fopen(path, "w");
if (!pli_trace) {
perror(path);
exit(1);
}
setlinebuf(pli_trace);
}
}
@ -375,6 +379,12 @@ PLI_INT32 tf_setrealdelay(double dly)
}
/*
* $Log: veriusertfs.c,v $
* Revision 1.12 2003/06/17 16:55:08 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.11 2003/06/04 01:56:20 steve
* 1) Adds configure logic to clean up compiler warnings
* 2) adds acc_compare_handle, acc_fetch_range, acc_next_scope and

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: sys_display.c,v 1.61 2003/05/23 04:04:02 steve Exp $"
#ident "$Id: sys_display.c,v 1.62 2003/06/17 16:55:08 steve Exp $"
#endif
# include "config.h"
@ -383,8 +383,6 @@ static int format_str_char(vpiHandle scope, unsigned int mcd,
use_count = 0;
break;
case 'e':
case 'g':
// new Verilog 2001 format specifiers...
case 'l':
case 'L':
@ -533,6 +531,26 @@ static int format_str_char(vpiHandle scope, unsigned int mcd,
use_count = 1;
break;
case 'e':
case 'E':
if (idx >= argc) {
format_error_msg("Missing Argument", leading_zero,
fsize, ffsize, fmt);
return 0;
}
value.format = vpiRealVal;
vpi_get_value(argv[idx], &value);
if (value.format == vpiSuppressVal){
format_error_msg("Incompatible value", leading_zero,
fsize, ffsize, fmt);
return 1;
}
my_mcd_printf(mcd, "%*.*g", fsize, ffsize, value.value.real);
use_count = 1;
break;
case 'f':
case 'F':
@ -552,6 +570,27 @@ static int format_str_char(vpiHandle scope, unsigned int mcd,
my_mcd_printf(mcd, "%*.*f", fsize, ffsize, value.value.real);
use_count = 1;
break;
case 'g':
case 'G':
if (idx >= argc) {
format_error_msg("Missing Argument", leading_zero,
fsize, ffsize, fmt);
return 0;
}
value.format = vpiRealVal;
vpi_get_value(argv[idx], &value);
if (value.format == vpiSuppressVal){
format_error_msg("Incompatible value", leading_zero,
fsize, ffsize, fmt);
return 1;
}
my_mcd_printf(mcd, "%*.*g", fsize, ffsize, value.value.real);
use_count = 1;
break;
@ -1702,6 +1741,12 @@ void sys_display_register()
/*
* $Log: sys_display.c,v $
* Revision 1.62 2003/06/17 16:55:08 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.61 2003/05/23 04:04:02 steve
* Add vpi_fopen and vpi_get_file.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: vpi_priv.cc,v 1.40 2003/05/30 04:08:28 steve Exp $"
#ident "$Id: vpi_priv.cc,v 1.41 2003/06/17 16:55:08 steve Exp $"
#endif
# include "vpi_priv.h"
@ -206,7 +206,6 @@ int vpi_get(int property, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get(vpiType, %p) --> %s\n",
ref, vpi_type_values(ref->vpi_type->type_code));
fflush(vpi_trace);
}
struct __vpiSignal*rfp = (struct __vpiSignal*)ref;
@ -220,7 +219,6 @@ int vpi_get(int property, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get(%s, %p) --X\n",
vpi_property_str(property), ref);
fflush(vpi_trace);
}
return vpiUndefined;
@ -231,7 +229,6 @@ int vpi_get(int property, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get(%s, %p) --> %d\n",
vpi_property_str(property), ref, res);
fflush(vpi_trace);
}
return res;
@ -250,7 +247,6 @@ char* vpi_get_str(int property, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get_str(%s, %p) --X\n",
vpi_property_str(property), ref);
fflush(vpi_trace);
}
return 0;
}
@ -260,7 +256,6 @@ char* vpi_get_str(int property, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get_str(%s, %p) --> %s\n",
vpi_property_str(property), ref, res);
fflush(vpi_trace);
}
return res;
@ -343,10 +338,16 @@ void vpi_set_vlog_info(int argc, char** argv)
vpi_vlog_info.argv = argv;
if (const char*path = getenv("VPI_TRACE")) {
if (strcmp(path,"-") == 0)
if (!strcmp(path,"-"))
vpi_trace = stdout;
else
else {
vpi_trace = fopen(path, "w");
if (!vpi_trace) {
perror(path);
exit(1);
}
setlinebuf(vpi_trace);
}
}
}
@ -359,27 +360,23 @@ void vpi_get_value(vpiHandle expr, s_vpi_value*vp)
if (vpi_trace) switch (vp->format) {
case vpiStringVal:
fprintf(vpi_trace, "vpi_get_value(%p=<%d>) -> string=\"%s\"\n",
fprintf(vpi_trace,"vpi_get_value(%p=<%d>) -> string=\"%s\"\n",
expr, expr->vpi_type->type_code, vp->value.str);
fflush(vpi_trace);
break;
case vpiBinStrVal:
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> binstr=%s\n",
expr->vpi_type->type_code, vp->value.str);
fflush(vpi_trace);
break;
case vpiIntVal:
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> int=%d\n",
expr->vpi_type->type_code, vp->value.integer);
fflush(vpi_trace);
break;
default:
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> <%d>=?\n",
expr->vpi_type->type_code, vp->format);
fflush(vpi_trace);
}
return;
}
@ -387,7 +384,6 @@ void vpi_get_value(vpiHandle expr, s_vpi_value*vp)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> <suppress>\n",
expr->vpi_type->type_code);
fflush(vpi_trace);
}
vp->format = vpiSuppressVal;
@ -412,7 +408,6 @@ vpiHandle vpi_handle(int type, vpiHandle ref)
fprintf(vpi_trace, "vpi_handle(vpiSysTfCall, 0) "
"-> %p (%s)\n", &vpip_cur_task->base,
vpip_cur_task->defn->info.tfname);
fflush(vpi_trace);
}
return &vpip_cur_task->base;
@ -425,7 +420,6 @@ vpiHandle vpi_handle(int type, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_handle(%d, %p) -X\n",
type, ref);
fflush(vpi_trace);
}
return 0;
@ -437,7 +431,6 @@ vpiHandle vpi_handle(int type, vpiHandle ref)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_handle(%d, %p) -> %p\n",
type, ref, res);
fflush(vpi_trace);
}
return res;
@ -461,6 +454,8 @@ static vpiHandle vpi_iterate_global(int type)
vpiHandle vpi_iterate(int type, vpiHandle ref)
{
vpiHandle rtn = 0;
assert(vpi_mode_flag != VPI_MODE_NONE);
if (vpi_mode_flag == VPI_MODE_REGISTER) {
fprintf(stderr, "vpi error: vpi_iterate called during "
@ -469,28 +464,16 @@ vpiHandle vpi_iterate(int type, vpiHandle ref)
}
if (ref == 0)
return vpi_iterate_global(type);
rtn = vpi_iterate_global(type);
else if (ref->vpi_type->iterate_)
rtn = (ref->vpi_type->iterate_)(type, ref);
if (ref->vpi_type->iterate_) {
if (vpi_trace) {
fprintf(vpi_trace, "vpi_iterate(%d, %p) ->\n",
type, ref);
fflush(vpi_trace);
}
return (ref->vpi_type->iterate_)(type, ref);
} else {
if (vpi_trace) {
fprintf(vpi_trace, "vpi_iterate(%d, %p) -X\n",
type, ref);
fflush(vpi_trace);
}
return 0;
if (vpi_trace) {
fprintf(vpi_trace, "vpi_iterate(%d, %p) ->%s\n",
type, ref, rtn ? "" : " (null)");
}
return rtn;
}
vpiHandle vpi_handle_by_index(vpiHandle ref, int idx)
@ -577,7 +560,6 @@ vpiHandle vpi_handle_by_name(const char *name, vpiHandle scope)
if (vpi_trace) {
fprintf(vpi_trace, "vpi_handle_by_name(%s, %p) -->\n",
name, scope);
fflush(vpi_trace);
}
/* If scope provided, look in corresponding module; otherwise
@ -658,6 +640,12 @@ extern "C" void vpi_control(int operation, ...)
/*
* $Log: vpi_priv.cc,v $
* Revision 1.41 2003/06/17 16:55:08 steve
* 1) setlinebuf() for vpi_trace
* 2) Addes error checks for trace file opens
* 3) removes now extraneous flushes
* 4) fixes acc_next() bug
*
* Revision 1.40 2003/05/30 04:08:28 steve
* vpi_trace of vpi_free_object.
*