Internals: Favor {} constructor syntax. No functional change intended.

This commit is contained in:
Wilson Snyder 2023-04-06 21:00:10 -04:00
parent cdb61842d6
commit 8caf9be3e6
25 changed files with 63 additions and 63 deletions

View File

@ -54,11 +54,11 @@ private:
string assertDisplayMessage(AstNode* nodep, const string& prefix, const string& message,
VDisplayType severity) {
if (severity == VDisplayType::DT_ERROR || severity == VDisplayType::DT_FATAL) {
return (string("[%0t] " + prefix + ": ") + nodep->fileline()->filebasename() + ":"
return (string{"[%0t] " + prefix + ": "} + nodep->fileline()->filebasename() + ":"
+ cvtToStr(nodep->fileline()->lineno()) + ": Assertion failed in %m"
+ ((message != "") ? ": " : "") + message + "\n");
} else {
return (string("[%0t] " + prefix + ": ") + nodep->fileline()->filebasename() + ":"
return (string{"[%0t] " + prefix + ": "} + nodep->fileline()->filebasename() + ":"
+ cvtToStr(nodep->fileline()->lineno()) + ": %m"
+ ((message != "") ? ": " : "") + message + "\n");
}

View File

@ -229,7 +229,7 @@ private:
// always queue.push(<sampled var>);
AstCMethodHard* const pushp = new AstCMethodHard{
flp, new AstVarRef{flp, queueVarp, VAccess::WRITE}, "push",
new AstTime(nodep->fileline(), m_modp->timeunit())};
new AstTime{nodep->fileline(), m_modp->timeunit()}};
pushp->addPinsp(exprp->cloneTree(false));
pushp->dtypeSetVoid();
m_clockingp->addNextHere(
@ -238,7 +238,7 @@ private:
// always @<clocking event> queue.pop(<skew>, /*out*/<skewed var>});
AstCMethodHard* const popp = new AstCMethodHard{
flp, new AstVarRef{flp, queueVarp, VAccess::READWRITE}, "pop",
new AstTime(nodep->fileline(), m_modp->timeunit())};
new AstTime{nodep->fileline(), m_modp->timeunit()}};
popp->addPinsp(skewp->unlinkFrBack());
popp->addPinsp(refp);
popp->dtypeSetVoid();

View File

@ -952,7 +952,7 @@ public:
BROKEN_RTN(!fmtp());
return nullptr;
}
string verilogKwd() const override { return (string("$") + string(displayType().ascii())); }
string verilogKwd() const override { return string{"$"} + string{displayType().ascii()}; }
bool isGateOptimizable() const override { return false; }
bool isPredictOptimizable() const override { return false; }
bool isPure() const override { return false; } // SPECIAL: $display has 'visual' ordering
@ -1360,7 +1360,7 @@ public:
void name(const string& name) override { m_name = name; }
void dump(std::ostream& str) const override;
string nameDotless() const;
string nameVlSym() const { return ((string("vlSymsp->")) + nameDotless()); }
string nameVlSym() const { return string{"vlSymsp->"} + nameDotless(); }
AstNodeModule* modp() const { return m_modp; }
//
AstScope* aboveScopep() const VL_MT_SAFE { return m_aboveScopep; }
@ -2640,8 +2640,8 @@ public:
return nullptr;
}
string verilogKwd() const override {
return (filep() ? string("$f") + string(displayType().ascii())
: string("$") + string(displayType().ascii()));
return (filep() ? string{"$f"} + string{displayType().ascii()}
: string{"$"} + string{displayType().ascii()});
}
bool isGateOptimizable() const override { return false; }
bool isPredictOptimizable() const override { return false; }

View File

