Skip to content

Commit d7cb9be

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 9610131 + 845729a commit d7cb9be

File tree

6 files changed

+75
-23
lines changed

6 files changed

+75
-23
lines changed

include/sta/Search.hh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,19 @@ public:
170170

171171
PathGroupSeq pathGroups(const PathEnd *path_end) const;
172172
void deletePathGroups();
173+
void makePathGroups(int group_path_count,
174+
int endpoint_path_count,
175+
bool unique_pins,
176+
bool unique_edges,
177+
float min_slack,
178+
float max_slack,
179+
PathGroupNameSet *group_names,
180+
bool setup,
181+
bool hold,
182+
bool recovery,
183+
bool removal,
184+
bool clk_gating_setup,
185+
bool clk_gating_hold);
173186
virtual ExceptionPath *exceptionTo(ExceptionPathType type,
174187
const Path *path,
175188
const Pin *pin,
@@ -281,6 +294,7 @@ public:
281294
BfsFwdIterator *arrivalIterator() const { return arrival_iter_; }
282295
BfsBkwdIterator *requiredIterator() const { return required_iter_; }
283296
bool arrivalsAtEndpointsExist()const{return arrivals_at_endpoints_exist_;}
297+
// Used by OpenROAD.
284298
bool makeUnclkedPaths(Vertex *vertex,
285299
bool is_segment_start,
286300
bool require_exception,

liberty/TimingArc.cc

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,23 @@ TimingArc::~TimingArc()
565565
string
566566
TimingArc::to_string() const
567567
{
568-
string str = set_->from()->name();
569-
str += " ";
570-
str += from_rf_->to_string();
571-
str += " -> ";
572-
str += set_->to()->name();
573-
str += " ";
574-
str += to_rf_->to_string();
575-
return str;
568+
if (set_->role()->isWire()) {
569+
string str = "wire ";
570+
str += from_rf_->to_string();
571+
str += " -> ";
572+
str += to_rf_->to_string();
573+
return str;
574+
}
575+
else {
576+
string str = set_->from()->name();
577+
str += " ";
578+
str += from_rf_->to_string();
579+
str += " -> ";
580+
str += set_->to()->name();
581+
str += " ";
582+
str += to_rf_->to_string();
583+
return str;
584+
}
576585
}
577586

578587
GateTimingModel *

search/ClkInfo.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ ClkInfo::to_string(const StaState *sta) const
179179
result += network->pathName(gen_clk_src_);
180180
}
181181

182-
if (insertion_ > 0.0) {
182+
if (delayGreater(insertion_, 0.0, sta)) {
183183
result += " insert";
184-
result += std::to_string(insertion_);
184+
result += delayAsString(insertion_, sta);
185185
}
186186

187187
if (uncertainties_) {

search/PathEnum.cc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ PathEnumFaninVisitor::visitEdge(const Pin *from_pin,
394394
bool
395395
PathEnumFaninVisitor::visitFromToPath(const Pin *,
396396
Vertex *from_vertex,
397-
const RiseFall *,
397+
const RiseFall *from_rf,
398398
Tag *,
399399
Path *from_path,
400400
const Arrival &,
@@ -410,6 +410,7 @@ PathEnumFaninVisitor::visitFromToPath(const Pin *,
410410
{
411411
// These paths fanin to before_div_ so we know to_vertex matches.
412412
if ((!unique_pins_ || from_vertex != prev_vertex_)
413+
&& (!unique_edges_ || from_rf != prev_arc_->fromEdge()->asRiseFall())
413414
&& arc != prev_arc_
414415
&& Tag::matchNoCrpr(to_tag, before_div_tag_)
415416
// Ignore paths that only differ by crpr from same vertex/edge.
@@ -449,9 +450,14 @@ PathEnumFaninVisitor::insertUniqueEdgeDiv(Diversion *div)
449450
const Vertex *div_vertex = div_path->vertex(this);
450451
const RiseFall *div_rf = div_path->transition(this);
451452
auto itr = unique_edge_divs_.find({div_vertex, div_rf});
452-
if (itr == unique_edge_divs_.end()
453-
|| div_slack > itr->second->pathEnd()->slack(this))
453+
if (itr == unique_edge_divs_.end())
454+
unique_edge_divs_[{div_vertex, div_rf}] = div;
455+
else if (delayGreater(div_slack, itr->second->pathEnd()->slack(this), this)) {
456+
deleteDiversionPathEnd(itr->second);
454457
itr->second = div;
458+
}
459+
else
460+
deleteDiversionPathEnd(div);
455461
}
456462

457463
void

search/Search.cc

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -467,15 +467,12 @@ Search::findPathEnds(ExceptionFrom *from,
467467
recovery = removal = false;
468468
if (!variables_->gatedClkChecksEnabled())
469469
clk_gating_setup = clk_gating_hold = false;
470-
path_groups_ = new PathGroups(group_path_count, endpoint_path_count,
471-
unique_pins, unique_edges,
472-
slack_min, slack_max,
473-
group_names,
474-
setup, hold,
475-
recovery, removal,
476-
clk_gating_setup, clk_gating_hold,
477-
unconstrained_paths_,
478-
this);
470+
makePathGroups(group_path_count, endpoint_path_count,
471+
unique_pins, unique_edges,
472+
slack_min, slack_max,
473+
group_names, setup, hold,
474+
recovery, removal,
475+
clk_gating_setup, clk_gating_hold);
479476
ensureDownstreamClkPins();
480477
PathEndSeq path_ends = path_groups_->makePathEnds(to, unconstrained_paths_,
481478
corner, min_max,
@@ -509,6 +506,32 @@ Search::findFilteredArrivals(ExceptionFrom *from,
509506
findAllArrivals(thru_latches);
510507
}
511508

509+
void
510+
Search::makePathGroups(int group_path_count,
511+
int endpoint_path_count,
512+
bool unique_pins,
513+
bool unique_edges,
514+
float slack_min,
515+
float slack_max,
516+
PathGroupNameSet *group_names,
517+
bool setup,
518+
bool hold,
519+
bool recovery,
520+
bool removal,
521+
bool clk_gating_setup,
522+
bool clk_gating_hold)
523+
{
524+
path_groups_ = new PathGroups(group_path_count, endpoint_path_count,
525+
unique_pins, unique_edges,
526+
slack_min, slack_max,
527+
group_names,
528+
setup, hold,
529+
recovery, removal,
530+
clk_gating_setup, clk_gating_hold,
531+
unconstrained_paths_,
532+
this);
533+
}
534+
512535
// From/thrus/to are used to make a filter exception. If the last
513536
// search used a filter arrival/required times were only found for a
514537
// subset of the paths. Delete the paths that have a filter

search/Search.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ endpoint_slack(const Pin *pin,
260260
sta->ensureLibLinked();
261261
if (sta->isPathGroupName(path_group_name)) {
262262
Slack slack = sta->endpointSlack(pin, std::string(path_group_name), min_max);
263-
return sta->units()->timeUnit()->staToUser(slack);
263+
return sta->units()->timeUnit()->staToUser(delayAsFloat(slack));
264264
}
265265
else {
266266
sta->report()->error(1577, "%s is not a known path group name.",

0 commit comments

Comments
 (0)