Replace data references with function calls. (Venkat)
This commit is contained in:
parent
20d07a7366
commit
8ba1facb66
7
t-vvm.cc
7
t-vvm.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: t-vvm.cc,v 1.178 2000/10/06 02:21:35 steve Exp $"
|
#ident "$Id: t-vvm.cc,v 1.179 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
|
|
@ -3170,7 +3170,7 @@ void target_vvm::proc_stask(const NetSTask*net)
|
||||||
val = emit_parm_rval(this, net->parm(idx));
|
val = emit_parm_rval(this, net->parm(idx));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
val = string("&vpip_null.base");
|
val = string("&(vpip_get_null()->base)");
|
||||||
}
|
}
|
||||||
|
|
||||||
defn << " " << ptmp << "[" << idx << "] = " << val << ";"
|
defn << " " << ptmp << "[" << idx << "] = " << val << ";"
|
||||||
|
|
@ -3385,6 +3385,9 @@ extern const struct target tgt_vvm = {
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* $Log: t-vvm.cc,v $
|
* $Log: t-vvm.cc,v $
|
||||||
|
* Revision 1.179 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.178 2000/10/06 02:21:35 steve
|
* Revision 1.178 2000/10/06 02:21:35 steve
|
||||||
* sfuncs are char* and are compared with strcmp
|
* sfuncs are char* and are compared with strcmp
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# 59 Temple Place - Suite 330
|
# 59 Temple Place - Suite 330
|
||||||
# Boston, MA 02111-1307, USA
|
# Boston, MA 02111-1307, USA
|
||||||
#
|
#
|
||||||
#ident "$Id: Makefile.in,v 1.16 2000/10/04 17:08:31 steve Exp $"
|
#ident "$Id: Makefile.in,v 1.17 2000/10/06 23:11:39 steve Exp $"
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
@ -58,11 +58,13 @@ sys_readmem.o sys_readmem_lex.o sys_vcd.o
|
||||||
|
|
||||||
ifeq (@CYGWIN@,yes)
|
ifeq (@CYGWIN@,yes)
|
||||||
SYSTEM_VPI_LDFLAGS=-Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip
|
SYSTEM_VPI_LDFLAGS=-Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip
|
||||||
|
VPI_DEPLIBS=../vvm/libvpip.a
|
||||||
else
|
else
|
||||||
SYSTEM_VPI_LDFLAGS=
|
SYSTEM_VPI_LDFLAGS=
|
||||||
|
VPI_DEPLIBS=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
system.vpi: $O
|
system.vpi: $O $(VPI_DEPLIBS)
|
||||||
$(CC) -shared -o $@ $O $(SYSTEM_VPI_LDFLAGS)
|
$(CC) -shared -o $@ $O $(SYSTEM_VPI_LDFLAGS)
|
||||||
|
|
||||||
sys_readmem_lex.c: sys_readmem_lex.lex
|
sys_readmem_lex.c: sys_readmem_lex.lex
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# 59 Temple Place - Suite 330
|
# 59 Temple Place - Suite 330
|
||||||
# Boston, MA 02111-1307, USA
|
# Boston, MA 02111-1307, USA
|
||||||
#
|
#
|
||||||
#ident "$Id: Makefile.in,v 1.36 2000/10/04 17:08:31 steve Exp $"
|
#ident "$Id: Makefile.in,v 1.37 2000/10/06 23:11:39 steve Exp $"
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
@ -67,7 +67,7 @@ libvvm.a: $O
|
||||||
rm -f $@
|
rm -f $@
|
||||||
ar cvq $@ $O
|
ar cvq $@ $O
|
||||||
|
|
||||||
libvpip.a vpip.dll: $P
|
libvpip.a vpip.dll: $P vpip.def
|
||||||
$(CC) -shared -Wl,--enable-auto-image-base,--out-implib,libvpip.a -o vpip.dll vpip.def $P
|
$(CC) -shared -Wl,--enable-auto-image-base,--out-implib,libvpip.a -o vpip.dll vpip.def $P
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: vpi_null.c,v 1.3 2000/02/23 02:56:56 steve Exp $"
|
#ident "$Id: vpi_null.c,v 1.4 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
|
|
@ -32,12 +32,20 @@ static const struct __vpirt vpip_null_rt = {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
struct __vpiNull vpip_null = {
|
static struct __vpiNull vpip_null = {
|
||||||
{ &vpip_null_rt }
|
{ &vpip_null_rt }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct __vpiNull *vpip_get_null(void)
|
||||||
|
{
|
||||||
|
return &vpip_null;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vpi_null.c,v $
|
* $Log: vpi_null.c,v $
|
||||||
|
* Revision 1.4 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.3 2000/02/23 02:56:56 steve
|
* Revision 1.3 2000/02/23 02:56:56 steve
|
||||||
* Macintosh compilers do not support ident.
|
* Macintosh compilers do not support ident.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: vpi_priv.c,v 1.9 2000/08/20 17:49:05 steve Exp $"
|
#ident "$Id: vpi_priv.c,v 1.10 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
|
|
@ -48,7 +48,7 @@ void vpip_calltask(const char*fname, unsigned nparms, vpiHandle*parms)
|
||||||
{
|
{
|
||||||
struct systf_entry*idx;
|
struct systf_entry*idx;
|
||||||
struct __vpiSysTaskCall cur_task;
|
struct __vpiSysTaskCall cur_task;
|
||||||
cur_task.base.vpi_type = &vpip_systask_rt;
|
cur_task.base.vpi_type = vpip_get_systask_rt();
|
||||||
cur_task.args = parms;
|
cur_task.args = parms;
|
||||||
cur_task.nargs = nparms;
|
cur_task.nargs = nparms;
|
||||||
cur_task.res = 0;
|
cur_task.res = 0;
|
||||||
|
|
@ -80,7 +80,7 @@ void vpip_callfunc(const char*fname, unsigned nres, vpip_bit_t*res,
|
||||||
{
|
{
|
||||||
struct systf_entry*idx;
|
struct systf_entry*idx;
|
||||||
struct __vpiSysTaskCall cur_task;
|
struct __vpiSysTaskCall cur_task;
|
||||||
cur_task.base.vpi_type = &vpip_sysfunc_rt;
|
cur_task.base.vpi_type = vpip_get_sysfunc_rt();
|
||||||
cur_task.args = parms;
|
cur_task.args = parms;
|
||||||
cur_task.nargs = nparms;
|
cur_task.nargs = nparms;
|
||||||
cur_task.res = res;
|
cur_task.res = res;
|
||||||
|
|
@ -114,7 +114,7 @@ static int vpip_get_global(int property)
|
||||||
{
|
{
|
||||||
switch (property) {
|
switch (property) {
|
||||||
case vpiTimePrecision:
|
case vpiTimePrecision:
|
||||||
return vpip_simulation_obj.time_precision;
|
return vpip_get_simulation_obj()->time_precision;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
@ -233,6 +233,9 @@ void vpi_register_systf(const struct t_vpi_systf_data*systf)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vpi_priv.c,v $
|
* $Log: vpi_priv.c,v $
|
||||||
|
* Revision 1.10 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.9 2000/08/20 17:49:05 steve
|
* Revision 1.9 2000/08/20 17:49:05 steve
|
||||||
* Clean up warnings and portability issues.
|
* Clean up warnings and portability issues.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: vpi_priv.h,v 1.27 2000/10/04 02:37:44 steve Exp $"
|
#ident "$Id: vpi_priv.h,v 1.28 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -203,7 +203,7 @@ struct __vpiNull {
|
||||||
struct __vpiHandle base;
|
struct __vpiHandle base;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct __vpiNull vpip_null;
|
extern struct __vpiNull *vpip_get_null(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This type represents the handle to a Verilog scope. These include
|
* This type represents the handle to a Verilog scope. These include
|
||||||
|
|
@ -241,8 +241,9 @@ struct __vpiSignal {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern const struct __vpirt vpip_systask_rt;
|
extern const struct __vpirt *vpip_get_systask_rt(void);
|
||||||
extern const struct __vpirt vpip_sysfunc_rt;
|
extern const struct __vpirt *vpip_get_sysfunc_rt(void);
|
||||||
|
|
||||||
struct __vpiSysTaskCall {
|
struct __vpiSysTaskCall {
|
||||||
struct __vpiHandle base;
|
struct __vpiHandle base;
|
||||||
|
|
||||||
|
|
@ -347,7 +348,7 @@ struct vpip_simulation {
|
||||||
short time_precision;
|
short time_precision;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct vpip_simulation vpip_simulation_obj;
|
extern struct vpip_simulation *vpip_get_simulation_obj(void);
|
||||||
|
|
||||||
extern void vpip_set_vlog_info(int argc, char**argv);
|
extern void vpip_set_vlog_info(int argc, char**argv);
|
||||||
extern void vpip_init_simulation();
|
extern void vpip_init_simulation();
|
||||||
|
|
@ -388,6 +389,9 @@ extern int vpip_finished();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vpi_priv.h,v $
|
* $Log: vpi_priv.h,v $
|
||||||
|
* Revision 1.28 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.27 2000/10/04 02:37:44 steve
|
* Revision 1.27 2000/10/04 02:37:44 steve
|
||||||
* Use .def file instead of _dllexport.
|
* Use .def file instead of _dllexport.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: vpi_simulation.c,v 1.4 2000/08/20 17:49:05 steve Exp $"
|
#ident "$Id: vpi_simulation.c,v 1.5 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
|
|
@ -30,7 +30,14 @@ struct vpip_event {
|
||||||
struct vpip_event*next;
|
struct vpip_event*next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct vpip_simulation vpip_simulation_obj;
|
static struct vpip_simulation vpip_simulation_obj;
|
||||||
|
|
||||||
|
struct vpip_simulation *vpip_get_simulation_obj(void)
|
||||||
|
{
|
||||||
|
return &vpip_simulation_obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void vpi_sim_control(int func, ...)
|
void vpi_sim_control(int func, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -203,6 +210,9 @@ void vpip_simulation_run()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vpi_simulation.c,v $
|
* $Log: vpi_simulation.c,v $
|
||||||
|
* Revision 1.5 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.4 2000/08/20 17:49:05 steve
|
* Revision 1.4 2000/08/20 17:49:05 steve
|
||||||
* Clean up warnings and portability issues.
|
* Clean up warnings and portability issues.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: vpi_systask.c,v 1.6 2000/09/30 03:20:48 steve Exp $"
|
#ident "$Id: vpi_systask.c,v 1.7 2000/10/06 23:11:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
|
|
@ -40,7 +40,7 @@ static vpiHandle systask_iter(int type, vpiHandle ref)
|
||||||
return vpip_make_iterator(rfp->nargs, rfp->args);
|
return vpip_make_iterator(rfp->nargs, rfp->args);
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct __vpirt vpip_systask_rt = {
|
static const struct __vpirt vpip_systask_rt = {
|
||||||
vpiSysTaskCall,
|
vpiSysTaskCall,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
@ -50,6 +50,11 @@ const struct __vpirt vpip_systask_rt = {
|
||||||
systask_iter
|
systask_iter
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct __vpirt *vpip_get_systask_rt(void)
|
||||||
|
{
|
||||||
|
return &vpip_systask_rt;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A value *can* be put to a vpiSysFuncCall object. This is how the
|
* A value *can* be put to a vpiSysFuncCall object. This is how the
|
||||||
* return value is set. The value that is given should be converted to
|
* return value is set. The value that is given should be converted to
|
||||||
|
|
@ -81,7 +86,7 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value val,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct __vpirt vpip_sysfunc_rt = {
|
static const struct __vpirt vpip_sysfunc_rt = {
|
||||||
vpiSysFuncCall,
|
vpiSysFuncCall,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
@ -91,6 +96,11 @@ const struct __vpirt vpip_sysfunc_rt = {
|
||||||
systask_iter
|
systask_iter
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct __vpirt *vpip_get_sysfunc_rt(void)
|
||||||
|
{
|
||||||
|
return &vpip_sysfunc_rt;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __CYGWIN32__
|
#ifdef __CYGWIN32__
|
||||||
#include <cygwin/cygwin_dll.h>
|
#include <cygwin/cygwin_dll.h>
|
||||||
DECLARE_CYGWIN_DLL(DllMain);
|
DECLARE_CYGWIN_DLL(DllMain);
|
||||||
|
|
@ -98,6 +108,9 @@ DECLARE_CYGWIN_DLL(DllMain);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vpi_systask.c,v $
|
* $Log: vpi_systask.c,v $
|
||||||
|
* Revision 1.7 2000/10/06 23:11:39 steve
|
||||||
|
* Replace data references with function calls. (Venkat)
|
||||||
|
*
|
||||||
* Revision 1.6 2000/09/30 03:20:48 steve
|
* Revision 1.6 2000/09/30 03:20:48 steve
|
||||||
* Cygwin port changes from Venkat
|
* Cygwin port changes from Venkat
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,15 @@ EXPORTS
|
||||||
vpip_make_scope
|
vpip_make_scope
|
||||||
vpip_make_string_const
|
vpip_make_string_const
|
||||||
vpip_make_time_var
|
vpip_make_time_var
|
||||||
vpip_null DATA
|
vpip_get_null
|
||||||
vpip_pair_resolve
|
vpip_pair_resolve
|
||||||
vpip_run_value_changes
|
vpip_run_value_changes
|
||||||
vpip_set_vlog_info
|
vpip_set_vlog_info
|
||||||
vpip_sim_cancel_event
|
vpip_sim_cancel_event
|
||||||
vpip_sim_insert_event
|
vpip_sim_insert_event
|
||||||
vpip_sim_time
|
vpip_sim_time
|
||||||
vpip_simulation_obj DATA
|
vpip_get_simulation_obj
|
||||||
vpip_simulation_run
|
vpip_simulation_run
|
||||||
vpip_sysfunc_rt DATA
|
vpip_get_sysfunc_rt
|
||||||
vpip_systask_rt DATA
|
vpip_get_systask_rt
|
||||||
vpip_time_scale
|
vpip_time_scale
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue