VPI support for callback to return values.

This commit is contained in:
steve 2001-10-25 04:19:53 +00:00
parent d83fb10774
commit 4e92501864
4 changed files with 32 additions and 5 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: sys_display.c,v 1.29 2001/08/16 03:26:04 steve Exp $"
#ident "$Id: sys_display.c,v 1.30 2001/10/25 04:19:53 steve Exp $"
#endif
# include "config.h"
@ -318,6 +318,7 @@ static int sys_strobe_calltf(char*name)
cb.cb_rtn = strobe_cb;
cb.time = &time;
cb.obj = 0;
cb.value = 0;
cb.user_data = (char*)info;
vpi_register_cb(&cb);
return 0;
@ -358,6 +359,7 @@ static int monitor_cb_1(p_cb_data cause)
cb.cb_rtn = monitor_cb_1;
cb.time = &time;
cb.obj = cause->obj;
cb.value = 0;
cb.user_data = cause->user_data;
*cbh = vpi_register_cb(&cb);
@ -375,6 +377,7 @@ static int monitor_cb_1(p_cb_data cause)
cb.cb_rtn = monitor_cb_2;
cb.time = &time;
cb.obj = 0;
cb.value = 0;
vpi_register_cb(&cb);
return 0;
@ -415,6 +418,7 @@ static int sys_monitor_calltf(char*name)
cb.reason = cbValueChange;
cb.cb_rtn = monitor_cb_1;
cb.time = &time;
cb.value = NULL;
for (idx = 0 ; idx < monitor_info.nitems ; idx += 1) {
switch (vpi_get(vpiType, monitor_info.items[idx])) {
@ -741,6 +745,9 @@ void sys_display_register()
/*
* $Log: sys_display.c,v $
* Revision 1.30 2001/10/25 04:19:53 steve
* VPI support for callback to return values.
*
* Revision 1.29 2001/08/16 03:26:04 steve
* Add some missing print escape sequences.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: sys_vcd.c,v 1.24 2001/10/15 01:50:23 steve Exp $"
#ident "$Id: sys_vcd.c,v 1.25 2001/10/25 04:19:53 steve Exp $"
#endif
# include "config.h"
@ -570,6 +570,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
cb.time = &info->time;
cb.user_data = (char*)info;
cb.value = NULL;
cb.obj = item;
cb.reason = cbValueChange;
cb.cb_rtn = variable_cb;
@ -781,6 +782,9 @@ void sys_vcd_register()
/*
* $Log: sys_vcd.c,v $
* Revision 1.25 2001/10/25 04:19:53 steve
* VPI support for callback to return values.
*
* Revision 1.24 2001/10/15 01:50:23 steve
* Include scope information in VCD output.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: vpi_callback.cc,v 1.7 2001/10/12 03:00:09 steve Exp $"
#ident "$Id: vpi_callback.cc,v 1.8 2001/10/25 04:19:53 steve Exp $"
#endif
/*
@ -243,6 +243,17 @@ void vvp_cb_fobj_s::set(vvp_ipoint_t i, functor_t f, bool push)
while (next) {
struct __vpiCallback * cur = next;
next = cur->next;
if (cur->cb_data.value) {
switch (cur->cb_data.value->format) {
case vpiScalarVal:
cur->cb_data.value->value.scalar = f->ival & 3;
break;
case vpiSuppressVal:
break;
default:
fprintf(stderr, "vpi_callback: value format %d not supported\n", cur->cb_data.value->format);
}
}
cur->cb_data.time->type = vpiSimTime;
cur->cb_data.time->low = schedule_simtime();
cur->cb_data.time->high = 0;
@ -260,6 +271,9 @@ void vpip_trip_monitor_callbacks(void)
/*
* $Log: vpi_callback.cc,v $
* Revision 1.8 2001/10/25 04:19:53 steve
* VPI support for callback to return values.
*
* Revision 1.7 2001/10/12 03:00:09 steve
* M42 implementation of mode 2 (Stephan Boettcher)
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: vthread.cc,v 1.60 2001/10/23 03:49:13 steve Exp $"
#ident "$Id: vthread.cc,v 1.61 2001/10/25 04:19:53 steve Exp $"
#endif
# include "vthread.h"
@ -142,7 +142,6 @@ unsigned vthread_get_bit(struct vthread_s*thr, unsigned addr)
void vthread_put_bit(struct vthread_s*thr, unsigned addr, unsigned bit)
{
thr_check_addr(thr, addr);
thr_put_bit(thr, addr, bit);
}
@ -1673,6 +1672,9 @@ bool of_ZOMBIE(vthread_t thr, vvp_code_t)
/*
* $Log: vthread.cc,v $
* Revision 1.61 2001/10/25 04:19:53 steve
* VPI support for callback to return values.
*
* Revision 1.60 2001/10/23 03:49:13 steve
* Fix carry between works for %add instruction.
*