Fix DPI undeclared svBitVecVal compile error, bug346.

This commit is contained in:
Wilson Snyder 2011-05-12 06:32:29 -04:00
parent df4bc950fe
commit 4af0af93bf
3 changed files with 10 additions and 3 deletions

View File

@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix error on enum references to other packages, bug339. [Alex Solomatnikov]
**** Fix DPI undeclared svBitVecVal compile error, bug346. [Chandan Egbert]
**** Fix CDCRSTLOGIC report showing endpoint flops without resets.
**** Fix compiler warnings on SPARC, bug288. [Ahmed El-Mahmoudy]

View File

@ -1792,14 +1792,17 @@ void EmitCImp::emitImp(AstNodeModule* modp) {
puts("//############################################################\n");
puts("#sp implementation\n");
}
if (v3Global.dpi()) {
// do this before including our main .h file so that any references to
// types defined in svdpi.h are available
puts("#include \""+ topClassName() +"__Dpi.h\"\n");
puts("\n");
}
ofp()->printf("#include \"%-20s // For This\n",
(modClassName(modp)+".h\"").c_str());
// Us
puts("#include \""+ symClassName() +".h\"\n");
if (v3Global.dpi()) {
puts("#include \""+ topClassName() +"__Dpi.h\"\n");
}
if (optSystemPerl() && (splitFilenum() || !m_fast)) {
puts("\n");

View File

@ -519,6 +519,8 @@ void EmitCSyms::emitDpiHdr() {
puts("// Manually include this file where DPI .c import functions are declared to insure\n");
puts("// the C functions match the expectations of the DPI imports.\n");
puts("\n");
puts("#include \"svdpi.h\"\n");
puts("\n");
puts("#ifdef __cplusplus\n");
puts("extern \"C\" {\n");
puts("#endif\n");