mirror of
https://github.com/verilator/verilator.git
synced 2025-01-22 14:24:18 +00:00
Simplify primary input checks
This commit is contained in:
parent
00c1f67c57
commit
3773e2ef95
@ -805,10 +805,9 @@ AstNode* createInputCombLoop(AstNetlist* netlistp, SenExprBuilder& senExprBuilde
|
||||
AstCFunc* const icoFuncp
|
||||
= V3Order::order(netlistp, {&logic}, trigToSen, "ico", false, false,
|
||||
[=](const AstVarScope* vscp, std::vector<AstSenTree*>& out) {
|
||||
if (vscp->scopep()->isTop() && vscp->varp()->isNonOutput()) {
|
||||
out.push_back(inputChanged);
|
||||
}
|
||||
if (vscp->varp()->isWrittenByDpi()) out.push_back(dpiExportTriggered);
|
||||
AstVar* const varp = vscp->varp();
|
||||
if (varp->isPrimaryInish()) out.push_back(inputChanged);
|
||||
if (varp->isWrittenByDpi()) out.push_back(dpiExportTriggered);
|
||||
});
|
||||
splitCheck(icoFuncp);
|
||||
|
||||
|
@ -121,16 +121,15 @@ public:
|
||||
: Vertex{graphp}
|
||||
, m_vscp{vscp} {
|
||||
// Top level inputs are
|
||||
if (isTopInput() || varp()->isWrittenByDpi()) addDrivingRegions(INPUT);
|
||||
if (varp()->isPrimaryInish() || varp()->isWrittenByDpi()) addDrivingRegions(INPUT);
|
||||
}
|
||||
AstVarScope* vscp() const { return m_vscp; }
|
||||
AstVar* varp() const { return m_vscp->varp(); }
|
||||
AstScope* scopep() const { return m_vscp->scopep(); }
|
||||
bool isTopInput() const { return scopep()->isTop() && varp()->isNonOutput(); }
|
||||
|
||||
// For graph dumping
|
||||
string name() const override { return m_vscp->name(); }
|
||||
string dotShape() const override { return isTopInput() ? "invhouse" : "ellipse"; }
|
||||
string dotShape() const override { return varp()->isPrimaryInish() ? "invhouse" : "ellipse"; }
|
||||
};
|
||||
|
||||
class Graph final : public V3Graph {};
|
||||
|
Loading…
Reference in New Issue
Block a user