mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Internals: Rename AstSenTree pointers to sentreep. No functional change intended except JSON.
This commit is contained in:
+14
-14
@@ -115,15 +115,15 @@ AstCCall* TimingKit::createCommit(AstNetlist* const netlistp) {
|
||||
m_commitFuncp->declPrivate(true);
|
||||
scopeTopp->addBlocksp(m_commitFuncp);
|
||||
}
|
||||
AstSenTree* const sensesp = activep->sensesp();
|
||||
FileLine* const flp = sensesp->fileline();
|
||||
AstSenTree* const sentreep = activep->sentreep();
|
||||
FileLine* const flp = sentreep->fileline();
|
||||
// Negate the sensitivity. We will commit only if the event wasn't triggered on the
|
||||
// current iteration
|
||||
auto* const negSensesp = sensesp->cloneTree(false);
|
||||
negSensesp->sensesp()->sensp(
|
||||
new AstLogNot{flp, negSensesp->sensesp()->sensp()->unlinkFrBack()});
|
||||
sensesp->addNextHere(negSensesp);
|
||||
auto* const newactp = new AstActive{flp, "", negSensesp};
|
||||
auto* const negSentreep = sentreep->cloneTree(false);
|
||||
negSentreep->sensesp()->sensp(
|
||||
new AstLogNot{flp, negSentreep->sensesp()->sensp()->unlinkFrBack()});
|
||||
sentreep->addNextHere(negSentreep);
|
||||
auto* const newactp = new AstActive{flp, "", negSentreep};
|
||||
// Create the commit call and put it in the commit function
|
||||
auto* const commitp = new AstCMethodHard{
|
||||
flp, new AstVarRef{flp, schedulerp, VAccess::READWRITE}, "commit"};
|
||||
@@ -180,8 +180,8 @@ TimingKit prepareTiming(AstNetlist* const netlistp) {
|
||||
void createResumeActive(AstCAwait* const awaitp) {
|
||||
auto* const methodp = VN_AS(awaitp->exprp(), CMethodHard);
|
||||
AstVarScope* const schedulerp = VN_AS(methodp->fromp(), VarRef)->varScopep();
|
||||
AstSenTree* const sensesp = awaitp->sensesp();
|
||||
FileLine* const flp = sensesp->fileline();
|
||||
AstSenTree* const sentreep = awaitp->sentreep();
|
||||
FileLine* const flp = sentreep->fileline();
|
||||
// Create a resume() call on the timing scheduler
|
||||
auto* const resumep = new AstCMethodHard{
|
||||
flp, new AstVarRef{flp, schedulerp, VAccess::READWRITE}, "resume"};
|
||||
@@ -201,7 +201,7 @@ TimingKit prepareTiming(AstNetlist* const netlistp) {
|
||||
m_postUpdatesr = AstNode::addNext(m_postUpdatesr, postp->makeStmt());
|
||||
}
|
||||
// Put it in an active and put that in the global resume function
|
||||
auto* const activep = new AstActive{flp, "_timing", sensesp};
|
||||
auto* const activep = new AstActive{flp, "_timing", sentreep};
|
||||
activep->addStmtsp(resumep->makeStmt());
|
||||
m_lbs.emplace_back(m_scopeTopp, activep);
|
||||
}
|
||||
@@ -232,10 +232,10 @@ TimingKit prepareTiming(AstNetlist* const netlistp) {
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstCAwait* nodep) override {
|
||||
if (AstSenTree* const sensesp = nodep->sensesp()) {
|
||||
if (!sensesp->user1SetOnce()) createResumeActive(nodep);
|
||||
nodep->clearSensesp(); // Clear as these sentrees will get deleted later
|
||||
if (m_inProcess) m_processDomains.insert(sensesp);
|
||||
if (AstSenTree* const sentreep = nodep->sentreep()) {
|
||||
if (!sentreep->user1SetOnce()) createResumeActive(nodep);
|
||||
nodep->clearSentreep(); // Clear as these sentrees will get deleted later
|
||||
if (m_inProcess) m_processDomains.insert(sentreep);
|
||||
}
|
||||
}
|
||||
void visit(AstNodeVarRef* nodep) override {
|
||||
|
||||
Reference in New Issue
Block a user