Cygwin port changes from Venkat
This commit is contained in:
parent
c12e0f5416
commit
b34a451cbc
44
Makefile.in
44
Makefile.in
|
|
@ -18,7 +18,7 @@
|
|||
# 59 Temple Place - Suite 330
|
||||
# Boston, MA 02111-1307, USA
|
||||
#
|
||||
#ident "$Id: Makefile.in,v 1.69 2000/09/23 05:15:07 steve Exp $"
|
||||
#ident "$Id: Makefile.in,v 1.70 2000/09/30 03:20:47 steve Exp $"
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
|
|
@ -51,20 +51,20 @@ CPPFLAGS = @CPPFLAGS@ @DEFS@
|
|||
CXXFLAGS = @CXXFLAGS@ -I$(srcdir)
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
all: ivl verilog iverilog
|
||||
cd vpi ; $(MAKE) all
|
||||
all: ivl@EXEEXT@ verilog iverilog@EXEEXT@
|
||||
cd vvm ; $(MAKE) all
|
||||
cd vpi ; $(MAKE) all
|
||||
cd ivlpp ; $(MAKE) all
|
||||
|
||||
clean:
|
||||
rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc verilog iverilog
|
||||
cd vpi ; $(MAKE) clean
|
||||
rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc verilog iverilog@EXEEXT@
|
||||
cd vvm ; $(MAKE) clean
|
||||
cd vpi ; $(MAKE) clean
|
||||
cd ivlpp ; $(MAKE) clean
|
||||
|
||||
distclean: clean
|
||||
rm -f vpi/Makefile
|
||||
rm -f vvm/Makefile
|
||||
rm -f vpi/Makefile
|
||||
rm -f ivlpp/Makefile
|
||||
rm -f config.status config.cache config.log
|
||||
rm -f Makefile
|
||||
|
|
@ -104,11 +104,11 @@ verilog: $(srcdir)/verilog.sh
|
|||
-e 's;@dllib@;@DLLIB@;' \
|
||||
-e 's;@$(tmp4)@;@CXX@;' < $< > $@
|
||||
|
||||
ivl: $O
|
||||
$(CXX) $(CXXFLAGS) $(rdynamic) -o ivl $O $(dllib)
|
||||
ivl@EXEEXT@: $O
|
||||
$(CXX) $(CXXFLAGS) $(rdynamic) -o ivl@EXEEXT@ $O $(dllib)
|
||||
|
||||
iverilog: iverilog.c
|
||||
$(CC) $(CPPFLAGS) -o iverilog -DCXX='"@CXX@"' -DIVL_ROOT='"@libdir@/ivl"' -DIVL_INC='"@includedir@"' -DIVL_LIB='"@libdir@"' -DRDYNAMIC=\"$(rdynamic)\" -DDLLIB='"@DLLIB@"' iverilog.c
|
||||
iverilog@EXEEXT@: iverilog.c
|
||||
$(CC) $(CPPFLAGS) -o iverilog@EXEEXT@ -DCXX='"@CXX@"' -DIVL_ROOT='"@libdir@/ivl"' -DIVL_INC='"@includedir@"' -DIVL_LIB='"@libdir@"' -DRDYNAMIC=\"$(rdynamic)\" -DDLLIB='"@DLLIB@"' iverilog.c
|
||||
|
||||
%.o dep/%.d: %.cc
|
||||
@[ -d dep ] || mkdir dep
|
||||
|
|
@ -136,18 +136,18 @@ lexor_keyword.cc: lexor_keyword.gperf
|
|||
gperf -o -i 7 -C -k 1-3,$$ -L ANSI-C -H keyword_hash -N check_identifier -t lexor_keyword.gperf > lexor_keyword.cc || (rm -f lexor_keyword.cc ; false)
|
||||
|
||||
|
||||
install: all installdirs $(bindir)/iverilog $(libdir)/ivl/ivl $(includedir)/ivl_target.h $(mandir)/man1/iverilog.1
|
||||
cd vpi ; $(MAKE) install
|
||||
install: all installdirs $(bindir)/iverilog@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@ $(includedir)/ivl_target.h $(mandir)/man1/iverilog.1
|
||||
cd vvm ; $(MAKE) install
|
||||
cd vpi ; $(MAKE) install
|
||||
cd ivlpp ; $(MAKE) install
|
||||
|
||||
$(bindir)/iverilog: ./iverilog
|
||||
$(INSTALL_PROGRAM) ./iverilog $(bindir)/iverilog
|
||||
$(STRIP) $(bindir)/iverilog
|
||||
$(bindir)/iverilog@EXEEXT@: ./iverilog@EXEEXT@
|
||||
$(INSTALL_PROGRAM) ./iverilog@EXEEXT@ $(bindir)/iverilog@EXEEXT@
|
||||
$(STRIP) $(bindir)/iverilog@EXEEXT@
|
||||
|
||||
$(libdir)/ivl/ivl: ./ivl
|
||||
$(INSTALL_PROGRAM) ./ivl $(libdir)/ivl/ivl
|
||||
$(STRIP) $(libdir)/ivl/ivl
|
||||
$(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
|
||||
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
|
||||
$(STRIP) $(libdir)/ivl/ivl@EXEEXT@
|
||||
|
||||
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
|
||||
$(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
|
||||
|
|
@ -159,10 +159,10 @@ installdirs: mkinstalldirs
|
|||
$(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl $(mandir)/man1
|
||||
|
||||
uninstall:
|
||||
rm -f $(libdir)/ivl/ivl
|
||||
rm -f $(bindir)/verilog
|
||||
rm -f $(bindir)/gverilog
|
||||
rm -f $(bindir)/iverilog
|
||||
rm -f $(libdir)/ivl/ivl@EXEEXT@
|
||||
rm -f $(bindir)/verilog@EXEEXT@
|
||||
rm -f $(bindir)/gverilog@EXEEXT@
|
||||
rm -f $(bindir)/iverilog@EXEEXT@
|
||||
rm -r $(includedir)/ivl_target.h
|
||||
rm -f $(mandir)/man1/verilog.1
|
||||
rm -f $(mandir)/man1/iverilog.1
|
||||
|
|
|
|||
|
|
@ -399,6 +399,9 @@ removed from the list) send e-mail to me.
|
|||
Solaris/SPARC packages (.pkg)
|
||||
Dan McMahill <mcmahill@mtl.mit.edu>
|
||||
|
||||
Cygwin32/*
|
||||
Venkat Iyer <venkat@comit.com>
|
||||
|
||||
(*) These are not the only systems where Icarus Verilog has been run,
|
||||
just the systems where precompiled binaries are publicly available.
|
||||
|
||||
|
|
|
|||
24
configure.in
24
configure.in
|
|
@ -10,28 +10,42 @@ AC_PROG_INSTALL
|
|||
AC_CHECK_LIB(dl,main,[DLLIB=-ldl])
|
||||
AC_SUBST(DLLIB)
|
||||
AC_CANONICAL_HOST
|
||||
$host
|
||||
# $host
|
||||
|
||||
#######################
|
||||
## test for underscores. The vpi module loader in vvm needs to know this
|
||||
## in order to know the name of the start symbol for the .vpi module.
|
||||
#######################
|
||||
|
||||
AC_CYGWIN
|
||||
AC_EXEEXT
|
||||
AC_SUBST(EXEEXT)
|
||||
|
||||
AC_MSG_CHECKING("for leading and/or trailing underscores")
|
||||
cat << EOF > underscore.c
|
||||
void underscore(void){}
|
||||
EOF
|
||||
$CC -c underscore.c > /dev/null 2>&1
|
||||
$CC -shared -c underscore.c > /dev/null 2>&1
|
||||
|
||||
CC_LEADING_UNDERSCORE=no
|
||||
CC_TRAILING_UNDERSCORE=no
|
||||
|
||||
output=`nm underscore.o|grep _underscore 2>&1`
|
||||
if test ! -z "$output"; then
|
||||
if test ! -z "$output" -a -z "$CYGWIN" ; then
|
||||
CC_LEADING_UNDERSCORE=yes
|
||||
AC_DEFINE(NEED_LU)
|
||||
fi
|
||||
|
||||
PICFLAG=-fPIC
|
||||
|
||||
if test ! -z "$CYGWIN" ; then
|
||||
PICFLAG=
|
||||
AC_DEFINE(USE_LIBVPIP)
|
||||
fi
|
||||
|
||||
AC_SUBST(CYGWIN)
|
||||
AC_SUBST(PICFLAG)
|
||||
|
||||
output=`nm underscore.o|grep underscore_ 2>&1`
|
||||
if test ! -z "$output"; then
|
||||
CC_TRAILING_UNDERSCORE=yes
|
||||
|
|
@ -69,6 +83,10 @@ case "${host}" in
|
|||
rdynamic=""
|
||||
;;
|
||||
|
||||
*-*-cygwin*)
|
||||
rdynamic=""
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
AC_SUBST(rdynamic)
|
||||
|
|
|
|||
17
iverilog.c
17
iverilog.c
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: iverilog.c,v 1.21 2000/09/12 01:17:19 steve Exp $"
|
||||
#ident "$Id: iverilog.c,v 1.22 2000/09/30 03:20:47 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -28,6 +28,10 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#if HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef IVL_ROOT
|
||||
# define IVL_ROOT "."
|
||||
#endif
|
||||
|
|
@ -36,6 +40,12 @@
|
|||
# define RDYNAMIC "-rdynamic"
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBVPIP
|
||||
# define LIBVPIP "-lvpip"
|
||||
#else
|
||||
# define LIBVPIP ""
|
||||
#endif
|
||||
|
||||
const char*base = IVL_ROOT;
|
||||
const char*mtm = 0;
|
||||
const char*opath = "a.out";
|
||||
|
|
@ -195,7 +205,7 @@ static int t_vvm(char*cmd, unsigned ncmd)
|
|||
}
|
||||
|
||||
sprintf(tmp, "%s -O " RDYNAMIC " -fno-exceptions -o %s -I%s "
|
||||
"-L%s %s.cc -lvvm %s", CXX, opath, IVL_INC, IVL_LIB,
|
||||
"-L%s %s.cc -lvvm " LIBVPIP "%s", CXX, opath, IVL_INC, IVL_LIB,
|
||||
opath, DLLIB);
|
||||
|
||||
if (verbose_flag)
|
||||
|
|
@ -491,6 +501,9 @@ int main(int argc, char **argv)
|
|||
|
||||
/*
|
||||
* $Log: iverilog.c,v $
|
||||
* Revision 1.22 2000/09/30 03:20:47 steve
|
||||
* Cygwin port changes from Venkat
|
||||
*
|
||||
* Revision 1.21 2000/09/12 01:17:19 steve
|
||||
* Oops, the -m flag takes a parameter and needs the :
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# 59 Temple Place - Suite 330
|
||||
# Boston, MA 02111-1307, USA
|
||||
#
|
||||
#ident "$Id: Makefile.in,v 1.11 2000/08/12 20:54:33 steve Exp $"
|
||||
#ident "$Id: Makefile.in,v 1.12 2000/09/30 03:20:47 steve Exp $"
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
|
|
@ -41,7 +41,7 @@ INSTALL = @INSTALL@
|
|||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@ @DEFS@ -fPIC
|
||||
CPPFLAGS = @CPPFLAGS@ @DEFS@ @PICFLAG@ -DBUILD_vpi
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
|
|
@ -55,8 +55,14 @@ all: system.vpi
|
|||
O = sys_table.o sys_display.o sys_finish.o sys_random.o \
|
||||
sys_readmem.o sys_readmem_lex.o sys_vcd.o
|
||||
|
||||
ifeq (@CYGWIN@,yes)
|
||||
SYSTEM_VPI_LDFLAGS=-Wl,--enable-auto-image-base -L../vvm -lvvm -lvpip
|
||||
else
|
||||
SYSTEM_VPI_LDFLAGS=
|
||||
endif
|
||||
|
||||
system.vpi: $O
|
||||
$(CC) -shared -o $@ $O
|
||||
$(CC) -shared -o $@ $O $(SYSTEM_VPI_LDFLAGS)
|
||||
|
||||
sys_readmem_lex.c: sys_readmem_lex.lex
|
||||
flex -t -Preadmem sys_readmem_lex.lex > sys_readmem_lex.c
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: sys_table.c,v 1.5 2000/05/04 03:37:59 steve Exp $"
|
||||
#ident "$Id: sys_table.c,v 1.6 2000/09/30 03:20:47 steve Exp $"
|
||||
#endif
|
||||
|
||||
extern void sys_finish_register();
|
||||
|
|
@ -35,9 +35,16 @@ void (*vlog_startup_routines[])() = {
|
|||
0
|
||||
};
|
||||
|
||||
#ifdef __CYGWIN32__
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: sys_table.c,v $
|
||||
* Revision 1.6 2000/09/30 03:20:47 steve
|
||||
* Cygwin port changes from Venkat
|
||||
*
|
||||
* Revision 1.5 2000/05/04 03:37:59 steve
|
||||
* Add infrastructure for system functions, move
|
||||
* $time to that structure and add $random.
|
||||
|
|
|
|||
|
|
@ -19,9 +19,35 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: vpi_user.h,v 1.20 2000/08/08 01:47:52 steve Exp $"
|
||||
#ident "$Id: vpi_user.h,v 1.21 2000/09/30 03:20:48 steve Exp $"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__CYGWIN32__)
|
||||
# define DLLIMPORT __declspec(dllimport)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define DLLIMPORT
|
||||
# define DLLEXPORT
|
||||
#endif
|
||||
|
||||
#undef VPI_STORAGE_CLASS
|
||||
#if defined(BUILD_vvm)
|
||||
# define VVM_STORAGE_CLASS DLLEXPORT
|
||||
#else
|
||||
# define VVM_STORAGE_CLASS DLLIMPORT
|
||||
#endif
|
||||
|
||||
#undef VPI_STORAGE_CLASS
|
||||
#if defined(BUILD_vpi)
|
||||
# define VPI_STORAGE_CLASS DLLEXPORT
|
||||
#else
|
||||
# define VPI_STORAGE_CLASS DLLIMPORT
|
||||
#endif
|
||||
|
||||
#define VVM_EXTERN extern VVM_STORAGE_CLASS
|
||||
#define VPI_EXTERN extern VPI_STORAGE_CLASS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -162,13 +188,13 @@ typedef struct t_vpi_value {
|
|||
|
||||
|
||||
/* VPI FUNCTIONS */
|
||||
extern void vpi_register_systf(const struct t_vpi_systf_data*ss);
|
||||
extern void vpi_printf(const char*fmt, ...);
|
||||
VVM_EXTERN void vpi_register_systf(const struct t_vpi_systf_data*ss);
|
||||
VVM_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, ...);
|
||||
VVM_EXTERN unsigned int vpi_mcd_close(unsigned int mcd);
|
||||
VVM_EXTERN char *vpi_mcd_name(unsigned int mcd);
|
||||
VVM_EXTERN unsigned int vpi_mcd_open(char *name);
|
||||
VVM_EXTERN int vpi_mcd_printf(unsigned int mcd, const char*fmt, ...);
|
||||
|
||||
/*
|
||||
* support for VPI callback functions.
|
||||
|
|
@ -208,8 +234,8 @@ typedef struct t_cb_data {
|
|||
#define cbInteractiveScopeChange 23
|
||||
#define cbUnresolvedSystf 24
|
||||
|
||||
extern vpiHandle vpi_register_cb(p_cb_data data);
|
||||
extern int vpi_remove_cb(vpiHandle ref);
|
||||
VVM_EXTERN vpiHandle vpi_register_cb(p_cb_data data);
|
||||
VVM_EXTERN int vpi_remove_cb(vpiHandle ref);
|
||||
|
||||
/*
|
||||
* This function allows a vpi application to control the simulation
|
||||
|
|
@ -226,30 +252,30 @@ extern int vpi_remove_cb(vpiHandle ref);
|
|||
* vpiReset -
|
||||
* vpiSetInteractiveScope -
|
||||
*/
|
||||
extern void vpi_sim_control(int operation, ...);
|
||||
VVM_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);
|
||||
VVM_EXTERN vpiHandle vpi_handle(int type, vpiHandle ref);
|
||||
VVM_EXTERN vpiHandle vpi_iterate(int type, vpiHandle ref);
|
||||
VVM_EXTERN vpiHandle vpi_scan(vpiHandle iter);
|
||||
VVM_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,
|
||||
VVM_EXTERN void vpi_get_time(vpiHandle obj, s_vpi_time*t);
|
||||
VVM_EXTERN int vpi_get(int property, vpiHandle ref);
|
||||
VVM_EXTERN char* vpi_get_str(int property, vpiHandle ref);
|
||||
VVM_EXTERN void vpi_get_value(vpiHandle expr, p_vpi_value value);
|
||||
VVM_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);
|
||||
VVM_EXTERN int vpi_free_object(vpiHandle ref);
|
||||
VVM_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 void (*vlog_startup_routines[])();
|
||||
VPI_EXTERN void (*vlog_startup_routines[])();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
@ -257,6 +283,9 @@ extern void (*vlog_startup_routines[])();
|
|||
|
||||
/*
|
||||
* $Log: vpi_user.h,v $
|
||||
* 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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# 59 Temple Place - Suite 330
|
||||
# Boston, MA 02111-1307, USA
|
||||
#
|
||||
#ident "$Id: Makefile.in,v 1.32 2000/08/08 01:47:40 steve Exp $"
|
||||
#ident "$Id: Makefile.in,v 1.33 2000/09/30 03:20:48 steve Exp $"
|
||||
#
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
|
|
@ -35,7 +35,7 @@ bindir = $(exec_prefix)/bin
|
|||
libdir = $(exec_prefix)/lib
|
||||
includedir = $(prefix)/include
|
||||
|
||||
CC = @CC@ -I$(srcdir) -I$(srcdir)/../vpi
|
||||
CC = @CC@ -I$(srcdir) -I$(srcdir)/../vpi -DBUILD_vvm
|
||||
CXX = @CXX@ -I$(srcdir) -I$(srcdir)/../vpi
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
|
@ -45,9 +45,32 @@ CPPFLAGS = @CPPFLAGS@ @DEFS@
|
|||
CXXFLAGS = @CXXFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
STRIP = @STRIP@
|
||||
|
||||
|
||||
ifeq (@CYGWIN@,yes)
|
||||
# In the DOS world, we need to split out the vpip object file.
|
||||
all: libvvm.a libvpip.a
|
||||
|
||||
libvvm.a: $O libvpip.a
|
||||
rm -f $@
|
||||
ar cvq $@ $O $P
|
||||
|
||||
libvpip.a vpip.dll: $P
|
||||
$(CC) -shared -o libvpip.a -Wl,--enable-auto-image-base,--out-implib,libvpip.a -o vpip.dll $P
|
||||
|
||||
else
|
||||
|
||||
all: libvvm.a
|
||||
|
||||
libvvm.a: $O vpip.o
|
||||
rm -f $@
|
||||
ar cvq $@ $O vpip.o
|
||||
|
||||
vpip.o : $P
|
||||
ld -r -o $@ $P
|
||||
endif
|
||||
|
||||
%.o dep/%.d: %.cc
|
||||
@[ -d dep ] || mkdir dep
|
||||
$(CXX) -Wall -fno-exceptions $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
|
||||
|
|
@ -61,24 +84,20 @@ all: libvvm.a
|
|||
O = vvm_add_sub.o vvm_bit.o vvm_calltf.o vvm_clshift.o vvm_compare.o \
|
||||
vvm_event.o vvm_ff.o vvm_force.o \
|
||||
vvm_func.o vvm_gates.o vvm_idiv.o vvm_imod.o vvm_mult.o vvm_mux.o \
|
||||
vvm_nexus.o vvm_pevent.o vvm_signal.o vvm_thread.o vvm_udp.o vpip.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
|
||||
|
||||
libvvm.a: $O
|
||||
rm -f $@
|
||||
ar cvq $@ $O
|
||||
|
||||
vpip.o: $P
|
||||
$(LD) -r -o vpip.o $P
|
||||
|
||||
clean:
|
||||
rm -f *.o dep/*.d
|
||||
|
||||
install: all installdirs $(libdir)/libvvm.a \
|
||||
install:: all installdirs \
|
||||
$(libdir)/libvvm.a \
|
||||
$(includedir)/vvm.h \
|
||||
$(includedir)/vpi_priv.h \
|
||||
$(includedir)/vvm_func.h \
|
||||
|
|
@ -91,6 +110,18 @@ install: all installdirs $(libdir)/libvvm.a \
|
|||
$(libdir)/libvvm.a: ./libvvm.a
|
||||
$(INSTALL_DATA) ./libvvm.a $(libdir)/libvvm.a
|
||||
|
||||
ifeq (@CYGWIN@,yes)
|
||||
install :: $(libdir)/libvvm.a \
|
||||
$(bindir)/vpip.dll
|
||||
|
||||
$(libdir)/libvpip.a: ./libvpip.a
|
||||
$(INSTALL_DATA) ./libvvm.a $(libdir)/libvpip.a
|
||||
|
||||
$(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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.24 2000/09/08 17:08:10 steve Exp $"
|
||||
#ident "$Id: vpi_priv.h,v 1.25 2000/09/30 03:20:48 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -107,13 +107,13 @@ typedef unsigned char vpip_bit_t;
|
|||
|
||||
/* Take as input an array of bits, and return the resolved
|
||||
value. The result accounts for the strengths involved. */
|
||||
extern vpip_bit_t vpip_pair_resolve(vpip_bit_t a, vpip_bit_t b);
|
||||
extern vpip_bit_t vpip_bits_resolve(const vpip_bit_t*bits, unsigned nbits);
|
||||
VVM_EXTERN vpip_bit_t vpip_pair_resolve(vpip_bit_t a, vpip_bit_t b);
|
||||
VVM_EXTERN vpip_bit_t vpip_bits_resolve(const vpip_bit_t*bits, unsigned nbits);
|
||||
|
||||
|
||||
extern void vpip_bits_get_value(const vpip_bit_t*bits, unsigned nbits,
|
||||
VVM_EXTERN void vpip_bits_get_value(const vpip_bit_t*bits, unsigned nbits,
|
||||
s_vpi_value*vp);
|
||||
extern void vpip_bits_set_value(vpip_bit_t*bits, unsigned nbits,
|
||||
VVM_EXTERN void vpip_bits_set_value(vpip_bit_t*bits, unsigned nbits,
|
||||
s_vpi_value*vp);
|
||||
|
||||
/*
|
||||
|
|
@ -202,7 +202,8 @@ struct __vpiMemoryWord {
|
|||
struct __vpiNull {
|
||||
struct __vpiHandle base;
|
||||
};
|
||||
extern struct __vpiNull vpip_null;
|
||||
|
||||
VVM_EXTERN struct __vpiNull vpip_null;
|
||||
|
||||
/*
|
||||
* This type represents the handle to a Verilog scope. These include
|
||||
|
|
@ -218,7 +219,7 @@ struct __vpiScope {
|
|||
struct __vpiHandle**intern;
|
||||
unsigned nintern;
|
||||
};
|
||||
extern void vpip_attach_to_scope(struct __vpiScope*scope, vpiHandle obj);
|
||||
VVM_EXTERN void vpip_attach_to_scope(struct __vpiScope*scope, vpiHandle obj);
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -240,8 +241,8 @@ struct __vpiSignal {
|
|||
};
|
||||
|
||||
|
||||
extern const struct __vpirt vpip_systask_rt;
|
||||
extern const struct __vpirt vpip_sysfunc_rt;
|
||||
VVM_EXTERN const struct __vpirt vpip_systask_rt;
|
||||
VVM_EXTERN const struct __vpirt vpip_sysfunc_rt;
|
||||
struct __vpiSysTaskCall {
|
||||
struct __vpiHandle base;
|
||||
|
||||
|
|
@ -292,35 +293,35 @@ struct __vpiNumberConst {
|
|||
* to allocate the memory for the handle. The result is the vpiHandle
|
||||
* of the constructed object.
|
||||
*/
|
||||
extern vpiHandle vpip_make_iterator(unsigned nargs, vpiHandle*args);
|
||||
extern vpiHandle vpip_make_net(struct __vpiSignal*ref, const char*name,
|
||||
VVM_EXTERN vpiHandle vpip_make_iterator(unsigned nargs, vpiHandle*args);
|
||||
VVM_EXTERN vpiHandle vpip_make_net(struct __vpiSignal*ref, const char*name,
|
||||
vpip_bit_t*bits, unsigned nbits);
|
||||
extern vpiHandle vpip_make_scope(struct __vpiScope*ref,
|
||||
VVM_EXTERN vpiHandle vpip_make_scope(struct __vpiScope*ref,
|
||||
int type_code,
|
||||
const char*name);
|
||||
extern vpiHandle vpip_make_string_const(struct __vpiStringConst*ref,
|
||||
VVM_EXTERN vpiHandle vpip_make_string_const(struct __vpiStringConst*ref,
|
||||
const char*val);
|
||||
extern vpiHandle vpip_make_number_const(struct __vpiNumberConst*ref,
|
||||
VVM_EXTERN vpiHandle vpip_make_number_const(struct __vpiNumberConst*ref,
|
||||
const vpip_bit_t*bits,
|
||||
unsigned nbits);
|
||||
extern vpiHandle vpip_make_memory(struct __vpiMemory*ref, const char*name,
|
||||
VVM_EXTERN vpiHandle vpip_make_memory(struct __vpiMemory*ref, const char*name,
|
||||
unsigned width, unsigned size);
|
||||
extern vpiHandle vpip_make_reg(struct __vpiSignal*ref, const char*name,
|
||||
VVM_EXTERN vpiHandle vpip_make_reg(struct __vpiSignal*ref, const char*name,
|
||||
vpip_bit_t*bits, unsigned nbits);
|
||||
extern vpiHandle vpip_make_time_var(struct __vpiTimeVar*ref,
|
||||
VVM_EXTERN vpiHandle vpip_make_time_var(struct __vpiTimeVar*ref,
|
||||
const char*val);
|
||||
|
||||
/* Use this function to call a registered task. */
|
||||
extern void vpip_calltask(const char*name, unsigned nparms, vpiHandle*parms);
|
||||
VVM_EXTERN void vpip_calltask(const char*name, unsigned nparms, vpiHandle*parms);
|
||||
|
||||
/*
|
||||
* This calls a system function with a given name. The return value is
|
||||
* taken by the res[] array.
|
||||
*/
|
||||
extern void vpip_callfunc(const char*name, unsigned nres, vpip_bit_t*res,
|
||||
VVM_EXTERN void vpip_callfunc(const char*name, unsigned nres, vpip_bit_t*res,
|
||||
unsigned nparms, vpiHandle*parms);
|
||||
|
||||
extern void vpip_run_value_changes(struct __vpiSignal*sig);
|
||||
VVM_EXTERN void vpip_run_value_changes(struct __vpiSignal*sig);
|
||||
|
||||
/*
|
||||
* The simulation object holds the current state of the
|
||||
|
|
@ -346,13 +347,13 @@ struct vpip_simulation {
|
|||
short time_precision;
|
||||
};
|
||||
|
||||
extern struct vpip_simulation vpip_simulation_obj;
|
||||
VVM_EXTERN struct vpip_simulation vpip_simulation_obj;
|
||||
|
||||
extern void vpip_set_vlog_info(int argc, char**argv);
|
||||
extern void vpip_init_simulation();
|
||||
extern void vpip_time_scale(int precision);
|
||||
extern void vpip_simulation_run();
|
||||
extern void vpi_mcd_init(void);
|
||||
VVM_EXTERN void vpip_set_vlog_info(int argc, char**argv);
|
||||
VVM_EXTERN void vpip_init_simulation();
|
||||
VVM_EXTERN void vpip_time_scale(int precision);
|
||||
VVM_EXTERN void vpip_simulation_run();
|
||||
VVM_EXTERN void vpi_mcd_init(void);
|
||||
|
||||
/*
|
||||
* Schedule an event to be run sometime in the future. The d parmater
|
||||
|
|
@ -363,22 +364,23 @@ extern void vpi_mcd_init(void);
|
|||
* The return value from the insert method is a cookie that can be
|
||||
* used to manipulate the event before it is executed.
|
||||
*/
|
||||
extern struct vpip_event* vpip_sim_insert_event(unsigned long d,
|
||||
VVM_EXTERN struct vpip_event* vpip_sim_insert_event(unsigned long d,
|
||||
void*user_data,
|
||||
void (*sim_fun)(void*),
|
||||
int nonblock_flag);
|
||||
extern void vpip_sim_cancel_event(struct vpip_event*cookie);
|
||||
VVM_EXTERN void vpip_sim_cancel_event(struct vpip_event*cookie);
|
||||
|
||||
/*
|
||||
* This function returns a handle to the vpiTimeVar that is th main
|
||||
* simulation time clock.
|
||||
*/
|
||||
extern vpiHandle vpip_sim_time();
|
||||
VVM_EXTERN vpiHandle vpip_sim_time();
|
||||
|
||||
/*
|
||||
* Return true if the going_flag is false.
|
||||
*/
|
||||
extern int vpip_finished();
|
||||
VVM_EXTERN int vpip_finished();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
@ -386,6 +388,9 @@ extern int vpip_finished();
|
|||
|
||||
/*
|
||||
* $Log: vpi_priv.h,v $
|
||||
* Revision 1.25 2000/09/30 03:20:48 steve
|
||||
* Cygwin port changes from Venkat
|
||||
*
|
||||
* Revision 1.24 2000/09/08 17:08:10 steve
|
||||
* initialize vlog info.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.5 2000/05/07 18:20:08 steve Exp $"
|
||||
#ident "$Id: vpi_systask.c,v 1.6 2000/09/30 03:20:48 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vpi_priv.h"
|
||||
|
|
@ -91,8 +91,16 @@ const struct __vpirt vpip_sysfunc_rt = {
|
|||
systask_iter
|
||||
};
|
||||
|
||||
#ifdef __CYGWIN32__
|
||||
#include <cygwin/cygwin_dll.h>
|
||||
DECLARE_CYGWIN_DLL(DllMain);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: vpi_systask.c,v $
|
||||
* Revision 1.6 2000/09/30 03:20:48 steve
|
||||
* Cygwin port changes from Venkat
|
||||
*
|
||||
* Revision 1.5 2000/05/07 18:20:08 steve
|
||||
* Import MCD support from Stephen Tell, and add
|
||||
* system function parameter support to the IVL core.
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
* 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.2 2000/09/12 01:17:40 steve Exp $"
|
||||
#ident "$Id: vpi_vlog_info.c,v 1.3 2000/09/30 03:20:48 steve Exp $"
|
||||
#endif
|
||||
|
||||
#include <vpi_user.h>
|
||||
#include <vpi_priv.h>
|
||||
|
||||
// STORAGE FOR COMMAND LINE ARGUMENTS
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue