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 deleteFilter();
|
||||||
void deleteFilteredArrivals();
|
void deleteFilteredArrivals();
|
||||||
|
|
||||||
// Endpoints are discovered during arrival search, so are only
|
|
||||||
// defined after findArrivals.
|
|
||||||
VertexSet *endpoints();
|
VertexSet *endpoints();
|
||||||
void endpointsInvalid();
|
void endpointsInvalid();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -927,7 +927,8 @@ public:
|
||||||
void arrivalsInvalid();
|
void arrivalsInvalid();
|
||||||
void visitStartpoints(VertexVisitor *visitor);
|
void visitStartpoints(VertexVisitor *visitor);
|
||||||
void visitEndpoints(VertexVisitor *visitor);
|
void visitEndpoints(VertexVisitor *visitor);
|
||||||
int endpointCount();
|
VertexSet *endpoints();
|
||||||
|
int endpointViolationCount(const MinMax *min_max);
|
||||||
// Find the fanin vertices for a group path.
|
// Find the fanin vertices for a group path.
|
||||||
// Vertices in the clock network are NOT included.
|
// Vertices in the clock network are NOT included.
|
||||||
// Return value is owned by the caller.
|
// Return value is owned by the caller.
|
||||||
|
|
|
||||||
|
|
@ -2639,24 +2639,22 @@ Sta::visitEndpoints(VertexVisitor *visitor)
|
||||||
search_->visitEndpoints(visitor);
|
search_->visitEndpoints(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
class EndpointCounter : public VertexVisitor
|
VertexSet *
|
||||||
{
|
Sta::endpoints()
|
||||||
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()
|
|
||||||
{
|
{
|
||||||
ensureGraph();
|
ensureGraph();
|
||||||
EndpointCounter counter;
|
return search_->endpoints();
|
||||||
search_->visitEndpoints(&counter);
|
}
|
||||||
return counter.count();
|
|
||||||
|
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 *
|
PinSet *
|
||||||
|
|
|
||||||
|
|
@ -5501,7 +5501,13 @@ port_location(const Port *port)
|
||||||
int
|
int
|
||||||
endpoint_count()
|
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
|
%} // inline
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue