mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Create vltstd to isolate duplicated headers
This commit is contained in:
parent
e01d7fcefc
commit
c4f306c145
@ -113,6 +113,7 @@ DISTFILES_INC = $(INFOS) .gitignore Artistic COPYING COPYING.LESSER \
|
||||
include/*.[chv]* \
|
||||
include/*.in \
|
||||
include/.*ignore \
|
||||
include/vltstd/*.[chv]* \
|
||||
.*attributes */.*attributes */*/.*attributes \
|
||||
src/.*ignore src/*.in src/*.cpp src/*.[chly] src/astgen src/bisonpre src/*fix \
|
||||
src/*.pl src/*.pod \
|
||||
@ -258,9 +259,10 @@ installman: $(VL_INST_MAN_FILES)
|
||||
done
|
||||
|
||||
installdata:
|
||||
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include $(DESTDIR)$(pkgdatadir)/examples
|
||||
cp -r include/* $(DESTDIR)$(pkgdatadir)/include
|
||||
cp -r ${srcdir}/include/* $(DESTDIR)$(pkgdatadir)/include
|
||||
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include/vltstd $(DESTDIR)$(pkgdatadir)/examples
|
||||
cp -r 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_sc $(DESTDIR)$(pkgdatadir)/examples
|
||||
cp -r ${srcdir}/test_sp $(DESTDIR)$(pkgdatadir)/examples
|
||||
|
@ -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
|
||||
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
|
||||
|
||||
Instead of DPI exporting, there's also Verilator public functions, which
|
||||
|
@ -26,6 +26,7 @@ SP_INCLUDER = $(PERL) $(VERILATOR_ROOT)/bin/verilator_includer
|
||||
VK_CPPFLAGS_ALWAYS += \
|
||||
-MMD \
|
||||
-I$(VERILATOR_ROOT)/include \
|
||||
-I$(VERILATOR_ROOT)/include/vltstd \
|
||||
-DVL_PRINTF=printf \
|
||||
-DVM_TRACE=$(VM_TRACE) \
|
||||
-DVM_COVERAGE=$(VM_COVERAGE) \
|
||||
@ -44,6 +45,7 @@ CPPFLAGS += -I. $(VK_CPPFLAGS_ALWAYS) $(VK_CPPFLAGS_WALL)
|
||||
|
||||
VPATH += ..
|
||||
VPATH += $(VERILATOR_ROOT)/include
|
||||
VPATH += $(VERILATOR_ROOT)/include/vltstd
|
||||
|
||||
#OPT = -ggdb -DPRINTINITSTR -DDETECTCHANGE
|
||||
#OPT = -ggdb -DPRINTINITSTR
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define XXTERN DPI_EXTERN DPI_DLLESPEC
|
||||
#define EETERN DPI_EXTERN DPI_DLLESPEC
|
||||
|
||||
#include "svdpi.h"
|
||||
#include "vltstd/svdpi.h"
|
||||
|
||||
//======================================================================
|
||||
// Internal macros
|
||||
|
Loading…
Reference in New Issue
Block a user