mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
Remove vpithunk, and move libvpi to vvp directory.
This commit is contained in:
+28
-8
@@ -16,7 +16,7 @@
|
||||
# 59 Temple Place - Suite 330
|
||||
# Boston, MA 02111-1307, USA
|
||||
#
|
||||
#ident "$Id: Makefile.in,v 1.40 2002/08/12 00:27:10 steve Exp $"
|
||||
#ident "$Id: Makefile.in,v 1.41 2003/01/10 03:06:32 steve Exp $"
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
@@ -50,10 +50,10 @@ LIBS = @LIBS@ @EXTRALIBS@
|
||||
dllib=@DLLIB@
|
||||
rdynamic=@rdynamic@
|
||||
|
||||
all: vvp
|
||||
all: vvp@EXEEXT@ libvpi.a
|
||||
|
||||
clean:
|
||||
rm -rf vvp *.o *~ parse.cc parse.cc.output parse.h lexor.cc dep
|
||||
rm -rf vvp@EXEEXT@ *.o *~ parse.cc parse.cc.output parse.h lexor.cc dep
|
||||
|
||||
distclean: clean
|
||||
rm -f config.h Makefile config.cache config.log config.status
|
||||
@@ -70,9 +70,25 @@ functor.o fvectors.o npmos.o resolv.o symbols.o ufunc.o codes.o vthread.o \
|
||||
schedule.o statistics.o tables.o udp.o memory.o force.o event.o \
|
||||
logic.o delay.o $V
|
||||
|
||||
ifeq (@WIN32@,yes)
|
||||
# Under Windows (mingw) I need to make the ivl.exe in two steps.
|
||||
# The first step makes an ivl.exe that dlltool can use to make an
|
||||
# export and import library, and the last link makes a, ivl.exe
|
||||
# that really exports the things that the import library imports.
|
||||
vvp@EXEEXT@ libvpi.a: $O vvp.def
|
||||
$(CXX) -o vvp@EXEEXT@ $O $(dllib) @EXTRALIBS@
|
||||
dlltool --dllname vvp@EXEEXT@ --def vvp.def \
|
||||
--output-lib libvpi.a --output-exp vvp.exp
|
||||
$(CXX) -o vvp@EXEEXT@ vvp.exp $O $(dllib) @EXTRALIBS@
|
||||
else
|
||||
libvpi.a: libvpi.c
|
||||
$(CC) -c $(srcdir)/libvpi.c
|
||||
rm -f libvpi.a
|
||||
ar cqv libvpi.a libvpi.o
|
||||
|
||||
vvp: $O
|
||||
$(CXX) $(rdynamic) $(CXXFLAGS) $(LDFLAGS) -o vvp $O $(LIBS) $(dllib)
|
||||
|
||||
endif
|
||||
|
||||
%.o: %.cc
|
||||
@[ -d dep ] || mkdir dep
|
||||
@@ -113,10 +129,13 @@ Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
|
||||
install: all installdirs $(bindir)/vvp $(INSTALL_DOC)
|
||||
install: all installdirs $(bindir)/vvp@EXEEXT@ $(libdir)/libvpi.a $(INSTALL_DOC)
|
||||
|
||||
$(bindir)/vvp: ./vvp
|
||||
$(INSTALL_PROGRAM) ./vvp $(bindir)/vvp
|
||||
$(bindir)/vvp@EXEEXT@: ./vvp@EXEEXT@
|
||||
$(INSTALL_PROGRAM) ./vvp@EXEEXT@ $(bindir)/vvp@EXEEXT@
|
||||
|
||||
$(libdir)/libvpi.a : ./libvpi.a
|
||||
$(INSTALL_DATA) libvpi.a $(libdir)/libvpi.a
|
||||
|
||||
$(mandir)/man1/vvp.1: $(srcdir)/vvp.man
|
||||
$(INSTALL_DATA) $(srcdir)/vvp.man $(mandir)/man1/vvp.1
|
||||
@@ -129,7 +148,8 @@ installdirs: $(srcdir)/mkinstalldirs
|
||||
|
||||
|
||||
uninstall:
|
||||
rm -f $(bindir)/vvp
|
||||
rm -f $(bindir)/vvp@EXEEXT@
|
||||
rm -f $(libdir)/libvpi.a
|
||||
rm -f $(mandir)/man1/vvp.1
|
||||
|
||||
-include $(patsubst %.o, dep/%.d, $O)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
* General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: libvpi.c,v 1.1 2003/01/10 03:06:32 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Things that should be statically linked by VPI modules go here.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: libvpi.c,v $
|
||||
* Revision 1.1 2003/01/10 03:06:32 steve
|
||||
* Remove vpithunk, and move libvpi to vvp directory.
|
||||
*
|
||||
*/
|
||||
+5
-38
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001 Stephen Williams ([email protected])
|
||||
* Copyright (c) 2001-2003 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -17,20 +17,18 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: vpi_modules.cc,v 1.12 2002/08/12 01:35:09 steve Exp $"
|
||||
#ident "$Id: vpi_modules.cc,v 1.13 2003/01/10 03:06:32 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
# include "vpi_priv.h"
|
||||
# include "ivl_dlfcn.h"
|
||||
# include "vpithunk.h"
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
|
||||
typedef void (*vlog_startup_routines_t)(void);
|
||||
typedef int (*vpi_register_sim_t)(p_vpi_thunk tp);
|
||||
|
||||
|
||||
const char* vpip_module_path[64] = {
|
||||
@@ -107,22 +105,6 @@ void vpip_load_module(const char*name)
|
||||
}
|
||||
|
||||
|
||||
void *regsub = ivl_dlsym(dll, LU "vpi_register_sim" TU);
|
||||
vpi_register_sim_t simreg = (vpi_register_sim_t)regsub;
|
||||
if (regsub == 0) {
|
||||
fprintf(stderr, "%s: Unable to locate vpi_register_sim", name);
|
||||
ivl_dlclose(dll);
|
||||
return;
|
||||
}
|
||||
|
||||
extern vpi_thunk vvpt;
|
||||
if (((simreg)(&vvpt)) == 0) {
|
||||
fprintf(stderr, "%s: vpi_register_sim returned zero", name);
|
||||
ivl_dlclose(dll);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void*table = ivl_dlsym(dll, LU "vlog_startup_routines" TU);
|
||||
if (table == 0) {
|
||||
fprintf(stderr, "%s: no vlog_startup_routines\n", name);
|
||||
@@ -139,6 +121,9 @@ void vpip_load_module(const char*name)
|
||||
|
||||
/*
|
||||
* $Log: vpi_modules.cc,v $
|
||||
* Revision 1.13 2003/01/10 03:06:32 steve
|
||||
* Remove vpithunk, and move libvpi to vvp directory.
|
||||
*
|
||||
* Revision 1.12 2002/08/12 01:35:09 steve
|
||||
* conditional ident string using autoconfig.
|
||||
*
|
||||
@@ -162,23 +147,5 @@ void vpip_load_module(const char*name)
|
||||
*
|
||||
* Revision 1.6 2001/07/26 03:13:51 steve
|
||||
* Make the -M flag add module search paths.
|
||||
*
|
||||
* Revision 1.5 2001/06/12 03:53:11 steve
|
||||
* Change the VPI call process so that loaded .vpi modules
|
||||
* use a function table instead of implicit binding.
|
||||
*
|
||||
* Revision 1.4 2001/05/22 02:14:47 steve
|
||||
* Update the mingw build to not require cygwin files.
|
||||
*
|
||||
* Revision 1.3 2001/03/23 02:40:22 steve
|
||||
* Add the :module header statement.
|
||||
*
|
||||
* Revision 1.2 2001/03/22 05:39:34 steve
|
||||
* Test print that interferes with output.
|
||||
*
|
||||
* Revision 1.1 2001/03/16 01:44:34 steve
|
||||
* Add structures for VPI support, and all the %vpi_call
|
||||
* instruction. Get linking of VPI modules to work.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
+20
-53
@@ -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.26 2002/12/21 00:55:58 steve Exp $"
|
||||
#ident "$Id: vpi_priv.cc,v 1.27 2003/01/10 03:06:32 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_priv.h"
|
||||
@@ -354,6 +354,14 @@ extern "C" void vpi_vprintf(const char*fmt, va_list ap)
|
||||
vprintf(fmt, ap);
|
||||
}
|
||||
|
||||
extern "C" void vpi_printf(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vpi_vprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void vpi_sim_vcontrol(int operation, va_list ap)
|
||||
{
|
||||
@@ -367,8 +375,19 @@ extern "C" void vpi_sim_vcontrol(int operation, va_list ap)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void vpi_sim_control(int operation, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, operation);
|
||||
vpi_sim_vcontrol(operation, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* $Log: vpi_priv.cc,v $
|
||||
* Revision 1.27 2003/01/10 03:06:32 steve
|
||||
* Remove vpithunk, and move libvpi to vvp directory.
|
||||
*
|
||||
* Revision 1.26 2002/12/21 00:55:58 steve
|
||||
* The $time system task returns the integer time
|
||||
* scaled to the local units. Change the internal
|
||||
@@ -391,56 +410,4 @@ extern "C" void vpi_sim_vcontrol(int operation, va_list ap)
|
||||
*
|
||||
* Revision 1.21 2002/07/19 01:12:50 steve
|
||||
* vpi_iterate returns 0 on error.
|
||||
*
|
||||
* Revision 1.20 2002/07/17 05:13:43 steve
|
||||
* Implementation of vpi_handle_by_name, and
|
||||
* add the vpiVariables iterator.
|
||||
*
|
||||
* Revision 1.19 2002/07/12 02:04:44 steve
|
||||
* vpi_iterate return null if there is nothing to iterate.
|
||||
*
|
||||
* Revision 1.18 2002/07/05 17:14:15 steve
|
||||
* Names of vpi objects allocated as vpip_strings.
|
||||
*
|
||||
* Revision 1.17 2002/06/21 04:58:55 steve
|
||||
* Add support for special integer vectors.
|
||||
*
|
||||
* Revision 1.16 2002/06/02 19:05:50 steve
|
||||
* Check for null pointers from users.
|
||||
*
|
||||
* Revision 1.15 2002/05/18 02:34:11 steve
|
||||
* Add vpi support for named events.
|
||||
*
|
||||
* Add vpi_mode_flag to track the mode of the
|
||||
* vpi engine. This is for error checking.
|
||||
*
|
||||
* Revision 1.14 2002/05/03 15:44:11 steve
|
||||
* Add vpiModule iterator to vpiScope objects.
|
||||
*
|
||||
* Revision 1.13 2002/04/07 00:46:21 steve
|
||||
* minor cleanup of formatting.
|
||||
*
|
||||
* Revision 1.12 2002/01/09 03:15:23 steve
|
||||
* Add vpi_get_vlog_info support.
|
||||
*
|
||||
* Revision 1.11 2002/01/06 00:48:39 steve
|
||||
* VPI access to root module scopes.
|
||||
*
|
||||
* Revision 1.10 2001/10/31 04:27:47 steve
|
||||
* Rewrite the functor type to have fewer functor modes,
|
||||
* and use objects to manage the different types.
|
||||
* (Stephan Boettcher)
|
||||
*
|
||||
* Revision 1.9 2001/09/15 18:27:05 steve
|
||||
* Make configure detect malloc.h
|
||||
*
|
||||
* Revision 1.8 2001/07/11 02:27:21 steve
|
||||
* Add support for REadOnlySync and monitors.
|
||||
*
|
||||
* Revision 1.7 2001/06/30 23:03:17 steve
|
||||
* support fast programming by only writing the bits
|
||||
* that are listed in the input file.
|
||||
*
|
||||
* Revision 1.6 2001/06/21 22:54:12 steve
|
||||
* Support cbValueChange callbacks.
|
||||
*/
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
EXPORTS
|
||||
|
||||
vpi_chk_error
|
||||
vpi_free_object
|
||||
vpi_get
|
||||
vpi_get_str
|
||||
vpi_get_time
|
||||
vpi_get_userdata
|
||||
vpi_get_value
|
||||
vpi_get_vlog_info
|
||||
vpi_handle
|
||||
vpi_handle_by_index
|
||||
vpi_handle_by_name
|
||||
vpi_iterate
|
||||
vpi_mcd_close
|
||||
vpi_mcd_fgetc
|
||||
vpi_mcd_fputc
|
||||
vpi_mcd_name
|
||||
vpi_mcd_open
|
||||
vpi_mcd_printf
|
||||
vpi_printf
|
||||
vpi_put_userdata
|
||||
vpi_put_value
|
||||
vpi_register_systf
|
||||
vpi_scan
|
||||
vpi_sim_control
|
||||
vpi_sim_vcontrol
|
||||
vpi_vprintf
|
||||
Reference in New Issue
Block a user