sta::endpoint_count
This commit is contained in:
parent
a5703903e0
commit
8cf84facee
|
|
@ -903,6 +903,7 @@ public:
|
|||
void arrivalsInvalid();
|
||||
void visitStartpoints(VertexVisitor *visitor);
|
||||
void visitEndpoints(VertexVisitor *visitor);
|
||||
int endpointCount();
|
||||
// Find the fanin vertices for a group path.
|
||||
// Vertices in the clock network are NOT included.
|
||||
// Return value is owned by the caller.
|
||||
|
|
|
|||
|
|
@ -2617,6 +2617,26 @@ Sta::visitEndpoints(VertexVisitor *visitor)
|
|||
search_->visitEndpoints(visitor);
|
||||
}
|
||||
|
||||
class EndpointCounter : public VertexVisitor
|
||||
{
|
||||
public:
|
||||
EndpointCounter() : count_(0) {}
|
||||
virtual void visit(Vertex *) { count_++; }
|
||||
int count() const { return count_; }
|
||||
virtual EndpointCounter *copy() { return new EndpointCounter; }
|
||||
protected:
|
||||
int count_;
|
||||
};
|
||||
|
||||
int
|
||||
Sta::endpointCount()
|
||||
{
|
||||
ensureGraph();
|
||||
EndpointCounter counter;
|
||||
search_->visitEndpoints(&counter);
|
||||
return counter.count();
|
||||
}
|
||||
|
||||
PinSet *
|
||||
Sta::findGroupPathPins(const char *group_path_name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5388,6 +5388,12 @@ pin_location(Pin *pin)
|
|||
return "";
|
||||
}
|
||||
|
||||
int
|
||||
endpoint_count()
|
||||
{
|
||||
return Sta::sta()->endpointCount();
|
||||
}
|
||||
|
||||
%} // inline
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue