merge OR OpenSTA PR 211, 213 with tweeks
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
bbffa9b493
commit
fc1a7499ea
|
|
@ -46,20 +46,20 @@ CheckCrpr::CheckCrpr(StaState *sta) :
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
PathVertex *
|
void
|
||||||
CheckCrpr::clkPathPrev(const PathVertex *path,
|
CheckCrpr::clkPathPrev(const PathVertex *path,
|
||||||
PathVertex &tmp)
|
PathVertex &prev)
|
||||||
|
|
||||||
{
|
{
|
||||||
Vertex *vertex = path->vertex(this);
|
Vertex *vertex = path->vertex(this);
|
||||||
int arrival_index;
|
int arrival_index;
|
||||||
bool exists;
|
bool exists;
|
||||||
path->arrivalIndex(arrival_index, exists);
|
path->arrivalIndex(arrival_index, exists);
|
||||||
tmp = clkPathPrev(vertex, arrival_index);
|
PathVertexRep *prevs = graph_->prevPaths(vertex);
|
||||||
if (tmp.isNull())
|
if (prevs)
|
||||||
return nullptr;
|
prev.init(prevs[arrival_index], this);
|
||||||
else
|
else
|
||||||
return &tmp;
|
criticalError(2200, "missing prev paths");
|
||||||
}
|
}
|
||||||
|
|
||||||
PathVertex
|
PathVertex
|
||||||
|
|
@ -70,7 +70,7 @@ CheckCrpr::clkPathPrev(Vertex *vertex,
|
||||||
if (prevs)
|
if (prevs)
|
||||||
return PathVertex(prevs[arrival_index], this);
|
return PathVertex(prevs[arrival_index], this);
|
||||||
else {
|
else {
|
||||||
criticalError(248, "missing prev paths");
|
criticalError(2201, "missing prev paths");
|
||||||
return PathVertex();
|
return PathVertex();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -251,20 +251,30 @@ CheckCrpr::findCrpr(const PathVertex *src_clk_path,
|
||||||
}
|
}
|
||||||
const PathVertex *src_clk_path2 = src_clk_path1;
|
const PathVertex *src_clk_path2 = src_clk_path1;
|
||||||
const PathVertex *tgt_clk_path2 = tgt_clk_path1;
|
const PathVertex *tgt_clk_path2 = tgt_clk_path1;
|
||||||
PathVertex tmp1, tmp2;
|
PathVertex src_prev, tgt_prev;
|
||||||
// src_clk_path and tgt_clk_path are now in the same (gen)clk src path.
|
// src_clk_path and tgt_clk_path are now in the same (gen)clk src path.
|
||||||
// Use the vertex levels to back up the deeper path to see if they
|
// Use the vertex levels to back up the deeper path to see if they
|
||||||
// overlap.
|
// overlap.
|
||||||
while (src_clk_path2 && tgt_clk_path2
|
int src_level = src_clk_path2->vertex(this)->level();
|
||||||
&& src_clk_path2->pin(this) != tgt_clk_path2->pin(this)) {
|
int tgt_level = tgt_clk_path2->vertex(this)->level();
|
||||||
Level src_level = src_clk_path2->vertex(this)->level();
|
while (src_clk_path2->pin(this) != tgt_clk_path2->pin(this)) {
|
||||||
Level tgt_level = tgt_clk_path2->vertex(this)->level();
|
int level_diff = src_level - tgt_level;
|
||||||
if (src_level >= tgt_level)
|
if (level_diff >= 0) {
|
||||||
src_clk_path2 = clkPathPrev(src_clk_path2, tmp1);
|
clkPathPrev(src_clk_path2, src_prev);
|
||||||
if (tgt_level >= src_level)
|
if (src_prev.isNull())
|
||||||
tgt_clk_path2 = clkPathPrev(tgt_clk_path2, tmp2);
|
break;
|
||||||
|
src_clk_path2 = &src_prev;
|
||||||
|
src_level = src_clk_path2->vertex(this)->level();
|
||||||
|
}
|
||||||
|
if (level_diff <= 0) {
|
||||||
|
clkPathPrev(tgt_clk_path2, tgt_prev);
|
||||||
|
if (tgt_prev.isNull())
|
||||||
|
break;
|
||||||
|
tgt_clk_path2 = &tgt_prev;
|
||||||
|
tgt_level = tgt_clk_path2->vertex(this)->level();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (src_clk_path2 && tgt_clk_path2
|
if (!src_clk_path2->isNull() && !tgt_clk_path2->isNull()
|
||||||
&& (src_clk_path2->transition(this) == tgt_clk_path2->transition(this)
|
&& (src_clk_path2->transition(this) == tgt_clk_path2->transition(this)
|
||||||
|| same_pin)) {
|
|| same_pin)) {
|
||||||
debugPrint(debug_, "crpr", 2, "crpr pin %s",
|
debugPrint(debug_, "crpr", 2, "crpr pin %s",
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ public:
|
||||||
int arrival_index);
|
int arrival_index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PathVertex *clkPathPrev(const PathVertex *path,
|
void clkPathPrev(const PathVertex *path,
|
||||||
PathVertex &tmp);
|
PathVertex &prev);
|
||||||
Arrival otherMinMaxArrival(const PathVertex *path);
|
Arrival otherMinMaxArrival(const PathVertex *path);
|
||||||
void checkCrpr1(const Path *src_path,
|
void checkCrpr1(const Path *src_path,
|
||||||
const PathVertex *tgt_clk_path,
|
const PathVertex *tgt_clk_path,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue