Create vltstd to isolate duplicated headers

This commit is contained in:
Wilson Snyder 2010-02-01 21:39:50 -05:00
parent e01d7fcefc
commit c4f306c145
5 changed files with 19 additions and 4 deletions

View File

@ -113,6 +113,7 @@ DISTFILES_INC = $(INFOS) .gitignore Artistic COPYING COPYING.LESSER \
include/*.[chv]* \ include/*.[chv]* \
include/*.in \ include/*.in \
include/.*ignore \ include/.*ignore \
include/vltstd/*.[chv]* \
.*attributes */.*attributes */*/.*attributes \ .*attributes */.*attributes */*/.*attributes \
src/.*ignore src/*.in src/*.cpp src/*.[chly] src/astgen src/bisonpre src/*fix \ src/.*ignore src/*.in src/*.cpp src/*.[chly] src/astgen src/bisonpre src/*fix \
src/*.pl src/*.pod \ src/*.pl src/*.pod \
@ -258,9 +259,10 @@ installman: $(VL_INST_MAN_FILES)
done done
installdata: installdata:
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include $(DESTDIR)$(pkgdatadir)/examples $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include/vltstd $(DESTDIR)$(pkgdatadir)/examples
cp -r include/* $(DESTDIR)$(pkgdatadir)/include cp -r include/*.* $(DESTDIR)$(pkgdatadir)/include
cp -r ${srcdir}/include/* $(DESTDIR)$(pkgdatadir)/include cp -r ${srcdir}/include/*.* $(DESTDIR)$(pkgdatadir)/include
cp -r ${srcdir}/include/vltstd/*.* $(DESTDIR)$(pkgdatadir)/include/vltstd
cp -r ${srcdir}/test_c $(DESTDIR)$(pkgdatadir)/examples cp -r ${srcdir}/test_c $(DESTDIR)$(pkgdatadir)/examples
cp -r ${srcdir}/test_sc $(DESTDIR)$(pkgdatadir)/examples cp -r ${srcdir}/test_sc $(DESTDIR)$(pkgdatadir)/examples
cp -r ${srcdir}/test_sp $(DESTDIR)$(pkgdatadir)/examples cp -r ${srcdir}/test_sp $(DESTDIR)$(pkgdatadir)/examples

View File

@ -1286,6 +1286,17 @@ The /*verilator sformat*/ indicates that this function accepts a $display
like format specifier followed by any number of arguments to satisfy the like format specifier followed by any number of arguments to satisfy the
format. format.
=head2 DPI Header Isolation
Verilator places the IEEE standard header files such as svdpi.h into a
separate include directory, vltstd (VeriLaTor STandarD). When compiling
most applications $VERILATOR_ROOT/include/vltstd would be in the include
path along with the normal $VERILATOR_ROOT/include. However, when
compiling Verilated models into other simulators which have their own
svdpi.h and similar standard files with different contents, the vltstd
directory should not be included to prevent picking up incompatible
definitions.
=head2 Public Functions =head2 Public Functions
Instead of DPI exporting, there's also Verilator public functions, which Instead of DPI exporting, there's also Verilator public functions, which

View File

@ -26,6 +26,7 @@ SP_INCLUDER = $(PERL) $(VERILATOR_ROOT)/bin/verilator_includer
VK_CPPFLAGS_ALWAYS += \ VK_CPPFLAGS_ALWAYS += \
-MMD \ -MMD \
-I$(VERILATOR_ROOT)/include \ -I$(VERILATOR_ROOT)/include \
-I$(VERILATOR_ROOT)/include/vltstd \
-DVL_PRINTF=printf \ -DVL_PRINTF=printf \
-DVM_TRACE=$(VM_TRACE) \ -DVM_TRACE=$(VM_TRACE) \
-DVM_COVERAGE=$(VM_COVERAGE) \ -DVM_COVERAGE=$(VM_COVERAGE) \
@ -44,6 +45,7 @@ CPPFLAGS += -I. $(VK_CPPFLAGS_ALWAYS) $(VK_CPPFLAGS_WALL)
VPATH += .. VPATH += ..
VPATH += $(VERILATOR_ROOT)/include VPATH += $(VERILATOR_ROOT)/include
VPATH += $(VERILATOR_ROOT)/include/vltstd
#OPT = -ggdb -DPRINTINITSTR -DDETECTCHANGE #OPT = -ggdb -DPRINTINITSTR -DDETECTCHANGE
#OPT = -ggdb -DPRINTINITSTR #OPT = -ggdb -DPRINTINITSTR

View File

@ -32,7 +32,7 @@
#define XXTERN DPI_EXTERN DPI_DLLESPEC #define XXTERN DPI_EXTERN DPI_DLLESPEC
#define EETERN DPI_EXTERN DPI_DLLESPEC #define EETERN DPI_EXTERN DPI_DLLESPEC
#include "svdpi.h" #include "vltstd/svdpi.h"
//====================================================================== //======================================================================
// Internal macros // Internal macros