diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index 0d78ebba..1b74fb28 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -1609,6 +1609,7 @@ protected: Mode *mode, Parasitics *parasitics); void deleteScenes(); + void checkLibrarayPocv(); Scene *cmd_scene_{nullptr}; CmdNamespace cmd_namespace_{CmdNamespace::sdc}; diff --git a/network/Network.cc b/network/Network.cc index d096d842..3bf22cf6 100644 --- a/network/Network.cc +++ b/network/Network.cc @@ -134,16 +134,16 @@ Network::readLibertyAfter(LibertyLibrary *) LibertyCell * Network::findLibertyCell(std::string_view name) const { - LibertyLibraryIterator *iter = libertyLibraryIterator(); - while (iter->hasNext()) { - LibertyLibrary *lib = iter->next(); + LibertyLibraryIterator *lib_iter = libertyLibraryIterator(); + while (lib_iter->hasNext()) { + LibertyLibrary *lib = lib_iter->next(); LibertyCell *cell = lib->findLibertyCell(name); if (cell) { - delete iter; + delete lib_iter; return cell; } } - delete iter; + delete lib_iter; return nullptr; } diff --git a/search/Search.i b/search/Search.i index 7a89abe8..0764ae68 100644 --- a/search/Search.i +++ b/search/Search.i @@ -237,7 +237,7 @@ endpoint_slack(const Pin *pin, sta->ensureLibLinked(); if (!path_group_name.empty() && !sta->isGroupPathName(path_group_name, sta->cmdSdc())) { - sta->report()->error(1577, "{} is not a known path group name.", + sta->report()->error(1590, "{} is not a known path group name.", path_group_name); return INF; } @@ -436,7 +436,7 @@ set_report_path_field_properties(const char *field_name, if (field) field->setProperties(title, width, left_justify); else - sta->report()->warn(1575, "unknown report path field {}", field_name); + sta->report()->warn(1591, "unknown report path field {}", field_name); } void @@ -961,7 +961,7 @@ set_crpr_mode(std::string mode) else if (stringEqual(mode, "same_transition")) sta->setCrprMode(CrprMode::same_transition); else - sta->report()->error(1573, "unknown common clk pessimism mode."); + sta->report()->error(1592, "unknown common clk pessimism mode."); } const std::string & diff --git a/search/Sta.cc b/search/Sta.cc index c2cd5446..2d85c027 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -2281,9 +2281,11 @@ Sta::setPocvMode(PocvMode mode) delay_ops_ = new DelayOpsScalar(); break; case PocvMode::normal: + checkLibrarayPocv(); delay_ops_ = new DelayOpsNormal(); break; case PocvMode::skew_normal: + checkLibrarayPocv(); delay_ops_ = new DelayOpsSkewNormal(); break; } @@ -2292,6 +2294,30 @@ Sta::setPocvMode(PocvMode mode) } } +void +Sta::checkLibrarayPocv() +{ + LibertyLibraryIterator *lib_iter = network_->libertyLibraryIterator(); + while (lib_iter->hasNext()) { + LibertyLibrary *lib = lib_iter->next(); + LibertyCellIterator cell_iter(lib); + while (cell_iter.hasNext()) { + LibertyCell *cell = cell_iter.next(); + for (const TimingArcSet *arc_set : cell->timingArcSets()) { + for (const TimingArc *arc : arc_set->arcs()) { + GateTableModel *gate_model = arc->gateTableModel(); + if (gate_model) { + const TableModels *models = gate_model->delayModels(); + if (models->sigma(EarlyLate::early()) != nullptr) + return; + } + } + } + } + } + report_->warn(1578, "No liberty POCV/LVF models found."); +} + float Sta::pocvQuantile() {