Sta::vertexRequired
This commit is contained in:
parent
80a89105a6
commit
6aad0b073c
|
|
@ -123,6 +123,11 @@ public:
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
|
VertexPathIterator(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const PathAnalysisPt *path_ap,
|
||||||
|
const MinMax *min_max,
|
||||||
|
const StaState *sta);
|
||||||
virtual ~VertexPathIterator();
|
virtual ~VertexPathIterator();
|
||||||
virtual bool hasNext();
|
virtual bool hasNext();
|
||||||
virtual PathVertex *next();
|
virtual PathVertex *next();
|
||||||
|
|
|
||||||
|
|
@ -946,28 +946,16 @@ public:
|
||||||
VertexPathIterator *vertexPathIterator(Vertex *vertex,
|
VertexPathIterator *vertexPathIterator(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
void
|
PathRef vertexWorstArrivalPath(Vertex *vertex,
|
||||||
vertexWorstArrivalPath(Vertex *vertex,
|
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max);
|
||||||
// Return value.
|
PathRef vertexWorstArrivalPath(Vertex *vertex,
|
||||||
PathRef &worst_path);
|
const MinMax *min_max);
|
||||||
void
|
PathRef vertexWorstSlackPath(Vertex *vertex,
|
||||||
vertexWorstArrivalPath(Vertex *vertex,
|
const MinMax *min_max);
|
||||||
const MinMax *min_max,
|
PathRef vertexWorstSlackPath(Vertex *vertex,
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path);
|
|
||||||
void
|
|
||||||
vertexWorstSlackPath(Vertex *vertex,
|
|
||||||
const MinMax *min_max,
|
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path);
|
|
||||||
void
|
|
||||||
vertexWorstSlackPath(Vertex *vertex,
|
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max);
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path);
|
|
||||||
|
|
||||||
// The following arrival/required/slack functions incrementally
|
// The following arrival/required/slack functions incrementally
|
||||||
// update timing to the level of the vertex. They do NOT do multiple
|
// update timing to the level of the vertex. They do NOT do multiple
|
||||||
|
|
@ -983,6 +971,9 @@ public:
|
||||||
const PathAnalysisPt *path_ap);
|
const PathAnalysisPt *path_ap);
|
||||||
Required vertexRequired(Vertex *vertex,
|
Required vertexRequired(Vertex *vertex,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
|
Required vertexRequired(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const MinMax *min_max);
|
||||||
// Min/max across all clock tags.
|
// Min/max across all clock tags.
|
||||||
Required vertexRequired(Vertex *vertex,
|
Required vertexRequired(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
|
|
@ -1283,6 +1274,11 @@ protected:
|
||||||
const ClockEdge *clk_edge,
|
const ClockEdge *clk_edge,
|
||||||
const PathAnalysisPt *path_ap);
|
const PathAnalysisPt *path_ap);
|
||||||
void findRequired(Vertex *vertex);
|
void findRequired(Vertex *vertex);
|
||||||
|
Required vertexRequired(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const ClockEdge *clk_edge,
|
||||||
|
const PathAnalysisPt *path_ap,
|
||||||
|
const MinMax *min_max);
|
||||||
void connectDrvrPinAfter(Vertex *vertex);
|
void connectDrvrPinAfter(Vertex *vertex);
|
||||||
void connectLoadPinAfter(Vertex *vertex);
|
void connectLoadPinAfter(Vertex *vertex);
|
||||||
Path *latchEnablePath(Path *q_path,
|
Path *latchEnablePath(Path *q_path,
|
||||||
|
|
|
||||||
|
|
@ -542,6 +542,24 @@ VertexPathIterator::VertexPathIterator(Vertex *vertex,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VertexPathIterator::VertexPathIterator(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const PathAnalysisPt *path_ap,
|
||||||
|
const MinMax *min_max,
|
||||||
|
const StaState *sta) :
|
||||||
|
search_(sta->search()),
|
||||||
|
vertex_(vertex),
|
||||||
|
rf_(rf),
|
||||||
|
path_ap_(path_ap),
|
||||||
|
min_max_(min_max)
|
||||||
|
{
|
||||||
|
TagGroup *tag_group = search_->tagGroup(vertex);
|
||||||
|
if (tag_group) {
|
||||||
|
arrival_iter_.init(tag_group->arrivalMap());
|
||||||
|
findNext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
VertexPathIterator::~VertexPathIterator()
|
VertexPathIterator::~VertexPathIterator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2677,13 +2677,12 @@ Sta::vertexPathIterator(Vertex *vertex,
|
||||||
return new VertexPathIterator(vertex, rf, min_max, this);
|
return new VertexPathIterator(vertex, rf, min_max, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
PathRef
|
||||||
Sta::vertexWorstArrivalPath(Vertex *vertex,
|
Sta::vertexWorstArrivalPath(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max)
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path)
|
|
||||||
{
|
{
|
||||||
|
PathRef worst_path;
|
||||||
Arrival worst_arrival = min_max->initValue();
|
Arrival worst_arrival = min_max->initValue();
|
||||||
VertexPathIterator path_iter(vertex, rf, min_max, this);
|
VertexPathIterator path_iter(vertex, rf, min_max, this);
|
||||||
while (path_iter.hasNext()) {
|
while (path_iter.hasNext()) {
|
||||||
|
|
@ -2695,35 +2694,22 @@ Sta::vertexWorstArrivalPath(Vertex *vertex,
|
||||||
worst_path.init(path);
|
worst_path.init(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return worst_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
PathRef
|
||||||
Sta::vertexWorstArrivalPath(Vertex *vertex,
|
Sta::vertexWorstArrivalPath(Vertex *vertex,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max)
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path)
|
|
||||||
{
|
{
|
||||||
Arrival worst_arrival = min_max->initValue();
|
return vertexWorstArrivalPath(vertex, nullptr, min_max);
|
||||||
VertexPathIterator path_iter(vertex, this);
|
|
||||||
while (path_iter.hasNext()) {
|
|
||||||
PathVertex *path = path_iter.next();
|
|
||||||
Arrival arrival = path->arrival(this);
|
|
||||||
if (path->minMax(this) == min_max
|
|
||||||
&& !path->tag(this)->isGenClkSrcPath()
|
|
||||||
&& delayGreater(arrival, worst_arrival, min_max, this)) {
|
|
||||||
worst_arrival = arrival;
|
|
||||||
worst_path.init(path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
PathRef
|
||||||
Sta::vertexWorstSlackPath(Vertex *vertex,
|
Sta::vertexWorstSlackPath(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max)
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path)
|
|
||||||
{
|
{
|
||||||
|
PathRef worst_path;
|
||||||
Slack min_slack = MinMax::min()->initValue();
|
Slack min_slack = MinMax::min()->initValue();
|
||||||
VertexPathIterator path_iter(vertex, rf, min_max, this);
|
VertexPathIterator path_iter(vertex, rf, min_max, this);
|
||||||
while (path_iter.hasNext()) {
|
while (path_iter.hasNext()) {
|
||||||
|
|
@ -2735,28 +2721,15 @@ Sta::vertexWorstSlackPath(Vertex *vertex,
|
||||||
worst_path.init(path);
|
worst_path.init(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return worst_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
PathRef
|
||||||
Sta::vertexWorstSlackPath(Vertex *vertex,
|
Sta::vertexWorstSlackPath(Vertex *vertex,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max)
|
||||||
// Return value.
|
|
||||||
PathRef &worst_path)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Slack min_slack = MinMax::min()->initValue();
|
return vertexWorstSlackPath(vertex, nullptr, min_max);
|
||||||
VertexPathIterator path_iter(vertex, this);
|
|
||||||
while (path_iter.hasNext()) {
|
|
||||||
PathVertex *path = path_iter.next();
|
|
||||||
if (path->minMax(this) == min_max
|
|
||||||
&& !path->tag(this)->isGenClkSrcPath()) {
|
|
||||||
Slack slack = path->slack(this);
|
|
||||||
if (delayLess(slack, min_slack, this)) {
|
|
||||||
min_slack = slack;
|
|
||||||
worst_path.init(path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Arrival
|
Arrival
|
||||||
|
|
@ -2795,19 +2768,15 @@ Required
|
||||||
Sta::vertexRequired(Vertex *vertex,
|
Sta::vertexRequired(Vertex *vertex,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
findRequired(vertex);
|
return vertexRequired(vertex, nullptr, clk_edge_wildcard, nullptr, min_max);
|
||||||
const MinMax *req_min_max = min_max->opposite();
|
|
||||||
Required required = req_min_max->initValue();
|
|
||||||
VertexPathIterator path_iter(vertex, this);
|
|
||||||
while (path_iter.hasNext()) {
|
|
||||||
const Path *path = path_iter.next();
|
|
||||||
if (path->minMax(this) == min_max) {
|
|
||||||
const Required path_required = path->required(this);
|
|
||||||
if (delayGreater(path_required, required, req_min_max, this))
|
|
||||||
required = path_required;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return required;
|
Required
|
||||||
|
Sta::vertexRequired(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const MinMax *min_max)
|
||||||
|
{
|
||||||
|
return vertexRequired(vertex, rf, clk_edge_wildcard, nullptr, min_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
Required
|
Required
|
||||||
|
|
@ -2815,7 +2784,7 @@ Sta::vertexRequired(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const PathAnalysisPt *path_ap)
|
const PathAnalysisPt *path_ap)
|
||||||
{
|
{
|
||||||
return vertexRequired(vertex, rf, clk_edge_wildcard, path_ap);
|
return vertexRequired(vertex, rf, clk_edge_wildcard, path_ap, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Required
|
Required
|
||||||
|
|
@ -2823,17 +2792,29 @@ Sta::vertexRequired(Vertex *vertex,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const ClockEdge *clk_edge,
|
const ClockEdge *clk_edge,
|
||||||
const PathAnalysisPt *path_ap)
|
const PathAnalysisPt *path_ap)
|
||||||
|
{
|
||||||
|
return vertexRequired(vertex, rf, clk_edge, path_ap, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
Required
|
||||||
|
Sta::vertexRequired(Vertex *vertex,
|
||||||
|
const RiseFall *rf,
|
||||||
|
const ClockEdge *clk_edge,
|
||||||
|
const PathAnalysisPt *path_ap,
|
||||||
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
findRequired(vertex);
|
findRequired(vertex);
|
||||||
const MinMax *min_max = path_ap->pathMinMax()->opposite();
|
const MinMax *req_min_max = min_max
|
||||||
Required required = min_max->initValue();
|
? min_max->opposite()
|
||||||
VertexPathIterator path_iter(vertex, rf, path_ap, this);
|
: path_ap->pathMinMax()->opposite();
|
||||||
|
Required required = req_min_max->initValue();
|
||||||
|
VertexPathIterator path_iter(vertex, rf, path_ap, min_max, this);
|
||||||
while (path_iter.hasNext()) {
|
while (path_iter.hasNext()) {
|
||||||
const Path *path = path_iter.next();
|
const Path *path = path_iter.next();
|
||||||
const Required path_required = path->required(this);
|
const Required path_required = path->required(this);
|
||||||
if ((clk_edge == clk_edge_wildcard
|
if ((clk_edge == clk_edge_wildcard
|
||||||
|| path->clkEdge(search_) == clk_edge)
|
|| path->clkEdge(search_) == clk_edge)
|
||||||
&& delayGreater(path_required, required, min_max, this))
|
&& delayGreater(path_required, required, req_min_max, this))
|
||||||
required = path_required;
|
required = path_required;
|
||||||
}
|
}
|
||||||
return required;
|
return required;
|
||||||
|
|
|
||||||
|
|
@ -4657,8 +4657,7 @@ vertex_worst_arrival_path(Vertex *vertex,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
PathRef path;
|
PathRef path = sta->vertexWorstArrivalPath(vertex, min_max);
|
||||||
sta->vertexWorstArrivalPath(vertex, min_max, path);
|
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
else
|
else
|
||||||
|
|
@ -4671,8 +4670,7 @@ vertex_worst_arrival_path_rf(Vertex *vertex,
|
||||||
MinMax *min_max)
|
MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
PathRef path;
|
PathRef path = sta->vertexWorstArrivalPath(vertex, rf, min_max);
|
||||||
sta->vertexWorstArrivalPath(vertex, rf, min_max, path);
|
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
else
|
else
|
||||||
|
|
@ -4684,8 +4682,7 @@ vertex_worst_slack_path(Vertex *vertex,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
PathRef path;
|
PathRef path = sta->vertexWorstSlackPath(vertex, min_max);
|
||||||
sta->vertexWorstSlackPath(vertex, min_max, path);
|
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue