Internals: Fix constructor syntax in new develop-v5 code
This commit is contained in:
parent
1234ee5fd2
commit
a214fd1f78
|
|
@ -3928,7 +3928,7 @@ public:
|
|||
ASTGEN_MEMBERS_Assign;
|
||||
AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override {
|
||||
AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr;
|
||||
return new AstAssign(this->fileline(), lhsp, rhsp, controlp);
|
||||
return new AstAssign{fileline(), lhsp, rhsp, controlp};
|
||||
}
|
||||
bool brokeLhsMustBeLvalue() const override { return true; }
|
||||
};
|
||||
|
|
@ -3949,7 +3949,7 @@ public:
|
|||
ASTGEN_MEMBERS_AssignDly;
|
||||
AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override {
|
||||
AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr;
|
||||
return new AstAssignDly(this->fileline(), lhsp, rhsp, controlp);
|
||||
return new AstAssignDly{fileline(), lhsp, rhsp, controlp};
|
||||
}
|
||||
bool isGateOptimizable() const override { return false; }
|
||||
string verilogKwd() const override { return "<="; }
|
||||
|
|
@ -4011,7 +4011,7 @@ public:
|
|||
void strengthSpecp(AstStrengthSpec* const strengthSpecp) { setOp4p((AstNode*)strengthSpecp); }
|
||||
AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override {
|
||||
AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr;
|
||||
return new AstAssignW(this->fileline(), lhsp, rhsp, controlp);
|
||||
return new AstAssignW{fileline(), lhsp, rhsp, controlp};
|
||||
}
|
||||
bool brokeLhsMustBeLvalue() const override { return true; }
|
||||
AstAlways* convertToAlways();
|
||||
|
|
|
|||
|
|
@ -2693,9 +2693,9 @@ private:
|
|||
// TODO: This really is dodgy, as strictgly compliant simulators will not
|
||||
// execute this block, but but t_func_check relies on it
|
||||
nodep->replaceWith(
|
||||
new AstSenItem(nodep->fileline(), AstSenItem::Initial()));
|
||||
new AstSenItem{nodep->fileline(), AstSenItem::Initial{}});
|
||||
} else {
|
||||
nodep->replaceWith(new AstSenItem(nodep->fileline(), AstSenItem::Never()));
|
||||
nodep->replaceWith(new AstSenItem{nodep->fileline(), AstSenItem::Never{}});
|
||||
}
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -556,14 +556,14 @@ private:
|
|||
if (!dlyvscp) { // First use of this delayed variable
|
||||
const string newvarname = (string("__Vdly__") + nodep->varp()->shortName());
|
||||
dlyvscp = createVarSc(oldvscp, newvarname, 0, nullptr);
|
||||
AstNodeAssign* const prep = new AstAssignPre(
|
||||
AstNodeAssign* const prep = new AstAssignPre{
|
||||
nodep->fileline(),
|
||||
new AstVarRef(nodep->fileline(), dlyvscp, VAccess::WRITE),
|
||||
new AstVarRef(nodep->fileline(), oldvscp, VAccess::READ));
|
||||
AstNodeAssign* const postp = new AstAssignPost(
|
||||
new AstVarRef{nodep->fileline(), dlyvscp, VAccess::WRITE},
|
||||
new AstVarRef{nodep->fileline(), oldvscp, VAccess::READ}};
|
||||
AstNodeAssign* const postp = new AstAssignPost{
|
||||
nodep->fileline(),
|
||||
new AstVarRef(nodep->fileline(), oldvscp, VAccess::WRITE),
|
||||
new AstVarRef(nodep->fileline(), dlyvscp, VAccess::READ));
|
||||
new AstVarRef{nodep->fileline(), oldvscp, VAccess::WRITE},
|
||||
new AstVarRef{nodep->fileline(), dlyvscp, VAccess::READ}};
|
||||
postp->lhsp()->user2(true); // Don't detect this assignment
|
||||
oldvscp->user1p(dlyvscp); // So we can find it later
|
||||
// Make new ACTIVE with identical sensitivity tree
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ public:
|
|||
: m_pomGraphp{pomGraphp} {}
|
||||
MTaskMoveVertex* makeVertexp(OrderLogicVertex* lvertexp, const OrderEitherVertex* varVertexp,
|
||||
const AstSenTree* domainp) override {
|
||||
return new MTaskMoveVertex(m_pomGraphp, lvertexp, varVertexp, domainp);
|
||||
return new MTaskMoveVertex{m_pomGraphp, lvertexp, varVertexp, domainp};
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -1264,9 +1264,9 @@ AstActive* OrderProcess::processMoveOneLogic(const OrderLogicVertex* lvertexp,
|
|||
newStmtsr = 0;
|
||||
scopep->addActivep(newFuncpr);
|
||||
// Create top call to it
|
||||
AstCCall* const callp = new AstCCall(nodep->fileline(), newFuncpr);
|
||||
AstCCall* const callp = new AstCCall{nodep->fileline(), newFuncpr};
|
||||
// Where will we be adding the call?
|
||||
AstActive* const newActivep = new AstActive(nodep->fileline(), name, domainp);
|
||||
AstActive* const newActivep = new AstActive{nodep->fileline(), name, domainp};
|
||||
newActivep->addStmtsp(callp);
|
||||
if (!activep) {
|
||||
activep = newActivep;
|
||||
|
|
|
|||
|
|
@ -3150,15 +3150,15 @@ static const std::vector<AstCFunc*> createThreadFunctions(const ThreadSchedule&
|
|||
}
|
||||
|
||||
// Unblock the fake "final" mtask when this thread is finished
|
||||
funcp->addStmtsp(new AstCStmt(fl, "vlSelf->__Vm_mtaskstate_final__" + tag
|
||||
+ ".signalUpstreamDone(even_cycle);\n"));
|
||||
funcp->addStmtsp(new AstCStmt{fl, "vlSelf->__Vm_mtaskstate_final__" + tag
|
||||
+ ".signalUpstreamDone(even_cycle);\n"});
|
||||
}
|
||||
|
||||
// Create the fake "final" mtask state variable
|
||||
AstBasicDType* const mtaskStateDtypep
|
||||
= v3Global.rootp()->typeTablep()->findBasicDType(fl, VBasicDTypeKwd::MTASKSTATE);
|
||||
AstVar* const varp
|
||||
= new AstVar(fl, VVarType::MODULETEMP, "__Vm_mtaskstate_final__" + tag, mtaskStateDtypep);
|
||||
= new AstVar{fl, VVarType::MODULETEMP, "__Vm_mtaskstate_final__" + tag, mtaskStateDtypep};
|
||||
varp->valuep(new AstConst(fl, funcps.size()));
|
||||
varp->protect(false); // Do not protect as we still have references in AstText
|
||||
modp->addStmtp(varp);
|
||||
|
|
|
|||
|
|
@ -364,8 +364,9 @@ const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBui
|
|||
const uint32_t nTriggers = senTreeps.size() + extraTriggers.size();
|
||||
|
||||
// Create the TRIGGERVEC variable
|
||||
AstBasicDType* const tDtypep = new AstBasicDType(flp, VBasicDTypeKwd::TRIGGERVEC,
|
||||
VSigning::UNSIGNED, nTriggers, nTriggers);
|
||||
AstBasicDType* const tDtypep
|
||||
= new AstBasicDType{flp, VBasicDTypeKwd::TRIGGERVEC, VSigning::UNSIGNED,
|
||||
static_cast<int>(nTriggers), static_cast<int>(nTriggers)};
|
||||
netlistp->typeTablep()->addTypesp(tDtypep);
|
||||
AstVarScope* const vscp = scopeTopp->createTemp("__V" + name + "Triggered", tDtypep);
|
||||
|
||||
|
|
@ -489,7 +490,7 @@ const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBui
|
|||
const auto add = [&](const string& text) { blockp->addText(flp, text, true); };
|
||||
add("#ifdef VL_DEBUG\n");
|
||||
add("if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) {\n");
|
||||
blockp->addNodep(new AstCCall(flp, dumpp));
|
||||
blockp->addNodep(new AstCCall{flp, dumpp});
|
||||
add("}\n");
|
||||
add("#endif\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class SenExprBuilder final {
|
|||
resultp->dtypeSetBit();
|
||||
return {resultp, true};
|
||||
}
|
||||
return {new AstNeq(flp, currp(), prevp()), true};
|
||||
return {new AstNeq{flp, currp(), prevp()}, true};
|
||||
case VEdgeType::ET_BOTHEDGE: //
|
||||
return {lsb(new AstXor{flp, currp(), prevp()}), false};
|
||||
case VEdgeType::ET_POSEDGE: //
|
||||
|
|
|
|||
Loading…
Reference in New Issue