Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-04-24 10:57:18 -07:00
parent eb8d39a7dd
commit 03d2a48f46
6 changed files with 16 additions and 22 deletions

View File

@ -128,8 +128,8 @@ ClkInfo::crprClkPath(const StaState *sta) const
return Path::vertexPath(crpr_clk_path_, sta); return Path::vertexPath(crpr_clk_path_, sta);
} }
const char * std::string
ClkInfo::asString(const StaState *sta) const ClkInfo::to_string(const StaState *sta) const
{ {
Network *network = sta->network(); Network *network = sta->network();
Corners *corners = sta->corners(); Corners *corners = sta->corners();
@ -160,9 +160,7 @@ ClkInfo::asString(const StaState *sta) const
if (is_gen_clk_src_path_) if (is_gen_clk_src_path_)
result += " genclk"; result += " genclk";
char *tmp = makeTmpString(result.size() + 1); return result;
strcpy(tmp, result.c_str());
return tmp;
} }
const Clock * const Clock *

View File

@ -49,7 +49,7 @@ public:
Path *crpr_clk_path, Path *crpr_clk_path,
const StaState *sta); const StaState *sta);
~ClkInfo(); ~ClkInfo();
const char *asString(const StaState *sta) const; std::string to_string(const StaState *sta) const;
const ClockEdge *clkEdge() const { return clk_edge_; } const ClockEdge *clkEdge() const { return clk_edge_; }
const Clock *clock() const; const Clock *clock() const;
const Pin *clkSrc() const { return clk_src_; } const Pin *clkSrc() const { return clk_src_; }

View File

@ -2965,7 +2965,7 @@ Search::reportClkInfos() const
clk_infos.push_back(clk_info); clk_infos.push_back(clk_info);
sort(clk_infos, ClkInfoLess(this)); sort(clk_infos, ClkInfoLess(this));
for (ClkInfo *clk_info : clk_infos) for (ClkInfo *clk_info : clk_infos)
report_->reportLine("%s", clk_info->asString(this)); report_->reportLine("%s", clk_info->to_string(this).c_str());
report_->reportLine("%zu clk infos", clk_info_set_->size()); report_->reportLine("%zu clk infos", clk_info_set_->size());
} }

View File

@ -541,7 +541,7 @@ Sta::~Sta()
delete clk_skews_; delete clk_skews_;
delete check_timing_; delete check_timing_;
delete report_path_; delete report_path_;
// Constraints reference search filter, so delete search first. // Sdc references search filter, so delete search first.
delete search_; delete search_;
delete latches_; delete latches_;
delete parasitics_; delete parasitics_;
@ -4598,7 +4598,7 @@ Sta::deletePinBefore(const Pin *pin)
Edge *edge = in_edge_iter.next(); Edge *edge = in_edge_iter.next();
if (edge->role()->isWire()) { if (edge->role()->isWire()) {
Vertex *from = edge->from(graph_); Vertex *from = edge->from(graph_);
// Only notify from vertex (to vertex will be deleted). // Only notify to_vertex (from_vertex will be deleted).
search_->requiredInvalid(from); search_->requiredInvalid(from);
} }
levelize_->deleteEdgeBefore(edge); levelize_->deleteEdgeBefore(edge);

View File

@ -293,25 +293,22 @@ bool
TagLess::operator()(const Tag *tag1, TagLess::operator()(const Tag *tag1,
const Tag *tag2) const const Tag *tag2) const
{ {
return tagCmp(tag1, tag2, true) < 0; return tagCmp(tag1, tag2) < 0;
} }
int int
tagCmp(const Tag *tag1, tagCmp(const Tag *tag1,
const Tag *tag2, const Tag *tag2)
bool cmp_rf)
{ {
if (tag1 == tag2) if (tag1 == tag2)
return 0; return 0;
if (cmp_rf) {
int rf_index1 = tag1->rfIndex(); int rf_index1 = tag1->rfIndex();
int rf_index2 = tag2->rfIndex(); int rf_index2 = tag2->rfIndex();
if (rf_index1 < rf_index2) if (rf_index1 < rf_index2)
return -1; return -1;
if (rf_index1 > rf_index2) if (rf_index1 > rf_index2)
return 1; return 1;
}
PathAPIndex path_ap_index1 = tag1->pathAPIndex(); PathAPIndex path_ap_index1 = tag1->pathAPIndex();
PathAPIndex path_ap_index2 = tag2->pathAPIndex(); PathAPIndex path_ap_index2 = tag2->pathAPIndex();

View File

@ -138,8 +138,7 @@ public:
int int
tagCmp(const Tag *tag1, tagCmp(const Tag *tag1,
const Tag *tag2, const Tag *tag2);
bool cmp_rf);
// Match tag clock edge, clock driver and exception states but not clk info. // Match tag clock edge, clock driver and exception states but not clk info.
bool bool