Search::reportArrivals
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
91651796c2
commit
0f40a90e8c
|
|
@ -34,15 +34,6 @@
|
|||
|
||||
namespace sta {
|
||||
|
||||
static bool
|
||||
clkInfoEqual(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta);
|
||||
static int
|
||||
clkInfoCmp(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta);
|
||||
|
||||
ClkInfo::ClkInfo(const ClockEdge *clk_edge,
|
||||
const Pin *clk_src,
|
||||
bool is_propagated,
|
||||
|
|
@ -210,7 +201,7 @@ ClkInfoEqual::operator()(const ClkInfo *clk_info1,
|
|||
return clkInfoEqual(clk_info1, clk_info2, sta_);
|
||||
}
|
||||
|
||||
static bool
|
||||
bool
|
||||
clkInfoEqual(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta)
|
||||
|
|
@ -253,7 +244,7 @@ ClkInfoLess::operator()(const ClkInfo *clk_info1,
|
|||
return clkInfoCmp(clk_info1, clk_info2, sta_) < 0;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
clkInfoCmp(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta)
|
||||
|
|
|
|||
|
|
@ -93,6 +93,15 @@ private:
|
|||
unsigned int path_ap_index_:path_ap_index_bit_count;
|
||||
};
|
||||
|
||||
int
|
||||
clkInfoCmp(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta);
|
||||
bool
|
||||
clkInfoEqual(const ClkInfo *clk_info1,
|
||||
const ClkInfo *clk_info2,
|
||||
const StaState *sta);
|
||||
|
||||
class ClkInfoLess
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -2760,6 +2760,30 @@ Search::setVertexArrivals(Vertex *vertex,
|
|||
}
|
||||
}
|
||||
|
||||
class ReportPathLess
|
||||
{
|
||||
public:
|
||||
ReportPathLess(const StaState *sta);
|
||||
bool operator()(const Path *path1,
|
||||
const Path *path2) const;
|
||||
|
||||
private:
|
||||
const StaState *sta_;
|
||||
};
|
||||
|
||||
|
||||
ReportPathLess::ReportPathLess(const StaState *sta) :
|
||||
sta_(sta)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
ReportPathLess::operator()(const Path *path1,
|
||||
const Path *path2) const
|
||||
{
|
||||
return tagCmp(path1->tag(sta_), path2->tag(sta_), sta_) < 0;
|
||||
}
|
||||
|
||||
void
|
||||
Search::reportArrivals(Vertex *vertex) const
|
||||
{
|
||||
|
|
@ -2767,9 +2791,14 @@ Search::reportArrivals(Vertex *vertex) const
|
|||
TagGroup *tag_group = tagGroup(vertex);
|
||||
if (tag_group) {
|
||||
report_->reportLine("Group %u", tag_group->index());
|
||||
std::vector<const Path*> paths;
|
||||
VertexPathIterator path_iter(vertex, this);
|
||||
while (path_iter.hasNext()) {
|
||||
const Path *path = path_iter.next();
|
||||
paths.push_back(path);
|
||||
}
|
||||
sort(paths.begin(), paths.end(), ReportPathLess(this));
|
||||
for (const Path *path : paths) {
|
||||
const Tag *tag = path->tag(this);
|
||||
const PathAnalysisPt *path_ap = tag->pathAnalysisPt(this);
|
||||
const RiseFall *rf = tag->transition();
|
||||
|
|
|
|||
|
|
@ -289,26 +289,31 @@ Tag::matchHash(bool match_crpr_clk_pin,
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
TagLess::TagLess(const StaState *sta) :
|
||||
sta_(sta)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
TagLess::operator()(const Tag *tag1,
|
||||
const Tag *tag2) const
|
||||
{
|
||||
return tagCmp(tag1, tag2) < 0;
|
||||
return tagCmp(tag1, tag2, sta_) < 0;
|
||||
}
|
||||
|
||||
int
|
||||
tagCmp(const Tag *tag1,
|
||||
const Tag *tag2)
|
||||
const Tag *tag2,
|
||||
const StaState *sta)
|
||||
{
|
||||
if (tag1 == tag2)
|
||||
return 0;
|
||||
|
||||
int rf_index1 = tag1->rfIndex();
|
||||
int rf_index2 = tag2->rfIndex();
|
||||
if (rf_index1 < rf_index2)
|
||||
return -1;
|
||||
if (rf_index1 > rf_index2)
|
||||
return 1;
|
||||
ClkInfo *clk_info1 = tag1->clkInfo();
|
||||
ClkInfo *clk_info2 = tag2->clkInfo();
|
||||
int clk_cmp = clkInfoCmp(clk_info1, clk_info2, sta);
|
||||
if (clk_cmp != 0)
|
||||
return clk_cmp;
|
||||
|
||||
PathAPIndex path_ap_index1 = tag1->pathAPIndex();
|
||||
PathAPIndex path_ap_index2 = tag2->pathAPIndex();
|
||||
|
|
@ -317,11 +322,11 @@ tagCmp(const Tag *tag1,
|
|||
if (path_ap_index1 > path_ap_index2)
|
||||
return 1;
|
||||
|
||||
size_t clk_info1 = tag1->clkInfo()->hash();
|
||||
size_t clk_info2 = tag2->clkInfo()->hash();
|
||||
if (clk_info1 < clk_info2)
|
||||
int rf_index1 = tag1->rfIndex();
|
||||
int rf_index2 = tag2->rfIndex();
|
||||
if (rf_index1 < rf_index2)
|
||||
return -1;
|
||||
if (clk_info1 > clk_info2)
|
||||
if (rf_index1 > rf_index2)
|
||||
return 1;
|
||||
|
||||
bool is_clk1 = tag1->isClock();
|
||||
|
|
|
|||
|
|
@ -112,8 +112,12 @@ private:
|
|||
class TagLess
|
||||
{
|
||||
public:
|
||||
TagLess(const StaState *sta);
|
||||
bool operator()(const Tag *tag1,
|
||||
const Tag *tag2) const;
|
||||
|
||||
private:
|
||||
const StaState *sta_;
|
||||
};
|
||||
|
||||
class TagIndexLess
|
||||
|
|
@ -138,7 +142,8 @@ public:
|
|||
|
||||
int
|
||||
tagCmp(const Tag *tag1,
|
||||
const Tag *tag2);
|
||||
const Tag *tag2,
|
||||
const StaState *sta);
|
||||
|
||||
// Match tag clock edge, clock driver and exception states but not clk info.
|
||||
bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue