Support the $write system task, and have the
vpi_scan function free iterators as needed.
This commit is contained in:
parent
0fb4ba7907
commit
86a283b9bc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: sys_display.c,v 1.1 1999/08/15 01:23:56 steve Exp $"
|
||||
#ident "$Id: sys_display.c,v 1.2 1999/09/29 01:41:18 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_user.h"
|
||||
|
|
@ -148,7 +148,7 @@ static void format(s_vpi_value*fmt, vpiHandle argv)
|
|||
}
|
||||
}
|
||||
|
||||
static int sys_display_calltf(char *xx)
|
||||
static int sys_display_calltf(char *name)
|
||||
{
|
||||
s_vpi_value value;
|
||||
vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
|
||||
|
|
@ -198,9 +198,9 @@ static int sys_display_calltf(char *xx)
|
|||
}
|
||||
}
|
||||
|
||||
vpi_printf("\n");
|
||||
if (strcmp(name,"$display") == 0)
|
||||
vpi_printf("\n");
|
||||
|
||||
vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -213,12 +213,25 @@ void sys_display_register()
|
|||
tf_data.calltf = sys_display_calltf;
|
||||
tf_data.compiletf = 0;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.user_data = "$display";
|
||||
vpi_register_systf(&tf_data);
|
||||
|
||||
tf_data.type = vpiSysTask;
|
||||
tf_data.tfname = "$write";
|
||||
tf_data.calltf = sys_display_calltf;
|
||||
tf_data.compiletf = 0;
|
||||
tf_data.sizetf = 0;
|
||||
tf_data.user_data = "$write";
|
||||
vpi_register_systf(&tf_data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* $Log: sys_display.c,v $
|
||||
* Revision 1.2 1999/09/29 01:41:18 steve
|
||||
* Support the $write system task, and have the
|
||||
* vpi_scan function free iterators as needed.
|
||||
*
|
||||
* Revision 1.1 1999/08/15 01:23:56 steve
|
||||
* Convert vvm to implement system tasks with vpi.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: vvm_calltf.cc,v 1.5 1999/09/13 03:08:10 steve Exp $"
|
||||
#ident "$Id: vvm_calltf.cc,v 1.6 1999/09/29 01:41:18 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvm_calltf.h"
|
||||
|
|
@ -103,8 +103,10 @@ extern "C" vpiHandle vpi_iterate(int type, vpiHandle ref)
|
|||
extern "C" vpiHandle vpi_scan(vpiHandle ref)
|
||||
{
|
||||
assert(ref->type == vpiArgument);
|
||||
if (ref->val.unum >= ref->referent->narguments)
|
||||
if (ref->val.unum >= ref->referent->narguments) {
|
||||
vpi_free_object(ref);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ref->referent->arguments[ref->val.unum++];
|
||||
}
|
||||
|
|
@ -501,6 +503,10 @@ void vvm_calltask(vvm_simulation*sim, const string&fname,
|
|||
|
||||
/*
|
||||
* $Log: vvm_calltf.cc,v $
|
||||
* Revision 1.6 1999/09/29 01:41:18 steve
|
||||
* Support the $write system task, and have the
|
||||
* vpi_scan function free iterators as needed.
|
||||
*
|
||||
* Revision 1.5 1999/09/13 03:08:10 steve
|
||||
* fix vpiHexStrVal dumping of digits to strings.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue