Refactor V3Delayed to enable algorithmic extension (#5090)
No functional change. This patch is just cleanup with some non-functional changes to enable the next patch. Most importantly createDlyOnSet, which implements NBAs for arrays, has a new streamlined implementation that does the same thing. Some output code is perturbed due to statement/local variable insertion order. Also renamed Vdlyvfoo to VdlyFoo for easier readability of the generated code.
This commit is contained in:
parent
b5b937e2f2
commit
d841a791e6
|
|
@ -2434,13 +2434,11 @@ public:
|
||||||
ASTGEN_MEMBERS_AstAlwaysObserved;
|
ASTGEN_MEMBERS_AstAlwaysObserved;
|
||||||
};
|
};
|
||||||
class AstAlwaysPost final : public AstNodeProcedure {
|
class AstAlwaysPost final : public AstNodeProcedure {
|
||||||
// Like always but post assignments for memory assignment IFs
|
// Like always but 'post' scheduled, e.g. for array NBA commits
|
||||||
// @astgen op1 := sensesp : Optional[AstSenTree] // Sensitivity list iff clocked
|
|
||||||
public:
|
public:
|
||||||
AstAlwaysPost(FileLine* fl, AstSenTree* sensesp, AstNode* stmtsp)
|
AstAlwaysPost(FileLine* fl)
|
||||||
: ASTGEN_SUPER_AlwaysPost(fl, stmtsp) {
|
: ASTGEN_SUPER_AlwaysPost(fl, nullptr) {}
|
||||||
this->sensesp(sensesp);
|
|
||||||
}
|
|
||||||
ASTGEN_MEMBERS_AstAlwaysPost;
|
ASTGEN_MEMBERS_AstAlwaysPost;
|
||||||
};
|
};
|
||||||
class AstAlwaysPostponed final : public AstNodeProcedure {
|
class AstAlwaysPostponed final : public AstNodeProcedure {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -128,7 +128,7 @@ private:
|
||||||
if (writesToVirtIface(nodep)) {
|
if (writesToVirtIface(nodep)) {
|
||||||
// Convert to always, as we have to assign the trigger var
|
// Convert to always, as we have to assign the trigger var
|
||||||
FileLine* const flp = nodep->fileline();
|
FileLine* const flp = nodep->fileline();
|
||||||
AstAlwaysPost* const postp = new AstAlwaysPost{flp, nullptr, nullptr};
|
AstAlwaysPost* const postp = new AstAlwaysPost{flp};
|
||||||
nodep->replaceWith(postp);
|
nodep->replaceWith(postp);
|
||||||
postp->addStmtsp(
|
postp->addStmtsp(
|
||||||
new AstAssign{flp, nodep->lhsp()->unlinkFrBack(), nodep->rhsp()->unlinkFrBack()});
|
new AstAssign{flp, nodep->lhsp()->unlinkFrBack(), nodep->rhsp()->unlinkFrBack()});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue