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;
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,
const Path *path,
const Pin *pin,
@ -281,6 +294,7 @@ public:
BfsFwdIterator *arrivalIterator() const { return arrival_iter_; }
BfsBkwdIterator *requiredIterator() const { return required_iter_; }
bool arrivalsAtEndpointsExist()const{return arrivals_at_endpoints_exist_;}
// Used by OpenROAD.
bool makeUnclkedPaths(Vertex *vertex,
bool is_segment_start,
bool require_exception,

View File

@ -565,6 +565,14 @@ TimingArc::~TimingArc()
string
TimingArc::to_string() const
{
if (set_->role()->isWire()) {
string str = "wire ";
str += from_rf_->to_string();
str += " -> ";
str += to_rf_->to_string();
return str;
}
else {
string str = set_->from()->name();
str += " ";
str += from_rf_->to_string();
@ -574,6 +582,7 @@ TimingArc::to_string() const
str += to_rf_->to_string();
return str;
}
}
GateTimingModel *
TimingArc::gateModel(const DcalcAnalysisPt *dcalc_ap) const

View File

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

View File

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

View File

@ -467,15 +467,12 @@ Search::findPathEnds(ExceptionFrom *from,
recovery = removal = false;
if (!variables_->gatedClkChecksEnabled())
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,
slack_min, slack_max,
group_names,
setup, hold,
group_names, setup, hold,
recovery, removal,
clk_gating_setup, clk_gating_hold,
unconstrained_paths_,
this);
clk_gating_setup, clk_gating_hold);
ensureDownstreamClkPins();
PathEndSeq path_ends = path_groups_->makePathEnds(to, unconstrained_paths_,
corner, min_max,
@ -509,6 +506,32 @@ Search::findFilteredArrivals(ExceptionFrom *from,
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
// search used a filter arrival/required times were only found for a
// subset of the paths. Delete the paths that have a filter

View File

@ -260,7 +260,7 @@ endpoint_slack(const Pin *pin,
sta->ensureLibLinked();
if (sta->isPathGroupName(path_group_name)) {
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 {
sta->report()->error(1577, "%s is not a known path group name.",