diff --git a/src/V3Ast.h b/src/V3Ast.h index f9edcd5ae..304d95654 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -1739,6 +1739,7 @@ public: pair dimensions(bool includeBasic); uint32_t arrayUnpackedElements(); // 1, or total multiplication of all dimensions static int uniqueNumInc() { return ++s_uniqueNum; } + const char* charIQWN() const { return (isString() ? "N" : isWide() ? "W" : isQuad() ? "Q" : "I"); } }; class AstNodeClassDType : public AstNodeDType { diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index c5874cbc3..e34216c90 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -81,10 +81,8 @@ public: void emitVarCtors(); bool emitSimpleOk(AstNodeMath* nodep); void emitIQW(AstNode* nodep) { - // Other abbrevs: "C"har, "S"hort, "F"loat, "D"ouble, stri"N"g - puts (nodep->isString() ? "N" - : nodep->isWide() ? "W" - : nodep->isQuad() ? "Q" : "I"); + // Other abbrevs: "C"har, "S"hort, "F"loat, "D"ouble, stri"N"g + puts (nodep->dtypep()->charIQWN()); } void emitScIQW(AstVar* nodep) { if (!nodep->isSc()) nodep->v3fatalSrc("emitting SystemC operator on non-SC variable"); diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index 5993c4aab..34a7fc5a1 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -576,12 +576,12 @@ void EmitCSyms::emitDpiHdr() { AstCFunc* nodep = *it; if (nodep->dpiExportWrapper()) { if (!firstExp++) puts("\n// DPI EXPORTS\n"); - puts("// DPI Export at "+nodep->fileline()->ascii()+"\n"); + puts("// DPI export at "+nodep->fileline()->ascii()+"\n"); puts("extern "+nodep->rtnTypeVoid()+" "+nodep->name()+" ("+cFuncArgs(nodep)+");\n"); } else if (nodep->dpiImport()) { if (!firstImp++) puts("\n// DPI IMPORTS\n"); - puts("// DPI Import at "+nodep->fileline()->ascii()+"\n"); + puts("// DPI import at "+nodep->fileline()->ascii()+"\n"); puts("extern "+nodep->rtnTypeVoid()+" "+nodep->name()+" ("+cFuncArgs(nodep)+");\n"); } }