Fix real function PLI 1 code.
The code to handle real functions using the PLI 1 interface was missing some functionality. This patch fixes that and fixes a bug in the veriuser.h include file.
This commit is contained in:
parent
77f8d3225c
commit
1e2d8bc55a
|
|
@ -49,6 +49,9 @@ PLI_INT32 tf_typep(PLI_INT32 narg)
|
|||
case vpiStringConst:
|
||||
rtn = TF_STRING;
|
||||
break;
|
||||
case vpiRealConst:
|
||||
rtn = TF_READONLYREAL;
|
||||
break;
|
||||
default:
|
||||
rtn = TF_READONLY;
|
||||
break;
|
||||
|
|
@ -61,6 +64,10 @@ PLI_INT32 tf_typep(PLI_INT32 narg)
|
|||
rtn = TF_READWRITE;
|
||||
break;
|
||||
|
||||
case vpiRealVar:
|
||||
rtn = TF_READWRITEREAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
rtn = TF_READONLY;
|
||||
break;
|
||||
|
|
@ -69,16 +76,3 @@ PLI_INT32 tf_typep(PLI_INT32 narg)
|
|||
vpi_free_object(argv);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
/*
|
||||
* $Log: typep.c,v $
|
||||
* Revision 1.2 2003/03/13 05:07:46 steve
|
||||
* Declaration warnings.
|
||||
*
|
||||
* Revision 1.1 2002/12/19 21:37:04 steve
|
||||
* Add tf_message, tf_get/setworkarea, and
|
||||
* ty_typep functions, along with defines
|
||||
* related to these functions.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@ void veriusertfs_register_table(p_tfcell vtable)
|
|||
tf_data.type = vpiSysTask;
|
||||
break;
|
||||
case userfunction:
|
||||
tf_data.sysfunctype = vpiIntFunc;
|
||||
tf_data.type = vpiSysFunc;
|
||||
break;
|
||||
case userrealfunction:
|
||||
tf_data.sysfunctype = vpiRealFunc;
|
||||
tf_data.type = vpiSysFunc;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -387,71 +392,4 @@ PLI_INT32 tf_setrealdelay(double dly)
|
|||
{
|
||||
return tf_isetrealdelay(dly, tf_getinstance());
|
||||
}
|
||||
/*
|
||||
* $Log: veriusertfs.c,v $
|
||||
* Revision 1.17 2007/05/08 22:01:26 steve
|
||||
* Trace file line buffer must be static.
|
||||
*
|
||||
* Revision 1.16 2006/10/30 22:45:37 steve
|
||||
* Updates for Cygwin portability (pr1585922)
|
||||
*
|
||||
* Revision 1.15 2004/09/10 23:13:05 steve
|
||||
* Compile cleanup of C code.
|
||||
*
|
||||
* Revision 1.14 2003/06/25 04:04:19 steve
|
||||
* Fix mingw portability problems.
|
||||
*
|
||||
* Revision 1.13 2003/06/17 22:09:45 steve
|
||||
* Better trace of PLI1 registration.
|
||||
*
|
||||
* 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
|
||||
* tf_isetrealdelay, acc_handle_scope
|
||||
* 3) makes acc_next reentrant
|
||||
* 4) adds basic vpiWire type support
|
||||
* 5) fills in some acc_object_of_type() and acc_fetch_{full}type()
|
||||
* 6) add vpiLeftRange/RigthRange to signals
|
||||
*
|
||||
* Revision 1.10 2003/05/30 04:05:32 steve
|
||||
* Add tf_rosynchronize and friends.
|
||||
*
|
||||
* Revision 1.9 2003/05/28 02:42:43 steve
|
||||
* compiler warnings.
|
||||
*
|
||||
* Revision 1.8 2003/05/18 00:16:35 steve
|
||||
* Add PLI_TRACE tracing of PLI1 modules.
|
||||
*
|
||||
* Add tf_isetdelay and friends, and add
|
||||
* callback return values for acc_vcl support.
|
||||
*
|
||||
* Revision 1.7 2003/04/23 15:01:29 steve
|
||||
* Add tf_synchronize and tf_multiply_long.
|
||||
*
|
||||
* Revision 1.6 2003/02/16 02:23:14 steve
|
||||
* Change the IV veriusertfs_register to accept table pointers.
|
||||
*
|
||||
* Revision 1.5 2002/08/12 01:35:02 steve
|
||||
* conditional ident string using autoconfig.
|
||||
*
|
||||
* Revision 1.4 2002/06/04 01:42:58 steve
|
||||
* Add misctf support to libveriuser
|
||||
*
|
||||
* Revision 1.3 2002/06/03 00:08:42 steve
|
||||
* Better typing for veriusertfs table.
|
||||
*
|
||||
* Revision 1.2 2002/05/31 18:21:39 steve
|
||||
* Check for and don't dereference null pointers,
|
||||
* Avoid copy of static objects.
|
||||
* (mruff)
|
||||
*
|
||||
* Revision 1.1 2002/05/30 02:37:26 steve
|
||||
* Add the veriusertf_register funciton.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
83
veriuser.h
83
veriuser.h
|
|
@ -191,7 +191,7 @@ extern void veriusertfs_register_table(p_tfcell vtable);
|
|||
#define tf_readonlyreal 15
|
||||
#define TF_READONLYREAL tf_readonlyreal
|
||||
#define tf_readwritereal 16
|
||||
#define TF_READWRITEREAD tf_readwritereal
|
||||
#define TF_READWRITEREAL tf_readwritereal
|
||||
|
||||
typedef struct t_tfnodeinfo {
|
||||
PLI_INT16 node_type;
|
||||
|
|
@ -357,85 +357,4 @@ extern void tf_warning(const char*, ...)
|
|||
|
||||
EXTERN_C_END
|
||||
|
||||
/*
|
||||
* $Log: veriuser.h,v $
|
||||
* Revision 1.34 2003/10/10 02:57:45 steve
|
||||
* Some PLI1 stubs.
|
||||
*
|
||||
* Revision 1.33 2003/06/13 19:23:41 steve
|
||||
* Add a bunch more PLI1 routines.
|
||||
*
|
||||
* Revision 1.32 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
|
||||
* tf_isetrealdelay, acc_handle_scope
|
||||
* 3) makes acc_next reentrant
|
||||
* 4) adds basic vpiWire type support
|
||||
* 5) fills in some acc_object_of_type() and acc_fetch_{full}type()
|
||||
* 6) add vpiLeftRange/RigthRange to signals
|
||||
*
|
||||
* Revision 1.31 2003/05/30 04:22:13 steve
|
||||
* Add tf_strgetp functions.
|
||||
*
|
||||
* Revision 1.30 2003/05/30 04:18:31 steve
|
||||
* Add acc_next function.
|
||||
*
|
||||
* Revision 1.29 2003/05/30 04:01:55 steve
|
||||
* Add tf_scale_longdelay.
|
||||
*
|
||||
* Revision 1.28 2003/05/29 03:46:21 steve
|
||||
* Add tf_getp/putp support for integers
|
||||
* and real valued arguments.
|
||||
*
|
||||
* Add tf_mipname function.
|
||||
*
|
||||
* Revision 1.27 2003/05/28 03:38:05 steve
|
||||
* Implement tf_inump
|
||||
*
|
||||
* Revision 1.26 2003/05/28 03:14:20 steve
|
||||
* Missing time related declarations.
|
||||
*
|
||||
* Revision 1.25 2003/05/18 00:16:35 steve
|
||||
* Add PLI_TRACE tracing of PLI1 modules.
|
||||
*
|
||||
* Add tf_isetdelay and friends, and add
|
||||
* callback return values for acc_vcl support.
|
||||
*
|
||||
* Revision 1.24 2003/04/23 15:01:29 steve
|
||||
* Add tf_synchronize and tf_multiply_long.
|
||||
*
|
||||
* Revision 1.23 2003/04/12 18:57:13 steve
|
||||
* More acc_ function stubs.
|
||||
*
|
||||
* Revision 1.22 2003/03/13 04:35:09 steve
|
||||
* Add a bunch of new acc_ and tf_ functions.
|
||||
*
|
||||
* Revision 1.21 2003/02/26 01:25:51 steve
|
||||
* Document new PLI1 bootstrap interface.
|
||||
*
|
||||
* Revision 1.20 2003/02/17 06:39:47 steve
|
||||
* Add at least minimal implementations for several
|
||||
* acc_ functions. Add support for standard ACC
|
||||
* string handling.
|
||||
*
|
||||
* Add the _pli_types.h header file to carry the
|
||||
* IEEE1364-2001 standard PLI type declarations.
|
||||
*
|
||||
* Revision 1.19 2003/02/16 02:23:22 steve
|
||||
* Change the IV veriusertfs_register to accept table pointers.
|
||||
*
|
||||
* Revision 1.18 2002/12/19 21:37:04 steve
|
||||
* Add tf_message, tf_get/setworkarea, and
|
||||
* ty_typep functions, along with defines
|
||||
* related to these functions.
|
||||
*
|
||||
* Revision 1.17 2002/08/12 01:35:01 steve
|
||||
* conditional ident string using autoconfig.
|
||||
*
|
||||
* Revision 1.16 2002/06/11 03:29:14 steve
|
||||
* Get tf_asynchon/off name right.
|
||||
*
|
||||
* Revision 1.15 2002/06/07 16:21:12 steve
|
||||
* Add tf_putlongp and tf_putp.
|
||||
*/
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue