tcl sta::endpoint_violation_count
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
2d3123c20b
commit
2f9541386d
|
|
@ -170,8 +170,6 @@ public:
|
|||
void deleteFilter();
|
||||
void deleteFilteredArrivals();
|
||||
|
||||
// Endpoints are discovered during arrival search, so are only
|
||||
// defined after findArrivals.
|
||||
VertexSet *endpoints();
|
||||
void endpointsInvalid();
|
||||
|
||||
|
|
|
|||
|
|
@ -927,7 +927,8 @@ public:
|
|||
void arrivalsInvalid();
|
||||
void visitStartpoints(VertexVisitor *visitor);
|
||||
void visitEndpoints(VertexVisitor *visitor);
|
||||
int endpointCount();
|
||||
VertexSet *endpoints();
|
||||
int endpointViolationCount(const MinMax *min_max);
|
||||
// Find the fanin vertices for a group path.
|
||||
// Vertices in the clock network are NOT included.
|
||||
// Return value is owned by the caller.
|
||||
|
|
|
|||
|
|
@ -2639,24 +2639,22 @@ 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() const { return new EndpointCounter; }
|
||||
protected:
|
||||
int count_;
|
||||
};
|
||||
|
||||
int
|
||||
Sta::endpointCount()
|
||||
VertexSet *
|
||||
Sta::endpoints()
|
||||
{
|
||||
ensureGraph();
|
||||
EndpointCounter counter;
|
||||
search_->visitEndpoints(&counter);
|
||||
return counter.count();
|
||||
return search_->endpoints();
|
||||
}
|
||||
|
||||
int
|
||||
Sta::endpointViolationCount(const MinMax *min_max)
|
||||
{
|
||||
int violations = 0;
|
||||
for (Vertex *end : *search_->endpoints()) {
|
||||
if (vertexSlack(end, min_max) < 0.0)
|
||||
violations++;
|
||||
}
|
||||
return violations;
|
||||
}
|
||||
|
||||
PinSet *
|
||||
|
|
|
|||
|
|
@ -5501,7 +5501,13 @@ port_location(const Port *port)
|
|||
int
|
||||
endpoint_count()
|
||||
{
|
||||
return Sta::sta()->endpointCount();
|
||||
return Sta::sta()->endpoints()->size();
|
||||
}
|
||||
|
||||
int
|
||||
endpoint_violation_count(const MinMax *min_max)
|
||||
{
|
||||
return Sta::sta()->endpointViolationCount(min_max);
|
||||
}
|
||||
|
||||
%} // inline
|
||||
|
|
|
|||
Loading…
Reference in New Issue