From 32f3881344fbd065ec22571dd8214a594db2052a Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 14 Mar 2001 19:27:44 +0000 Subject: [PATCH] Rearrange VPI support libraries. --- Makefile.in | 14 +- autoconf.sh | 17 ++ configure.in | 2 +- vpi/Makefile.in | 18 +- vpi/vpi_user.h | 359 --------------------------------- vpip/.cvsignore | 6 + vpip/Makefile.in | 117 +++++++++++ vpip/configure.in | 11 + vpip/mkinstalldirs | 40 ++++ {vvm => vpip}/vpi_bit.c | 5 +- {vvm => vpip}/vpi_callback.c | 5 +- {vvm => vpip}/vpi_const.c | 5 +- {vvm => vpip}/vpi_iter.c | 5 +- {vvm => vpip}/vpi_mcd.c | 2 +- {vvm => vpip}/vpi_memory.c | 5 +- {vvm => vpip}/vpi_null.c | 5 +- {vvm => vpip}/vpi_priv.c | 5 +- {vvm => vpip}/vpi_priv.h | 7 +- {vvm => vpip}/vpi_scope.c | 5 +- {vvm => vpip}/vpi_signal.c | 5 +- {vvm => vpip}/vpi_simulation.c | 5 +- {vvm => vpip}/vpi_systask.c | 5 +- {vvm => vpip}/vpi_time.c | 5 +- {vvm => vpip}/vpi_vlog_info.c | 2 +- vvm/Makefile.in | 58 +----- 25 files changed, 270 insertions(+), 443 deletions(-) create mode 100644 autoconf.sh delete mode 100644 vpi/vpi_user.h create mode 100644 vpip/.cvsignore create mode 100644 vpip/Makefile.in create mode 100644 vpip/configure.in create mode 100755 vpip/mkinstalldirs rename {vvm => vpip}/vpi_bit.c (96%) rename {vvm => vpip}/vpi_callback.c (97%) rename {vvm => vpip}/vpi_const.c (98%) rename {vvm => vpip}/vpi_iter.c (93%) rename {vvm => vpip}/vpi_mcd.c (97%) rename {vvm => vpip}/vpi_memory.c (97%) rename {vvm => vpip}/vpi_null.c (92%) rename {vvm => vpip}/vpi_priv.c (98%) rename {vvm => vpip}/vpi_priv.h (98%) rename {vvm => vpip}/vpi_scope.c (97%) rename {vvm => vpip}/vpi_signal.c (96%) rename {vvm => vpip}/vpi_simulation.c (97%) rename {vvm => vpip}/vpi_systask.c (96%) rename {vvm => vpip}/vpi_time.c (94%) rename {vvm => vpip}/vpi_vlog_info.c (97%) diff --git a/Makefile.in b/Makefile.in index e83c17421..78ade85e8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.92 2001/03/11 00:29:38 steve Exp $" +#ident "$Id: Makefile.in,v 1.93 2001/03/14 19:27:44 steve Exp $" # # SHELL = /bin/sh @@ -60,6 +60,7 @@ endif all: ivl@EXEEXT@ + for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) all); done cd vvm ; $(MAKE) all cd vpi ; $(MAKE) all cd ivlpp ; $(MAKE) all @@ -83,9 +84,12 @@ clean: cd ivlpp ; $(MAKE) clean cd tgt-verilog ; $(MAKE) clean cd tgt-stub ; $(MAKE) clean + for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) clean); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) clean); done distclean: clean + for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) distclean); done + for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) distclean); done rm -f vvm/Makefile rm -f vpi/Makefile rm -f ivlpp/Makefile @@ -155,11 +159,12 @@ lexor_keyword.cc: lexor_keyword.gperf gperf -o -i 7 -C -k 1-3,$$ -L ANSI-C -H keyword_hash -N check_identifier -t $(srcdir)/lexor_keyword.gperf > lexor_keyword.cc || (rm -f lexor_keyword.cc ; false) -install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h +install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h $(includedir)/vpi_user.h cd vvm ; $(MAKE) install cd vpi ; $(MAKE) install cd ivlpp ; $(MAKE) install cd driver ; $(MAKE) install + for tgt in $(SUBDIRS); do (cd $$tgt ; $(MAKE) install); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) install); done $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@ @@ -172,6 +177,9 @@ $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h $(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h +$(includedir)/vpi_user.h: $(srcdir)/vpi_user.h + $(INSTALL_DATA) $(srcdir)/vpi_user.h $(includedir)/vpi_user.h + installdirs: mkinstalldirs $(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl @@ -180,10 +188,12 @@ uninstall: rm -f $(bindir)/verilog rm -f $(bindir)/gverilog@EXEEXT@ rm -f $(includedir)/ivl_target.h + rm -f $(includedir)/vpi_user.h cd driver ; $(MAKE) uninstall cd vpi ; $(MAKE) uninstall cd vvm ; $(MAKE) uninstall cd ivlpp ; $(MAKE) uninstall + for tgt in $(SUBDIRS); do (cd $$tgt ; $(MAKE) uninstall); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) uninstall); done diff --git a/autoconf.sh b/autoconf.sh new file mode 100644 index 000000000..72e0c90f7 --- /dev/null +++ b/autoconf.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# +# This shell script exists to run autoconf on source distributions +# that are pulled from CVS. The configure scripts are not included +# in CVS, and there are several configure.in files, so it is easiest +# to just run this script to autoconf wherever needed. +# +echo "Autoconf in root..." +autoconf + +for dir +in vpip vvp +do + echo "Autoconf in $dir..." + ( cd $dir ; autoconf ) +done diff --git a/configure.in b/configure.in index 7a6d9fc97..a9306a7e7 100644 --- a/configure.in +++ b/configure.in @@ -148,6 +148,6 @@ AC_SUBST(shared) AC_MSG_RESULT($shared) -AC_CONFIG_SUBDIRS(vvp) +AC_CONFIG_SUBDIRS(vpip vvp) AC_OUTPUT(Makefile vpi/Makefile ivlpp/Makefile vvm/Makefile driver/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-verilog/Makefile tgt-pal/Makefile) diff --git a/vpi/Makefile.in b/vpi/Makefile.in index ab500350f..bcd6df892 100644 --- a/vpi/Makefile.in +++ b/vpi/Makefile.in @@ -18,7 +18,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.21 2001/02/16 00:26:38 steve Exp $" +#ident "$Id: Makefile.in,v 1.22 2001/03/14 19:27:44 steve Exp $" # # SHELL = /bin/sh @@ -50,7 +50,7 @@ all: system.vpi %.o: %.c @[ -d dep ] || mkdir dep - $(CC) -Wall $(CPPFLAGS) $(CFLAGS) -I$(srcdir) -MD -c $< -o $*.o + $(CC) -Wall $(CPPFLAGS) $(CFLAGS) -I$(srcdir) -I$(srcdir)/../vpip -MD -c $< -o $*.o mv $*.d dep O = sys_table.o sys_display.o sys_finish.o sys_random.o \ @@ -58,8 +58,8 @@ sys_readmem.o sys_readmem_lex.o sys_time.o sys_vcd.o \ mt19937int.o ifeq (@CYGWIN@,yes) - SYSTEM_VPI_LDFLAGS=-Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip - VPI_DEPLIBS=../vvm/libvpip.a + SYSTEM_VPI_LDFLAGS=-Wl,--enable-auto-image-base -L../vvm -lvvm -L../vpip -lvpip + VPI_DEPLIBS=../vpip/libvpip.a else SYSTEM_VPI_LDFLAGS= VPI_DEPLIBS= @@ -74,23 +74,17 @@ sys_readmem_lex.c: sys_readmem_lex.lex clean: rm -f *.o dep/*.d -install: all installdirs $(libdir)/ivl/system.vpi \ - $(includedir)/vpi_user.h +install: all installdirs $(libdir)/ivl/system.vpi $(libdir)/ivl/system.vpi: ./system.vpi $(INSTALL_PROGRAM) ./system.vpi $(libdir)/ivl/system.vpi $(STRIP) $(libdir)/ivl/system.vpi -$(includedir)/vpi_user.h: $(srcdir)/vpi_user.h - $(INSTALL_DATA) $(srcdir)/vpi_user.h $(includedir)/vpi_user.h - - installdirs: ../mkinstalldirs - $(srcdir)/../mkinstalldirs $(includedir) $(bindir) $(libdir)/ivl + $(srcdir)/../mkinstalldirs $(libdir)/ivl uninstall: rm -f $(libdir)/ivl/system.vpi - rm -f $(includedir)/vpi_user.h -include $(patsubst %.o, dep/%.d, $O) diff --git a/vpi/vpi_user.h b/vpi/vpi_user.h deleted file mode 100644 index 316dcdfd1..000000000 --- a/vpi/vpi_user.h +++ /dev/null @@ -1,359 +0,0 @@ -#ifndef __vpi_user_H -#define __vpi_user_H -/* - * Copyright (c) 1999 Stephen Williams (steve@icarus.com) - * - * 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 - */ -#if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_user.h,v 1.25 2001/01/06 22:22:17 steve Exp $" -#endif - - -#if defined(__CYGWIN32__) -# define DLLEXPORT __declspec(dllexport) -#else -# define DLLEXPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct __vpiHandle *vpiHandle; - -/* - * This structure is created by the VPI application to provide hooks - * into the application that the compiler/simulator can access. - */ -typedef struct t_vpi_systf_data { - int type; - int subtype; - char *tfname; - int (*calltf)(char*); - int (*compiletf)(char*); - int (*sizetf)(); - char *user_data; -} s_vpi_systf_data, *p_vpi_systf_data; - -/* The type in the above structure can have one of the following - values: */ -#define vpiSysTask 1 -#define vpiSysFunc 2 - -typedef struct t_vpi_vlog_info -{ - int argc; - char **argv; - char *product; - char *version; -} s_vpi_vlog_info, *p_vpi_vlog_info; - - -typedef struct t_vpi_time { - int type; - unsigned int high; - unsigned int low; - double real; -} s_vpi_time, *p_vpi_time; - -#define vpiScaledRealTime 1 -#define vpiSimTime 2 -#define vpiSuppressTime 3 - -typedef struct t_vpi_vecval { - int aval, bval; /* ab encoding: 00=0, 10=1, 11=X, 01=Z */ -} s_vpi_vecval, *p_vpi_vecval; - -/* - * This structure holds values that are passed back and forth between - * the simulator and the application. - */ -typedef struct t_vpi_value { - int format; - union { - char*str; - int scalar; - int integer; - double real; - struct t_vpi_time *time; - struct t_vpi_vecval *vector; - struct t_vpi_strengthval *strength; - char*misc; - } value; -} s_vpi_value, *p_vpi_value; - -/* These are valid codes for the format of the t_vpi_value structure. */ -#define vpiBinStrVal 1 -#define vpiOctStrVal 2 -#define vpiDecStrVal 3 -#define vpiHexStrVal 4 -#define vpiScalarVal 5 -#define vpiIntVal 6 -#define vpiRealVal 7 -#define vpiStringVal 8 -#define vpiVectorVal 9 -#define vpiStrengthVal 10 -#define vpiTimeVal 11 -#define vpiObjTypeVal 12 -#define vpiSuppressVal 13 - - -/* SCALAR VALUES */ -#define vpi0 0 -#define vpi1 1 -#define vpiZ 2 -#define vpiX 3 -#define vpiH 4 -#define vpiL 5 -#define vpiDontCare 6 - - -/* OBJECT CODES */ -#define vpiConstant 7 -#define vpiFunction 20 -#define vpiIterator 27 -#define vpiMemory 29 -#define vpiMemoryWord 30 -#define vpiModule 32 -#define vpiNamedBegin 33 -#define vpiNamedFork 35 -#define vpiNet 36 -#define vpiReg 48 -#define vpiSysFuncCall 56 -#define vpiSysTaskCall 57 -#define vpiTask 59 -#define vpiTimeVar 63 -#define vpiScope 84 -#define vpiSysTfCall 85 -#define vpiArgument 89 -#define vpiInternalScope 92 - -#define vpiCallback 1000 - -/* PROPERTIES */ -#define vpiType 1 -#define vpiName 2 -#define vpiFullName 3 -#define vpiSize 4 -#define vpiTimeUnit 11 -#define vpiTimePrecision 12 -#define vpiConstType 43 -# define vpiDecConst 1 -# define vpiRealConst 2 -# define vpiBinaryConst 3 -# define vpiOctConst 4 -# define vpiHexConst 5 -# define vpiStringConst 6 -#define vpiSigned 65 - -/* DELAY MODES */ -#define vpiNoDelay 1 -#define vpiInertialDelay 2 -#define vpiTransportDelay 3 -#define vpiPureTransportDelay 4 - -#define vpiForceFlag 5 -#define vpiReleaseFlag 6 - - -/* VPI FUNCTIONS */ -extern void vpi_register_systf(const struct t_vpi_systf_data*ss); -extern void vpi_printf(const char*fmt, ...); - -extern unsigned int vpi_mcd_close(unsigned int mcd); -extern char *vpi_mcd_name(unsigned int mcd); -extern unsigned int vpi_mcd_open(char *name); -extern int vpi_mcd_printf(unsigned int mcd, const char*fmt, ...); - -/* - * support for VPI callback functions. - */ -typedef struct t_cb_data { - int reason; - int (*cb_rtn)(struct t_cb_data*cb); - vpiHandle obj; - p_vpi_time time; - p_vpi_value value; - int index; - char*user_data; -} s_cb_data, *p_cb_data; - -#define cbValueChange 1 -#define cbStmt 2 -#define cbForce 3 -#define cbRelease 4 -#define cbAtStartOfSimTime 5 -#define cbReadWriteSynch 6 -#define cbReadOnlySynch 7 -#define cbNextSimTime 8 -#define cbAfterDelay 9 -#define cbEndOfCompile 10 -#define cbStartOfSimulation 11 -#define cbEndOfSimulation 12 -#define cbError 13 -#define cbTchkViolation 14 -#define cbStartOfSave 15 -#define cbEndOfSave 16 -#define cbStartOfRestart 17 -#define cbEndOfRestart 18 -#define cbStartOfReset 19 -#define cbEndOfReset 20 -#define cbEnterInteractive 21 -#define cbExitInteractive 22 -#define cbInteractiveScopeChange 23 -#define cbUnresolvedSystf 24 - -extern vpiHandle vpi_register_cb(p_cb_data data); -extern int vpi_remove_cb(vpiHandle ref); - -/* - * This function allows a vpi application to control the simulation - * engine. The operation parameter specifies the function to - * perform. The remaining parameters (if any) are interpreted by the - * operation. The vpi_sim_control definition was added to P1364-2000 - * 14 July 1999. See PLI Task Force ID: PTF-161 - * - * vpiFinish - perform the $finish operation, as soon as the user - * function returns. This operation takes a single - * parameter, a diagnostic exit code. - * - * vpiStop - - * vpiReset - - * vpiSetInteractiveScope - - */ -extern void vpi_sim_control(int operation, ...); -#define vpiStop 1 -#define vpiFinish 2 -#define vpiReset 3 -#define vpiSetInteractiveScope 4 - -extern vpiHandle vpi_handle(int type, vpiHandle ref); -extern vpiHandle vpi_iterate(int type, vpiHandle ref); -extern vpiHandle vpi_scan(vpiHandle iter); -extern vpiHandle vpi_handle_by_index(vpiHandle ref, int index); - -extern void vpi_get_time(vpiHandle obj, s_vpi_time*t); -extern int vpi_get(int property, vpiHandle ref); -extern char* vpi_get_str(int property, vpiHandle ref); -extern void vpi_get_value(vpiHandle expr, p_vpi_value value); -extern vpiHandle vpi_put_value(vpiHandle obj, p_vpi_value value, - p_vpi_time when, int flags); - -extern int vpi_free_object(vpiHandle ref); -extern int vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p); - - -/* This is the table of startup routines included in each module. */ -extern DLLEXPORT void (*vlog_startup_routines[])(); - -#ifdef __cplusplus -} -#endif - -/* - * $Log: vpi_user.h,v $ - * Revision 1.25 2001/01/06 22:22:17 steve - * Support signed decimal display of variables. - * - * Revision 1.24 2000/10/28 00:51:42 steve - * Add scope to threads in vvm, pass that scope - * to vpi sysTaskFunc objects, and add vpi calls - * to access that information. - * - * $display displays scope in %m (PR#1) - * - * Revision 1.23 2000/10/04 02:37:44 steve - * Use .def file instead of _dllexport. - * - * Revision 1.22 2000/10/03 16:15:35 steve - * Cleanup build of VPI modules under Cygwin. (Venkat) - * - * Revision 1.21 2000/09/30 03:20:48 steve - * Cygwin port changes from Venkat - * - * Revision 1.20 2000/08/08 01:47:52 steve - * Add vpi_vlog_info support from Adrian - * - * Revision 1.19 2000/07/26 03:53:12 steve - * Make simulation precision available to VPI. - * - * Revision 1.18 2000/05/31 01:32:16 steve - * typ vpiRealType. - * - * Revision 1.17 2000/05/18 03:27:32 steve - * Support writing scalars and vectors to signals. - * - * Revision 1.16 2000/05/07 18:20:08 steve - * Import MCD support from Stephen Tell, and add - * system function parameter support to the IVL core. - * - * Revision 1.15 2000/05/04 03:37:59 steve - * Add infrastructure for system functions, move - * $time to that structure and add $random. - * - * Revision 1.14 2000/03/08 04:36:54 steve - * Redesign the implementation of scopes and parameters. - * I now generate the scopes and notice the parameters - * in a separate pass over the pform. Once the scopes - * are generated, I can process overrides and evalutate - * paremeters before elaboration begins. - * - * Revision 1.13 2000/02/23 02:56:56 steve - * Macintosh compilers do not support ident. - * - * Revision 1.12 2000/02/13 19:18:28 steve - * Accept memory words as parameter to $display. - * - * Revision 1.11 2000/01/20 06:04:55 steve - * $dumpall checkpointing in VCD dump. - * - * Revision 1.10 1999/12/15 04:01:14 steve - * Add the VPI implementation of $readmemh. - * - * Revision 1.9 1999/11/28 00:56:08 steve - * Build up the lists in the scope of a module, - * and get $dumpvars to scan the scope for items. - * - * Revision 1.8 1999/11/27 19:07:58 steve - * Support the creation of scopes. - * - * Revision 1.7 1999/11/10 02:52:24 steve - * Create the vpiMemory handle type. - * - * Revision 1.6 1999/11/07 20:33:30 steve - * Add VCD output and related system tasks. - * - * Revision 1.5 1999/11/07 02:25:08 steve - * Add the $monitor implementation. - * - * Revision 1.4 1999/10/28 00:47:25 steve - * Rewrite vvm VPI support to make objects more - * persistent, rewrite the simulation scheduler - * in C (to interface with VPI) and add VPI support - * for callbacks. - * - * Revision 1.3 1999/08/19 02:51:03 steve - * Add vpi_sim_control - * - * Revision 1.2 1999/08/18 03:44:49 steve - * declare vou_sim_control - * - * Revision 1.1 1999/08/15 01:23:56 steve - * Convert vvm to implement system tasks with vpi. - * - */ -#endif diff --git a/vpip/.cvsignore b/vpip/.cvsignore new file mode 100644 index 000000000..6cfb3ca98 --- /dev/null +++ b/vpip/.cvsignore @@ -0,0 +1,6 @@ +libvpip.a +Makefile +configure +config.log +config.status +dep diff --git a/vpip/Makefile.in b/vpip/Makefile.in new file mode 100644 index 000000000..0fc8c4941 --- /dev/null +++ b/vpip/Makefile.in @@ -0,0 +1,117 @@ +# +# This source code is free software; you can redistribute it +# and/or modify it in source code form under the terms of the GNU +# Library General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) +# any later version. In order to redistribute the software in +# binary form, you will need a Picture Elements Binary Software +# License. +# +# 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 Library General Public License for more details. +# +# You should have received a copy of the GNU Library 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 +# +#ident "$Id: Makefile.in,v 1.1 2001/03/14 19:27:44 steve Exp $" +# +# +SHELL = /bin/sh + + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +srcdir = @srcdir@ + +VPATH = $(srcdir) + +bindir = @bindir@ +libdir = @libdir@ +includedir = $(prefix)/include + +CC = @CC@ -I$(srcdir) -I$(srcdir)/../vpi +CXX = @CXX@ -I$(srcdir) -I$(srcdir)/../vpi +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CPPFLAGS = @CPPFLAGS@ @DEFS@ +CXXFLAGS = @CXXFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +STRIP = @STRIP@ + +P = vpi_bit.o vpi_callback.o \ +vpi_const.o vpi_iter.o vpi_memory.o vpi_null.o \ +vpi_priv.o vpi_scope.o vpi_signal.o vpi_simulation.o vpi_systask.o vpi_time.o \ +vpi_mcd.o vpi_vlog_info.o + + + +ifeq (@CYGWIN@,yes) +# In the DOS world, we make libvpip differently. +all: libvpip.a vpip.dll + +libvpip.a vpip.dll: $P vpip.def + $(CC) -shared -Wl,--enable-auto-image-base,--out-implib,libvpip.a -o vpip.dll vpip.def $P + +else + +all: libvpip.a + +libvpip.a: $P + ld -r -o vpip.o $P + rm -f $@ + ar cvq $@ vpip.o +endif + +libvvm.a: $O + rm -f $@ + ar cvq $@ $O + +%.o: %.c + @[ -d dep ] || mkdir dep + $(CC) -Wall $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o + mv $*.d dep + + +clean: + rm -f *.o dep/*.d libvpip.a vpip.dll + +install:: all installdirs \ + $(libdir)/libvpip.a \ + $(includedir)/vpi_priv.h + +$(libdir)/libvpip.a: ./libvpip.a + $(INSTALL_DATA) ./libvpip.a $(libdir)/libvpip.a + +ifeq (@CYGWIN@,yes) +install :: $(bindir)/vpip.dll + +$(bindir)/vpip.dll: ./vpip.dll + $(INSTALL_PROGRAM) ./vpip.dll $(bindir)/vpip.dll + $(STRIP) $(bindir)/vpip.dll + +endif + +$(includedir)/vpi_priv.h: $(srcdir)/vpi_priv.h + $(INSTALL_DATA) $(srcdir)/vpi_priv.h $(includedir)/vpi_priv.h + +installdirs: mkinstalldirs + $(srcdir)/mkinstalldirs $(includedir) $(libdir) + +uninstall:: + rm -f $(libdir)/libvpip.a + rm -f $(includedir)/vpi_priv.h + +ifeq (@CYGWIN@,yes) +uninstall:: + rm -f $(bindir)/vpip.dll +endif + +-include $(patsubst %.o, dep/%.d, $O $P) diff --git a/vpip/configure.in b/vpip/configure.in new file mode 100644 index 000000000..277182076 --- /dev/null +++ b/vpip/configure.in @@ -0,0 +1,11 @@ +AC_INIT(Makefile.in) + +AC_PROG_CC +AC_PROG_INSTALL + +AC_CYGWIN +AC_EXEEXT +AC_SUBST(CYGWIN) +AC_SUBST(EXEEXT) + +AC_OUTPUT(Makefile) diff --git a/vpip/mkinstalldirs b/vpip/mkinstalldirs new file mode 100755 index 000000000..ab32f92cf --- /dev/null +++ b/vpip/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2001/03/14 19:27:44 steve Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/vvm/vpi_bit.c b/vpip/vpi_bit.c similarity index 96% rename from vvm/vpi_bit.c rename to vpip/vpi_bit.c index a7732542e..d188d624c 100644 --- a/vvm/vpi_bit.c +++ b/vpip/vpi_bit.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_bit.c,v 1.5 2000/05/11 01:37:33 steve Exp $" +#ident "$Id: vpi_bit.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -134,6 +134,9 @@ vpip_bit_t vpip_bits_resolve(const vpip_bit_t*bits, unsigned nbits) /* * $Log: vpi_bit.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.5 2000/05/11 01:37:33 steve * Calculate the X output value from drive0 and drive1 * diff --git a/vvm/vpi_callback.c b/vpip/vpi_callback.c similarity index 97% rename from vvm/vpi_callback.c rename to vpip/vpi_callback.c index 5ea9049ee..cbc689635 100644 --- a/vvm/vpi_callback.c +++ b/vpip/vpi_callback.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_callback.c,v 1.8 2000/08/20 17:49:05 steve Exp $" +#ident "$Id: vpi_callback.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -191,6 +191,9 @@ int vpi_remove_cb(vpiHandle ref) /* * $Log: vpi_callback.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.8 2000/08/20 17:49:05 steve * Clean up warnings and portability issues. * diff --git a/vvm/vpi_const.c b/vpip/vpi_const.c similarity index 98% rename from vvm/vpi_const.c rename to vpip/vpi_const.c index e37a15eee..d5f35c4be 100644 --- a/vvm/vpi_const.c +++ b/vpip/vpi_const.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_const.c,v 1.17 2001/01/07 18:22:15 steve Exp $" +#ident "$Id: vpi_const.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -456,6 +456,9 @@ vpiHandle vpip_make_number_const(struct __vpiNumberConst*ref, /* * $Log: vpi_const.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.17 2001/01/07 18:22:15 steve * Assert on length of bit vector. * diff --git a/vvm/vpi_iter.c b/vpip/vpi_iter.c similarity index 93% rename from vvm/vpi_iter.c rename to vpip/vpi_iter.c index 824149304..ff967708f 100644 --- a/vvm/vpi_iter.c +++ b/vpip/vpi_iter.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_iter.c,v 1.3 2000/02/23 02:56:56 steve Exp $" +#ident "$Id: vpi_iter.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif /* @@ -68,6 +68,9 @@ vpiHandle vpi_scan(vpiHandle ref) /* * $Log: vpi_iter.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.3 2000/02/23 02:56:56 steve * Macintosh compilers do not support ident. * diff --git a/vvm/vpi_mcd.c b/vpip/vpi_mcd.c similarity index 97% rename from vvm/vpi_mcd.c rename to vpip/vpi_mcd.c index 3f20f465d..be7162fbc 100644 --- a/vvm/vpi_mcd.c +++ b/vpip/vpi_mcd.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_mcd.c,v 1.2 2000/08/20 17:49:05 steve Exp $" +#ident "$Id: vpi_mcd.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" diff --git a/vvm/vpi_memory.c b/vpip/vpi_memory.c similarity index 97% rename from vvm/vpi_memory.c rename to vpip/vpi_memory.c index f39f5e90a..a85e81c2b 100644 --- a/vvm/vpi_memory.c +++ b/vpip/vpi_memory.c @@ -26,7 +26,7 @@ * Picture Elements, Inc., 777 Panoramic Way, Berkeley, CA 94704. */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_memory.c,v 1.9 2001/01/06 22:22:17 steve Exp $" +#ident "$Id: vpi_memory.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -201,6 +201,9 @@ vpiHandle vpip_make_memory(struct __vpiMemory*ref, const char*name, } /* * $Log: vpi_memory.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.9 2001/01/06 22:22:17 steve * Support signed decimal display of variables. * diff --git a/vvm/vpi_null.c b/vpip/vpi_null.c similarity index 92% rename from vvm/vpi_null.c rename to vpip/vpi_null.c index 02be3b40b..515a86d7f 100644 --- a/vvm/vpi_null.c +++ b/vpip/vpi_null.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_null.c,v 1.4 2000/10/06 23:11:39 steve Exp $" +#ident "$Id: vpi_null.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -43,6 +43,9 @@ extern struct __vpiNull *vpip_get_null(void) /* * $Log: vpi_null.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.4 2000/10/06 23:11:39 steve * Replace data references with function calls. (Venkat) * diff --git a/vvm/vpi_priv.c b/vpip/vpi_priv.c similarity index 98% rename from vvm/vpi_priv.c rename to vpip/vpi_priv.c index 43c233b0d..51d78d982 100644 --- a/vvm/vpi_priv.c +++ b/vpip/vpi_priv.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_priv.c,v 1.11 2000/10/28 00:51:42 steve Exp $" +#ident "$Id: vpi_priv.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -235,6 +235,9 @@ void vpi_register_systf(const struct t_vpi_systf_data*systf) /* * $Log: vpi_priv.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.11 2000/10/28 00:51:42 steve * Add scope to threads in vvm, pass that scope * to vpi sysTaskFunc objects, and add vpi calls diff --git a/vvm/vpi_priv.h b/vpip/vpi_priv.h similarity index 98% rename from vvm/vpi_priv.h rename to vpip/vpi_priv.h index c062cc4aa..6e0f27c25 100644 --- a/vvm/vpi_priv.h +++ b/vpip/vpi_priv.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_priv.h,v 1.31 2001/01/06 22:22:17 steve Exp $" +#ident "$Id: vpi_priv.h,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif /* @@ -28,7 +28,7 @@ * methods declared here to manage the VPI structures and provide the * needed behaviors. */ -# include +# include "vpi_user.h" #ifdef __cplusplus extern "C" { @@ -412,6 +412,9 @@ extern int vpip_finished(); /* * $Log: vpi_priv.h,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.31 2001/01/06 22:22:17 steve * Support signed decimal display of variables. * diff --git a/vvm/vpi_scope.c b/vpip/vpi_scope.c similarity index 97% rename from vvm/vpi_scope.c rename to vpip/vpi_scope.c index d49e8cdf6..edb5b1a4b 100644 --- a/vvm/vpi_scope.c +++ b/vpip/vpi_scope.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_scope.c,v 1.11 2001/01/01 08:10:35 steve Exp $" +#ident "$Id: vpi_scope.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -150,6 +150,9 @@ void vpip_attach_to_scope(struct __vpiScope*ref, vpiHandle obj) /* * $Log: vpi_scope.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.11 2001/01/01 08:10:35 steve * Handle function scopes in dumpvars scn (PR#95) * diff --git a/vvm/vpi_signal.c b/vpip/vpi_signal.c similarity index 96% rename from vvm/vpi_signal.c rename to vpip/vpi_signal.c index 865f0d8f9..eff1d3133 100644 --- a/vvm/vpi_signal.c +++ b/vpip/vpi_signal.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_signal.c,v 1.12 2001/01/06 22:22:17 steve Exp $" +#ident "$Id: vpi_signal.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -127,6 +127,9 @@ vpiHandle vpip_make_reg(struct __vpiSignal*ref, const char*name, /* * $Log: vpi_signal.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.12 2001/01/06 22:22:17 steve * Support signed decimal display of variables. * diff --git a/vvm/vpi_simulation.c b/vpip/vpi_simulation.c similarity index 97% rename from vvm/vpi_simulation.c rename to vpip/vpi_simulation.c index 3b37472ee..4fd1b1f56 100644 --- a/vvm/vpi_simulation.c +++ b/vpip/vpi_simulation.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_simulation.c,v 1.5 2000/10/06 23:11:39 steve Exp $" +#ident "$Id: vpi_simulation.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -210,6 +210,9 @@ void vpip_simulation_run() /* * $Log: vpi_simulation.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.5 2000/10/06 23:11:39 steve * Replace data references with function calls. (Venkat) * diff --git a/vvm/vpi_systask.c b/vpip/vpi_systask.c similarity index 96% rename from vvm/vpi_systask.c rename to vpip/vpi_systask.c index a37601732..5e9329f92 100644 --- a/vvm/vpi_systask.c +++ b/vpip/vpi_systask.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_systask.c,v 1.9 2000/11/01 03:19:36 steve Exp $" +#ident "$Id: vpi_systask.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -125,6 +125,9 @@ DECLARE_CYGWIN_DLL(DllMain); /* * $Log: vpi_systask.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.9 2000/11/01 03:19:36 steve * Add the general $time system function. * diff --git a/vvm/vpi_time.c b/vpip/vpi_time.c similarity index 94% rename from vvm/vpi_time.c rename to vpip/vpi_time.c index e31002736..874918712 100644 --- a/vvm/vpi_time.c +++ b/vpip/vpi_time.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_time.c,v 1.3 2000/02/23 02:56:56 steve Exp $" +#ident "$Id: vpi_time.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif # include "vpi_priv.h" @@ -75,6 +75,9 @@ vpiHandle vpip_make_time_var(struct __vpiTimeVar*ref, const char*val) /* * $Log: vpi_time.c,v $ + * Revision 1.1 2001/03/14 19:27:44 steve + * Rearrange VPI support libraries. + * * Revision 1.3 2000/02/23 02:56:56 steve * Macintosh compilers do not support ident. * diff --git a/vvm/vpi_vlog_info.c b/vpip/vpi_vlog_info.c similarity index 97% rename from vvm/vpi_vlog_info.c rename to vpip/vpi_vlog_info.c index 930c5d389..8818d6ef4 100644 --- a/vvm/vpi_vlog_info.c +++ b/vpip/vpi_vlog_info.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_vlog_info.c,v 1.3 2000/09/30 03:20:48 steve Exp $" +#ident "$Id: vpi_vlog_info.c,v 1.1 2001/03/14 19:27:44 steve Exp $" #endif #include diff --git a/vvm/Makefile.in b/vvm/Makefile.in index 361f812f5..ddb72ec79 100644 --- a/vvm/Makefile.in +++ b/vvm/Makefile.in @@ -18,7 +18,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.41 2000/12/15 20:05:16 steve Exp $" +#ident "$Id: Makefile.in,v 1.42 2001/03/14 19:27:44 steve Exp $" # # SHELL = /bin/sh @@ -35,8 +35,8 @@ bindir = @bindir@ libdir = @libdir@ includedir = $(prefix)/include -CC = @CC@ -I$(srcdir) -I$(srcdir)/../vpi -CXX = @CXX@ -I$(srcdir) -I$(srcdir)/../vpi +CC = @CC@ -I$(srcdir) -I$(srcdir)/../vpi -I$(srcdir)/../vpip +CXX = @CXX@ -I$(srcdir) -I$(srcdir)/../vpi -I$(srcdir)/../vpip INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ @@ -52,29 +52,8 @@ vvm_event.o vvm_ff.o vvm_force.o \ vvm_func.o vvm_gates.o vvm_idiv.o vvm_imod.o vvm_memory.o vvm_mult.o \ vvm_mux.o vvm_nexus.o vvm_pevent.o vvm_signal.o vvm_thread.o vvm_udp.o -P = vpi_bit.o vpi_callback.o \ -vpi_const.o vpi_iter.o vpi_memory.o vpi_null.o \ -vpi_priv.o vpi_scope.o vpi_signal.o vpi_simulation.o vpi_systask.o vpi_time.o \ -vpi_mcd.o vpi_vlog_info.o - - -ifeq (@CYGWIN@,yes) -# In the DOS world, we make libvpip differently. -all: libvvm.a libvpip.a vpip.dll - -libvpip.a vpip.dll: $P vpip.def - $(CC) -shared -Wl,--enable-auto-image-base,--out-implib,libvpip.a -o vpip.dll vpip.def $P - -else - -all: libvvm.a libvpip.a - -libvpip.a: $P - ld -r -o vpip.o $P - rm -f $@ - ar cvq $@ vpip.o -endif +all: libvvm.a libvvm.a: $O rm -f $@ @@ -85,20 +64,13 @@ libvvm.a: $O $(CXX) -Wall -fno-exceptions $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o mv $*.d dep -%.o: %.c - @[ -d dep ] || mkdir dep - $(CC) -Wall $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o - mv $*.d dep - clean: - rm -f *.o dep/*.d libvvm.a libvpip.a vpip.dll + rm -f *.o dep/*.d libvvm.a install:: all installdirs \ $(libdir)/libvvm.a \ - $(libdir)/libvpip.a \ $(includedir)/vvm.h \ - $(includedir)/vpi_priv.h \ $(includedir)/vvm_func.h \ $(includedir)/vvm_gates.h \ $(includedir)/vvm_nexus.h \ @@ -109,17 +81,6 @@ install:: all installdirs \ $(libdir)/libvvm.a: ./libvvm.a $(INSTALL_DATA) ./libvvm.a $(libdir)/libvvm.a -$(libdir)/libvpip.a: ./libvpip.a - $(INSTALL_DATA) ./libvpip.a $(libdir)/libvpip.a - -ifeq (@CYGWIN@,yes) -install :: $(bindir)/vpip.dll - -$(bindir)/vpip.dll: ./vpip.dll - $(INSTALL_PROGRAM) ./vpip.dll $(bindir)/vpip.dll - $(STRIP) $(bindir)/vpip.dll - -endif $(includedir)/vvm.h: $(srcdir)/vvm.h $(INSTALL_DATA) $(srcdir)/vvm.h $(includedir)/vvm.h @@ -142,15 +103,11 @@ $(includedir)/vvm_signal.h: $(srcdir)/vvm_signal.h $(includedir)/vvm_thread.h: $(srcdir)/vvm_thread.h $(INSTALL_DATA) $(srcdir)/vvm_thread.h $(includedir)/vvm_thread.h -$(includedir)/vpi_priv.h: $(srcdir)/vpi_priv.h - $(INSTALL_DATA) $(srcdir)/vpi_priv.h $(includedir)/vpi_priv.h - installdirs: mkinstalldirs $(srcdir)/mkinstalldirs $(includedir) $(libdir) uninstall:: rm -f $(libdir)/libvvm.a - rm -f $(libdir)/libvpip.a rm -f $(includedir)/vvm.h rm -f $(includedir)/vvm_calltf.h rm -f $(includedir)/vvm_func.h @@ -158,11 +115,6 @@ uninstall:: rm -f $(includedir)/vvm_nexus.h rm -f $(includedir)/vvm_signal.h rm -f $(includedir)/vvm_thread.h - rm -f $(includedir)/vpi_priv.h -ifeq (@CYGWIN@,yes) -uninstall:: - rm -f $(bindir)/vpip.dll -endif -include $(patsubst %.o, dep/%.d, $O $P)