@ -574,7 +574,7 @@ string AstVar::dpiArgType(bool named, bool forReturn) const {
} else {
class converter final : public dpiTypesToStringConverter {
string bitLogicVector(const AstVar* varp, bool isBit) const override {
return string(varp->isReadOnly() ? "const " : "")
return string{varp->isReadOnly() ? "const " : ""}
+ dpiTypesToStringConverter::bitLogicVector(varp, isBit) + '*';
}
string primitive(const AstVar* varp) const override {
@ -637,13 +637,13 @@ string AstVar::dpiTmpVarType(const string& varName) const {
string AstVar::scType() const {
if (isScBigUint()) {
return (string("sc_biguint<") + cvtToStr(widthMin())
return (string{"sc_biguint<"} + cvtToStr(widthMin())
+ "> "); // Keep the space so don't get >>
} else if (isScUint()) {
return (string("sc_uint<") + cvtToStr(widthMin())
return (string{"sc_uint<"} + cvtToStr(widthMin())
+ "> "); // Keep the space so don't get >>
} else if (isScBv()) {
return (string("sc_bv<") + cvtToStr(widthMin()) + "> "); // Keep the space so don't get >>
return (string{"sc_bv<"} + cvtToStr(widthMin()) + "> "); // Keep the space so don't get >>
} else if (widthMin() == 1) {
return "bool";
} else if (widthMin() <= VL_IDATASIZE) {

View File

@ -299,7 +299,7 @@ private:
// To keep correct visual order, must add before other Text's
AstText* const afterp = nodep->scopeAttrp();
if (afterp) afterp->unlinkFrBackWithNext();
nodep->addScopeAttrp(new AstText{nodep->fileline(), string("__DOT__") + scname});
nodep->addScopeAttrp(new AstText{nodep->fileline(), string{"__DOT__"} + scname});
if (afterp) nodep->addScopeAttrp(afterp);
}
iterateChildren(nodep);

View File

@ -95,7 +95,7 @@ private:
if (vscp->user1p()) return VN_AS(vscp->user1p(), VarScope);
const AstVar* const varp = vscp->varp();
const string newvarname
= string("__Vsampled__") + vscp->scopep()->nameDotless() + "__" + varp->name();
= string{"__Vsampled__"} + vscp->scopep()->nameDotless() + "__" + varp->name();
FileLine* const flp = vscp->fileline();
AstVar* const newvarp = new AstVar{flp, VVarType::MODULETEMP, newvarname, varp->dtypep()};
newvarp->noReset(true); // Reset by below assign

View File

@ -262,8 +262,8 @@ private:
if (VN_IS(dimp, Const)) { // bit = const, can just use it
dimreadps.push_front(dimp);
} else {
const string bitvarname = (string("__Vdlyvdim") + cvtToStr(dimension) + "__"
+ oldvarp->shortName() + "__v" + cvtToStr(modVecNum));
const string bitvarname = string{"__Vdlyvdim"} + cvtToStr(dimension) + "__"
+ oldvarp->shortName() + "__v" + cvtToStr(modVecNum);
AstVarScope* const bitvscp
= createVarSc(varrefp->varScopep(), bitvarname, dimp->width(), nullptr);
AstAssign* const bitassignp = new AstAssign{
@ -282,8 +282,8 @@ private:
// vlsb = constant, can just push constant into where we use it
bitreadp = lsbvaluep;
} else {
const string bitvarname = (string("__Vdlyvlsb__") + oldvarp->shortName() + "__v"
+ cvtToStr(modVecNum));
const string bitvarname
= string{"__Vdlyvlsb__"} + oldvarp->shortName() + "__v" + cvtToStr(modVecNum);
AstVarScope* const bitvscp
= createVarSc(varrefp->varScopep(), bitvarname, lsbvaluep->width(), nullptr);
AstAssign* const bitassignp = new AstAssign{
@ -301,7 +301,7 @@ private:
valreadp = nodep->rhsp()->unlinkFrBack();
} else {
const string valvarname
= (string("__Vdlyvval__") + oldvarp->shortName() + "__v" + cvtToStr(modVecNum));
= string{"__Vdlyvval__"} + oldvarp->shortName() + "__v" + cvtToStr(modVecNum);
AstVarScope* const valvscp
= createVarSc(varrefp->varScopep(), valvarname, 0, nodep->rhsp()->dtypep());
newlhsp = new AstVarRef{nodep->fileline(), valvscp, VAccess::WRITE};
@ -321,7 +321,7 @@ private:
++m_statSharedSet;
} else { // Create new one
const string setvarname
= (string("__Vdlyvset__") + oldvarp->shortName() + "__v" + cvtToStr(modVecNum));
= string{"__Vdlyvset__"} + oldvarp->shortName() + "__v" + cvtToStr(modVecNum);
setvscp = createVarSc(varrefp->varScopep(), setvarname, 1, nullptr);
if (!m_inSuspendableOrFork) {
// Suspendables reset __Vdlyvset__ in the AstAlwaysPost
@ -483,7 +483,7 @@ private:
if (nodep->isDelayed()) {
AstVarRef* const vrefp = VN_AS(nodep->operandp(), VarRef);
vrefp->unlinkFrBack();
const string newvarname = (string("__Vdly__") + vrefp->varp()->shortName());
const string newvarname = string{"__Vdly__"} + vrefp->varp()->shortName();
AstVarScope* const dlyvscp = createVarSc(vrefp->varScopep(), newvarname, 1, nullptr);
const auto dlyRef = [=](VAccess access) {
@ -572,7 +572,7 @@ private:
checkActivePost(nodep, oldactivep);
}
if (!dlyvscp) { // First use of this delayed variable
const string newvarname = (string("__Vdly__") + nodep->varp()->shortName());
const string newvarname = string{"__Vdly__"} + nodep->varp()->shortName();
dlyvscp = createVarSc(oldvscp, newvarname, 0, nullptr);
AstNodeAssign* const prep = new AstAssignPre{
nodep->fileline(),

View File

@ -166,7 +166,7 @@ private:
new AstEq{
funcp->fileline(), new AstCExpr{funcp->fileline(), "this", 64},
new AstCExpr{funcp->fileline(),
string("&(") + funcp->scopep()->nameVlSym() + ")",
string{"&("} + funcp->scopep()->nameVlSym() + ")",
64}},
returnp};
newfuncp->addStmtsp(ifp);
@ -178,7 +178,7 @@ private:
// to come up with some return value
// newfuncp->addStmtsp(new AstDisplay(newfuncp->fileline(),
// VDisplayType::DT_WARNING,
// string("%%Error: ")+name+"() called with bad
// string{"%%Error: "}+name+"() called with bad
// scope", nullptr));
// newfuncp->addStmtsp(new AstStop(newfuncp->fileline()));
if (debug() >= 9) newfuncp->dumpTree("- newfunc: ");

View File

@ -275,9 +275,9 @@ void EmitCFunc::displayArg(AstNode* dispp, AstNode** elistp, bool isScan, const
double dchars = mantissabits / 3.321928094887362 + 1.0;
if (fmtLetter == 'd') dchars++; // space for sign
const int nchars = int(dchars);
pfmt = string("%") + cvtToStr(nchars) + fmtLetter;
pfmt = string{"%"} + cvtToStr(nchars) + fmtLetter;
} else {
pfmt = string("%") + vfmt + fmtLetter;
pfmt = string{"%"} + vfmt + fmtLetter;
}
m_emitDispState.pushFormat(pfmt);
if (!ignore) {
@ -672,7 +672,7 @@ string EmitCFunc::emitVarResetRecurse(const AstVar* varp, const string& varNameP
} else if (const AstUnpackArrayDType* const adtypep = VN_CAST(dtypep, UnpackArrayDType)) {
UASSERT_OBJ(adtypep->hi() >= adtypep->lo(), varp,
"Should have swapped msb & lsb earlier.");
const string ivar = string("__Vi") + cvtToStr(depth);
const string ivar = string{"__Vi"} + cvtToStr(depth);
const string pre = ("for (int " + ivar + " = " + cvtToStr(0) + "; " + ivar + " < "
+ cvtToStr(adtypep->elementsConst()) + "; ++" + ivar + ") {\n");
const string below = emitVarResetRecurse(varp, varNameProtected, adtypep->subDTypep(),

View File

@ -492,7 +492,7 @@ public:
if (!v3Global.opt.protectIds()) return;
}
if (!(nodep->protect() && v3Global.opt.protectIds())) {
putsDecoration(string("// ") + nodep->name() + at + "\n");
putsDecoration(string{"// "} + nodep->name() + at + "\n");
}
iterateChildrenConst(nodep);
}
@ -1310,7 +1310,7 @@ public:
// Default
void visit(AstNode* nodep) override {
puts(string("\n???? // ") + nodep->prettyTypeName() + "\n");
puts(string{"\n???? // "} + nodep->prettyTypeName() + "\n");
iterateChildrenConst(nodep);
// LCOV_EXCL_START
if (!v3Global.opt.lintOnly()) { // An internal problem, so suppress

View File

@ -401,7 +401,7 @@ class EmitCImp final : EmitCFunc {
const int vecnum = vects++;
UASSERT_OBJ(arrayp->hi() >= arrayp->lo(), varp,
"Should have swapped msb & lsb earlier.");
const string ivar = string("__Vi") + cvtToStr(vecnum);
const string ivar = string{"__Vi"} + cvtToStr(vecnum);
puts("for (int __Vi" + cvtToStr(vecnum) + " = " + cvtToStr(0));
puts("; " + ivar + " < " + cvtToStr(arrayp->elementsConst()));
puts("; ++" + ivar + ") {\n");
@ -415,7 +415,7 @@ class EmitCImp final : EmitCFunc {
if (elementp->isWide()
&& !(basicp && basicp->keyword() == VBasicDTypeKwd::STRING)) {
const int vecnum = vects++;
const string ivar = string("__Vi") + cvtToStr(vecnum);
const string ivar = string{"__Vi"} + cvtToStr(vecnum);
puts("for (int __Vi" + cvtToStr(vecnum) + " = " + cvtToStr(0));
puts("; " + ivar + " < " + cvtToStr(elementp->widthWords()));
puts("; ++" + ivar + ") {\n");

View File

@ -516,7 +516,7 @@ void EmitCSyms::emitSymHdr() {
puts("\n// CONSTRUCTORS\n");
puts(symClassName() + "(VerilatedContext* contextp, const char* namep, " + topClassName()
+ "* modelp);\n");
puts(string("~") + symClassName() + "();\n");
puts(string{"~"} + symClassName() + "();\n");
for (const auto& i : m_usesVfinal) {
puts("void " + symClassName() + "_" + cvtToStr(i.first) + "(");

View File

@ -156,9 +156,9 @@ public:
of.puts("# Path to Verilator kit (from $VERILATOR_ROOT)\n");
of.puts("VERILATOR_ROOT = " + V3Options::getenvVERILATOR_ROOT() + "\n");
of.puts("# SystemC include directory with systemc.h (from $SYSTEMC_INCLUDE)\n");
of.puts(string("SYSTEMC_INCLUDE ?= ") + V3Options::getenvSYSTEMC_INCLUDE() + "\n");
of.puts(string{"SYSTEMC_INCLUDE ?= "} + V3Options::getenvSYSTEMC_INCLUDE() + "\n");
of.puts("# SystemC library directory with libsystemc.a (from $SYSTEMC_LIBDIR)\n");
of.puts(string("SYSTEMC_LIBDIR ?= ") + V3Options::getenvSYSTEMC_LIBDIR() + "\n");
of.puts(string{"SYSTEMC_LIBDIR ?= "} + V3Options::getenvSYSTEMC_LIBDIR() + "\n");
// Only check it if we really need the value
if (v3Global.opt.systemC() && !V3Options::systemCFound()) {
@ -169,22 +169,22 @@ public:
of.puts("\n### Switches...\n");
of.puts("# C++ code coverage 0/1 (from --prof-c)\n");
of.puts(string("VM_PROFC = ") + ((v3Global.opt.profC()) ? "1" : "0") + "\n");
of.puts(string{"VM_PROFC = "} + ((v3Global.opt.profC()) ? "1" : "0") + "\n");
of.puts("# SystemC output mode? 0/1 (from --sc)\n");
of.puts(string("VM_SC = ") + ((v3Global.opt.systemC()) ? "1" : "0") + "\n");
of.puts(string{"VM_SC = "} + ((v3Global.opt.systemC()) ? "1" : "0") + "\n");
of.puts("# Legacy or SystemC output mode? 0/1 (from --sc)\n");
of.puts(string("VM_SP_OR_SC = $(VM_SC)\n"));
of.puts(string{"VM_SP_OR_SC = $(VM_SC)\n"});
of.puts("# Deprecated\n");
of.puts(string("VM_PCLI = ") + (v3Global.opt.systemC() ? "0" : "1") + "\n");
of.puts(string{"VM_PCLI = "} + (v3Global.opt.systemC() ? "0" : "1") + "\n");
of.puts(
"# Deprecated: SystemC architecture to find link library path (from $SYSTEMC_ARCH)\n");
of.puts(string("VM_SC_TARGET_ARCH = ") + V3Options::getenvSYSTEMC_ARCH() + "\n");
of.puts(string{"VM_SC_TARGET_ARCH = "} + V3Options::getenvSYSTEMC_ARCH() + "\n");
of.puts("\n### Vars...\n");
of.puts("# Design prefix (from --prefix)\n");
of.puts(string("VM_PREFIX = ") + v3Global.opt.prefix() + "\n");
of.puts(string{"VM_PREFIX = "} + v3Global.opt.prefix() + "\n");
of.puts("# Module prefix (from --prefix)\n");
of.puts(string("VM_MODPREFIX = ") + v3Global.opt.modPrefix() + "\n");
of.puts(string{"VM_MODPREFIX = "} + v3Global.opt.modPrefix() + "\n");
of.puts("# User CFLAGS (from -CFLAGS on Verilator command line)\n");
of.puts("VM_USER_CFLAGS = \\\n");

View File

@ -257,7 +257,7 @@ void V3Error::init() {
describedEachWarn(static_cast<V3ErrorCode>(i), false);
pretendError(static_cast<V3ErrorCode>(i), V3ErrorCode{i}.pretendError());
}
if (VL_UNCOVERABLE(string(V3ErrorCode{V3ErrorCode::_ENUM_MAX}.ascii()) != " MAX")) {
if (VL_UNCOVERABLE(string{V3ErrorCode{V3ErrorCode::_ENUM_MAX}.ascii()} != " MAX")) {
v3fatalSrc("Enum table in V3ErrorCode::EC_ascii() is munged");
}
}

View File

@ -52,7 +52,7 @@ void V3Global::readFiles() {
VInFilter filter{v3Global.opt.pipeFilter()};
V3ParseSym parseSyms{v3Global.rootp()}; // Symbol table must be common across all parsing
V3Parse parser(v3Global.rootp(), &filter, &parseSyms);
V3Parse parser{v3Global.rootp(), &filter, &parseSyms};
// Parse the std package
if (v3Global.opt.std()) {

View File

@ -555,7 +555,7 @@ public:
V3Inst::checkOutputShort(pinp);
AstNodeExpr* const pinexprp = VN_AS(pinp->exprp(), NodeExpr)->unlinkFrBack();
const string newvarname
= (string(pinVarp->isWritable() ? "__Vcellout" : "__Vcellinp")
= (string{pinVarp->isWritable() ? "__Vcellout" : "__Vcellinp"}
// Prevent name conflict if both tri & non-tri add signals
+ (forTristate ? "t" : "") + "__" + cellp->name() + "__" + pinp->name());
AstVar* const newvarp

View File

@ -253,7 +253,7 @@ private:
// Prepare a temporary variable
FileLine* const fl = backp->fileline();
const string name = string("__Vincrement") + cvtToStr(++m_modIncrementsNum);
const string name = string{"__Vincrement"} + cvtToStr(++m_modIncrementsNum);
AstVar* const varp = new AstVar{fl, VVarType::BLOCKTEMP, name, VFlagChildDType{},
varrefp->varp()->subDTypep()->cloneTree(true)};
if (m_ftaskp) varp->funcLocal(true);

View File

@ -192,7 +192,7 @@ private:
// REPEAT(count,body) -> loop=count,WHILE(loop>0) { body, loop-- }
// Note var can be signed or unsigned based on original number.
AstNodeExpr* const countp = nodep->countp()->unlinkFrBackWithNext();
const string name = string("__Vrepeat") + cvtToStr(m_modRepeatNum++);
const string name = string{"__Vrepeat"} + cvtToStr(m_modRepeatNum++);
// Spec says value is integral, if negative is ignored
AstVar* const varp
= new AstVar{nodep->fileline(), VVarType::BLOCKTEMP, name, nodep->findSigned32DType()};

View File

@ -966,9 +966,9 @@ void V3Options::parseOpts(FileLine* fl, int argc, char** argv) {
// Default prefix to the filename
if (prefix() == "" && topModule() != "")
m_prefix = string("V") + AstNode::encodeName(topModule());
m_prefix = string{"V"} + AstNode::encodeName(topModule());
if (prefix() == "" && vFilesList.size() >= 1)
m_prefix = string("V") + AstNode::encodeName(V3Os::filenameNonExt(*(vFilesList.begin())));
m_prefix = string{"V"} + AstNode::encodeName(V3Os::filenameNonExt(*(vFilesList.begin())));
if (modPrefix() == "") m_modPrefix = prefix();
// Find files in makedir

View File

@ -510,7 +510,7 @@ public:
}
}
string name() const {
return (string("MDS:") + " d=" + cvtToHex(domainp()) + " s=" + cvtToHex(scopep()));
return string{"MDS:"} + " d=" + cvtToHex(domainp()) + " s=" + cvtToHex(scopep());
}
};

View File

@ -70,7 +70,7 @@ public:
nm = "nul"; // LCOV_EXCL_LINE
} else {
nm = logicp()->name();
nm += (string("\\nMV:") + " d=" + cvtToHex(logicp()->domainp())
nm += (string{"\\nMV:"} + " d=" + cvtToHex(logicp()->domainp())
+ " s=" + cvtToHex(logicp()->scopep()));
}
return nm;
@ -127,7 +127,7 @@ public:
string nm;
if (logicp()) {
nm = logicp()->name();
nm += (string("\\nMV:") + " d=" + cvtToHex(logicp()->domainp()) + " s="
nm += (string{"\\nMV:"} + " d=" + cvtToHex(logicp()->domainp()) + " s="
+ cvtToHex(logicp()->scopep())
// "color()" represents the mtask ID.
+ "\\nt=" + cvtToStr(color()));

View File

@ -554,7 +554,7 @@ void V3ParseImp::tokenPipelineSym() {
}
if (foundp && !v3Global.usesStdPackage()) {
AstPackageImport* const impp
= new AstPackageImport(stdpkgp->fileline(), stdpkgp, "*");
= new AstPackageImport{stdpkgp->fileline(), stdpkgp, "*"};
unitPackage(stdpkgp->fileline())->addStmtsp(impp);
v3Global.setUsesStdPackage();
}

View File

@ -148,7 +148,7 @@ public:
SplitVarPostVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex{graphp, nodep} {}
~SplitVarPostVertex() override = default;
string name() const override VL_MT_STABLE { return string("POST ") + SplitNodeVertex::name(); }
string name() const override VL_MT_STABLE { return string{"POST "} + SplitNodeVertex::name(); }
string dotColor() const override { return "CadetBlue"; }
};
@ -513,10 +513,10 @@ protected:
// And a real ordering to get the statements into something reasonable
// We don't care if there's cutable violations here...
// Non-cutable violations should be impossible; as those edges are program-order
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed(string("splitg_preo"), false);
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_preo", false);
m_graph.acyclic(&SplitEdge::followCyclic);
m_graph.rank(&SplitEdge::followCyclic); // Or order(), but that's more expensive
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed(string("splitg_opt"), false);
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_opt", false);
}
void reorderBlock(AstNode* nodep) {

View File

@ -323,7 +323,7 @@ struct TaskDpiUtils {
return true;
} else {
const AstNodeDType* const dtypep = portp->dtypep()->skipRefp();
frstmt = "VL_SET_" + string(dtypep->charIQWN()) + "_" + frSvType + "(";
frstmt = "VL_SET_" + string{dtypep->charIQWN()} + "_" + frSvType + "(";
if (VN_IS(dtypep, UnpackArrayDType)) frstmt += "&";
frstmt += frName;
ket = ")";
@ -425,7 +425,7 @@ private:
AstNode* const newbodysp
= AstNode::cloneTreeNull(refp->taskp()->stmtsp(), true); // Maybe nullptr
AstNode* const beginp
= new AstComment{refp->fileline(), string("Function: ") + refp->name(), true};
= new AstComment{refp->fileline(), string{"Function: "} + refp->name(), true};
if (newbodysp) beginp->addNext(newbodysp);
if (debug() >= 9) beginp->dumpTreeAndNext(cout, "- newbegi: ");
//
@ -542,7 +542,7 @@ private:
UASSERT_OBJ(cfuncp, refp, "No non-inline task associated with this task call?");
//
AstNode* const beginp
= new AstComment{refp->fileline(), string("Function: ") + refp->name(), true};
= new AstComment{refp->fileline(), string{"Function: "} + refp->name(), true};
AstNodeCCall* ccallp;
if (VN_IS(refp, New)) {
AstCNew* const cnewp = new AstCNew{refp->fileline(), cfuncp};
@ -1725,7 +1725,7 @@ string V3Task::assignInternalToDpi(AstVar* portp, bool isPtr, const string& frSu
stmt = "for (size_t " + idx + " = 0; " + idx + " < " + cvtToStr(unpackSize) + "; ++" + idx
+ ") ";
stmt += (isBit ? "VL_SET_SVBV_" : "VL_SET_SVLV_")
+ string(portp->dtypep()->skipRefp()->charIQWN()) + "(" + cvtToStr(portp->width())
+ string{portp->dtypep()->skipRefp()->charIQWN()} + "(" + cvtToStr(portp->width())
+ ", ";
stmt += toName + " + " + cvtToStr(portp->dtypep()->skipRefp()->widthWords()) + " * " + idx
+ ", ";

View File

@ -1803,11 +1803,11 @@ modportPortsDecl<nodep>:
// // IEEE: modport_simple_ports_declaration
| modportSimplePortOrTFPort { $$ = GRAMMARP->m_modportImpExpActive ?
static_cast<AstNode*>(
new AstModportFTaskRef(
$<fl>1, *$1, GRAMMARP->m_modportImpExpLastIsExport) ) :
new AstModportFTaskRef{
$<fl>1, *$1, GRAMMARP->m_modportImpExpLastIsExport} ) :
static_cast<AstNode*>(
new AstModportVarRef(
$<fl>1, *$1, GRAMMARP->m_varIO) ); }
new AstModportVarRef{
$<fl>1, *$1, GRAMMARP->m_varIO} ); }
;
modportSimplePortOrTFPort<strp>:// IEEE: modport_simple_port or modport_tf_port, depending what keyword was earlier