forked from github/verilator
Add header guards on Dpi.h generated files (#2979).
This commit is contained in:
parent
959793cde3
commit
27d53691bd
1
Changes
1
Changes
@ -24,6 +24,7 @@ Verilator 4.211 devel
|
||||
C++ direct references to parameters might require updating (#3077). [Geza Lore]
|
||||
* Refactored Verilated include files; include verilated.h not verilated_heavy.h.
|
||||
* Add error when constant function under a generate (#3103). [Don Owen]
|
||||
* Add header guards on Dpi.h generated files (#2979). [Tood Strader]
|
||||
* Fix -G to treat simple integer literals as signed (#3060). [Anikin1610]
|
||||
* Fix emitted string array initializers (#2895). [Iztok Jeras]
|
||||
* Fix bitop tree optimization dropping necessary & operator (#3096). [Flavien Solt]
|
||||
|
@ -940,6 +940,9 @@ void EmitCSyms::emitDpiHdr() {
|
||||
puts("// Verilator includes this file in all generated .cpp files that use DPI functions.\n");
|
||||
puts("// Manually include this file where DPI .c import functions are declared to ensure\n");
|
||||
puts("// the C functions match the expectations of the DPI imports.\n");
|
||||
|
||||
ofp()->putsGuard();
|
||||
|
||||
puts("\n");
|
||||
puts("#include \"svdpi.h\"\n");
|
||||
puts("\n");
|
||||
@ -970,6 +973,8 @@ void EmitCSyms::emitDpiHdr() {
|
||||
puts("#ifdef __cplusplus\n");
|
||||
puts("}\n");
|
||||
puts("#endif\n");
|
||||
|
||||
ofp()->putsEndGuard();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_INOUT_TYPE__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_INOUT_TYPE__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -152,3 +155,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_INOUT_UNPACK__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_INOUT_UNPACK__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -181,3 +184,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_INPUT_TYPE__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_INPUT_TYPE__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -152,3 +155,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_INPUT_UNPACK__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_INPUT_UNPACK__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -181,3 +184,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_OUTPUT_TYPE__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_OUTPUT_TYPE__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -152,3 +155,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_ARG_OUTPUT_UNPACK__DPI_H_
|
||||
#define VERILATED_VT_DPI_ARG_OUTPUT_UNPACK__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -181,3 +184,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Manually include this file where DPI .c import functions are declared to ensure
|
||||
// the C functions match the expectations of the DPI imports.
|
||||
|
||||
#ifndef VERILATED_VT_DPI_RESULT_TYPE__DPI_H_
|
||||
#define VERILATED_VT_DPI_RESULT_TYPE__DPI_H_ // guard
|
||||
|
||||
#include "svdpi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -86,3 +89,5 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // guard
|
||||
|
Loading…
Reference in New Issue
Block a user