Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Matt Liberty 2025-11-07 04:44:07 +00:00
commit d7cb9be1ca
6 changed files with 75 additions and 23 deletions

View File

@ -170,6 +170,19 @@ public:
PathGroupSeq pathGroups(const PathEnd *path_end) const; PathGroupSeq pathGroups(const PathEnd *path_end) const;
void deletePathGroups(); void deletePathGroups();
void makePathGroups(int group_path_count,
int endpoint_path_count,
bool unique_pins,
bool unique_edges,
float min_slack,
float max_slack,
PathGroupNameSet *group_names,
bool setup,
bool hold,
bool recovery,
bool removal,
bool clk_gating_setup,
bool clk_gating_hold);
virtual ExceptionPath *exceptionTo(ExceptionPathType type, virtual ExceptionPath *exceptionTo(ExceptionPathType type,
const Path *path, const Path *path,
const Pin *pin, const Pin *pin,
@ -281,6 +294,7 @@ public:
BfsFwdIterator *arrivalIterator() const { return arrival_iter_; } BfsFwdIterator *arrivalIterator() const { return arrival_iter_; }
BfsBkwdIterator *requiredIterator() const { return required_iter_; } BfsBkwdIterator *requiredIterator() const { return required_iter_; }
bool arrivalsAtEndpointsExist()const{return arrivals_at_endpoints_exist_;} bool arrivalsAtEndpointsExist()const{return arrivals_at_endpoints_exist_;}
// Used by OpenROAD.
bool makeUnclkedPaths(Vertex *vertex, bool makeUnclkedPaths(Vertex *vertex,
bool is_segment_start, bool is_segment_start,
bool require_exception, bool require_exception,

View File

@ -565,14 +565,23 @@ TimingArc::~TimingArc()
string string
TimingArc::to_string() const TimingArc::to_string() const
{ {
string str = set_->from()->name(); if (set_->role()->isWire()) {
str += " "; string str = "wire ";
str += from_rf_->to_string(); str += from_rf_->to_string();
str += " -> "; str += " -> ";
str += set_->to()->name(); str += to_rf_->to_string();
str += " "; return str;
str += to_rf_->to_string(); }
return str; else {
string str = set_->from()->name();
str += " ";
str += from_rf_->to_string();
str += " -> ";
str += set_->to()->name();
str += " ";
str += to_rf_->to_string();
return str;
}
} }
GateTimingModel * GateTimingModel *

View File

@ -179,9 +179,9 @@ ClkInfo::to_string(const StaState *sta) const
result += network->pathName(gen_clk_src_); result += network->pathName(gen_clk_src_);
} }
if (insertion_ > 0.0) { if (delayGreater(insertion_, 0.0, sta)) {
result += " insert"; result += " insert";
result += std::to_string(insertion_); result += delayAsString(insertion_, sta);
} }
if (uncertainties_) { if (uncertainties_) {

View File

@ -394,7 +394,7 @@ PathEnumFaninVisitor::visitEdge(const Pin *from_pin,
bool bool
PathEnumFaninVisitor::visitFromToPath(const Pin *, PathEnumFaninVisitor::visitFromToPath(const Pin *,
Vertex *from_vertex, Vertex *from_vertex,
const RiseFall *, const RiseFall *from_rf,
Tag *, Tag *,
Path *from_path, Path *from_path,
const Arrival &, const Arrival &,
@ -410,6 +410,7 @@ PathEnumFaninVisitor::visitFromToPath(const Pin *,
{ {
// These paths fanin to before_div_ so we know to_vertex matches. // These paths fanin to before_div_ so we know to_vertex matches.
if ((!unique_pins_ || from_vertex != prev_vertex_) if ((!unique_pins_ || from_vertex != prev_vertex_)
&& (!unique_edges_ || from_rf != prev_arc_->fromEdge()->asRiseFall())
&& arc != prev_arc_ && arc != prev_arc_
&& Tag::matchNoCrpr(to_tag, before_div_tag_) && Tag::matchNoCrpr(to_tag, before_div_tag_)
// Ignore paths that only differ by crpr from same vertex/edge. // Ignore paths that only differ by crpr from same vertex/edge.
@ -449,9 +450,14 @@ PathEnumFaninVisitor::insertUniqueEdgeDiv(Diversion *div)
const Vertex *div_vertex = div_path->vertex(this); const Vertex *div_vertex = div_path->vertex(this);
const RiseFall *div_rf = div_path->transition(this); const RiseFall *div_rf = div_path->transition(this);
auto itr = unique_edge_divs_.find({div_vertex, div_rf}); auto itr = unique_edge_divs_.find({div_vertex, div_rf});
if (itr == unique_edge_divs_.end() if (itr == unique_edge_divs_.end())
|| div_slack > itr->second->pathEnd()->slack(this)) unique_edge_divs_[{div_vertex, div_rf}] = div;
else if (delayGreater(div_slack, itr->second->pathEnd()->slack(this), this)) {
deleteDiversionPathEnd(itr->second);
itr->second = div; itr->second = div;
}
else
deleteDiversionPathEnd(div);
} }
void void

View File

@ -467,15 +467,12 @@ Search::findPathEnds(ExceptionFrom *from,
recovery = removal = false; recovery = removal = false;
if (!variables_->gatedClkChecksEnabled()) if (!variables_->gatedClkChecksEnabled())
clk_gating_setup = clk_gating_hold = false; clk_gating_setup = clk_gating_hold = false;
path_groups_ = new PathGroups(group_path_count, endpoint_path_count, makePathGroups(group_path_count, endpoint_path_count,
unique_pins, unique_edges, unique_pins, unique_edges,
slack_min, slack_max, slack_min, slack_max,
group_names, group_names, setup, hold,
setup, hold, recovery, removal,
recovery, removal, clk_gating_setup, clk_gating_hold);
clk_gating_setup, clk_gating_hold,
unconstrained_paths_,
this);
ensureDownstreamClkPins(); ensureDownstreamClkPins();
PathEndSeq path_ends = path_groups_->makePathEnds(to, unconstrained_paths_, PathEndSeq path_ends = path_groups_->makePathEnds(to, unconstrained_paths_,
corner, min_max, corner, min_max,
@ -509,6 +506,32 @@ Search::findFilteredArrivals(ExceptionFrom *from,
findAllArrivals(thru_latches); findAllArrivals(thru_latches);
} }
void
Search::makePathGroups(int group_path_count,
int endpoint_path_count,
bool unique_pins,
bool unique_edges,
float slack_min,
float slack_max,
PathGroupNameSet *group_names,
bool setup,
bool hold,
bool recovery,
bool removal,
bool clk_gating_setup,
bool clk_gating_hold)
{
path_groups_ = new PathGroups(group_path_count, endpoint_path_count,
unique_pins, unique_edges,
slack_min, slack_max,
group_names,
setup, hold,
recovery, removal,
clk_gating_setup, clk_gating_hold,
unconstrained_paths_,
this);
}
// From/thrus/to are used to make a filter exception. If the last // From/thrus/to are used to make a filter exception. If the last
// search used a filter arrival/required times were only found for a // search used a filter arrival/required times were only found for a
// subset of the paths. Delete the paths that have a filter // subset of the paths. Delete the paths that have a filter

View File

@ -260,7 +260,7 @@ endpoint_slack(const Pin *pin,
sta->ensureLibLinked(); sta->ensureLibLinked();
if (sta->isPathGroupName(path_group_name)) { if (sta->isPathGroupName(path_group_name)) {
Slack slack = sta->endpointSlack(pin, std::string(path_group_name), min_max); Slack slack = sta->endpointSlack(pin, std::string(path_group_name), min_max);
return sta->units()->timeUnit()->staToUser(slack); return sta->units()->timeUnit()->staToUser(delayAsFloat(slack));
} }
else { else {
sta->report()->error(1577, "%s is not a known path group name.", sta->report()->error(1577, "%s is not a known path group name.",