Merge remote-tracking branch 'parallax/master' into parallax-update

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
This commit is contained in:
Matt Liberty 2026-02-25 16:09:34 +00:00
commit b0d171d9fb
9 changed files with 1358 additions and 1349 deletions

View File

@ -3,6 +3,13 @@ OpenSTA Timing Analyzer Release Notes
This file summarizes user visible changes for each release. This file summarizes user visible changes for each release.
2025/02/24
----------
The define_scene -library argument now takes a the library name or a
library filename. If a filename is used, it must be the same as the
filename used to read the library with read_liberty.
Release 3.0.0 2025/11/26 Release 3.0.0 2025/11/26
------------------------ ------------------------

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -9,9 +9,9 @@ set_timing_derate -late 1.1
create_clock -name clk -period 10 {clk1 clk2 clk3} create_clock -name clk -period 10 {clk1 clk2 clk3}
set_input_delay -clock clk 0 {in1 in2} set_input_delay -clock clk 0 {in1 in2}
define_scene ss -liberty nangate45_slow define_scene ss -liberty NangateOpenCellLibrary_slow
define_scene tt -liberty nangate45_typ define_scene tt -liberty NangateOpenCellLibrary
define_scene ff -liberty nangate45_fast define_scene ff -liberty NangateOpenCellLibrary_fast
# report all scenes # report all scenes
report_checks -path_delay min_max report_checks -path_delay min_max

View File

@ -1596,9 +1596,8 @@ protected:
void setThreadCount1(int thread_count); void setThreadCount1(int thread_count);
void updateLibertyScenes(); void updateLibertyScenes();
void updateSceneLiberty(Scene *scene, void updateSceneLiberty(Scene *scene,
const StdStringSeq &liberty_files, const StdStringSeq &liberty_min_files,
const MinMax *min_max); const StdStringSeq &liberty_max_files);
LibertyLibrary *findLibertyFileBasename(const std::string &filename) const;
Scene *makeScene(const std::string &name, Scene *makeScene(const std::string &name,
Mode *mode, Mode *mode,

View File

@ -208,7 +208,6 @@ Network::checkNetworkLibertyScenes()
} }
} }
// Only used by Sta::setMinLibrary so linear search is acceptable.
LibertyLibrary * LibertyLibrary *
Network::findLibertyFilename(const char *filename) Network::findLibertyFilename(const char *filename)
{ {

View File

@ -162,14 +162,14 @@ ClkLatency::findClkDelays(ConstClockSeq &clks,
VertexPathIterator path_iter(clk_vertex, this); VertexPathIterator path_iter(clk_vertex, this);
while (path_iter.hasNext()) { while (path_iter.hasNext()) {
Path *path = path_iter.next(); Path *path = path_iter.next();
const ClockEdge *path_clk_edge = path->clkEdge(this);
const Scene *path_scene = path->scene(this); const Scene *path_scene = path->scene(this);
if (path_clk_edge const Clock *path_clk = path->clock(this);
if (path_clk
&& scenes.contains(path_scene) && scenes.contains(path_scene)
&& clk_set.contains(path_clk_edge->clock())) { && clk_set.contains(path_clk)) {
const Clock *path_clk = path_clk_edge->clock();
auto delays_itr = clk_delay_map.find(path_clk); auto delays_itr = clk_delay_map.find(path_clk);
if (delays_itr != clk_delay_map.end()) { if (delays_itr != clk_delay_map.end()) {
const ClockEdge *path_clk_edge = path->clkEdge(this);
ClkDelays &clk_delays = delays_itr->second; ClkDelays &clk_delays = delays_itr->second;
const RiseFall *clk_rf = path_clk_edge->transition(); const RiseFall *clk_rf = path_clk_edge->transition();
const MinMax *min_max = path->minMax(this); const MinMax *min_max = path->minMax(this);

View File

@ -436,8 +436,10 @@ PathGroups::pathGroups(const PathEnd *path_end) const
// GroupPaths have precedence. // GroupPaths have precedence.
else if (!group_paths.empty()) { else if (!group_paths.empty()) {
for (ExceptionPath *group_path : group_paths) { for (ExceptionPath *group_path : group_paths) {
if (group_path->isDefault()) if (group_path->isDefault()) {
path_groups.push_back(path_delay_[mm_index]); if (path_delay_[mm_index])
path_groups.push_back(path_delay_[mm_index]);
}
else { else {
const char *group_name = group_path->name(); const char *group_name = group_path->name();
PathGroup *group = findPathGroup(group_name, min_max); PathGroup *group = findPathGroup(group_name, min_max);

View File

@ -2498,27 +2498,30 @@ Sta::makeScene(const std::string &name,
const std::string &spef_max_file) const std::string &spef_max_file)
{ {
Mode *mode = findMode(mode_name); Mode *mode = findMode(mode_name);
Parasitics *parasitics_default = findParasitics("default"); if (mode) {
Parasitics *parasitics_min = parasitics_default; Parasitics *parasitics_default = findParasitics("default");
Parasitics *parasitics_max = parasitics_default; Parasitics *parasitics_min = parasitics_default;
if (!spef_min_file.empty() && !spef_max_file.empty()) { Parasitics *parasitics_max = parasitics_default;
parasitics_min = findParasitics(spef_min_file); if (!spef_min_file.empty() && !spef_max_file.empty()) {
parasitics_max = findParasitics(spef_max_file); parasitics_min = findParasitics(spef_min_file);
if (parasitics_min == nullptr) parasitics_max = findParasitics(spef_max_file);
report_->error(1558, "Spef file %s not found.", spef_min_file.c_str()); if (parasitics_min == nullptr)
if (parasitics_max == nullptr report_->error(1558, "Spef file %s not found.", spef_min_file.c_str());
&& spef_max_file != spef_min_file) if (parasitics_max == nullptr
report_->error(1559, "Spef file %s not found.", spef_max_file.c_str()); && spef_max_file != spef_min_file)
} report_->error(1559, "Spef file %s not found.", spef_max_file.c_str());
}
mode->sdc()->makeSceneBefore(); mode->sdc()->makeSceneBefore();
Scene *scene = makeScene(name, mode, parasitics_min, parasitics_max); Scene *scene = makeScene(name, mode, parasitics_min, parasitics_max);
updateComponentsState(); updateComponentsState();
if (graph_) if (graph_)
graph_->makeSceneAfter(); graph_->makeSceneAfter();
updateSceneLiberty(scene, liberty_min_files, MinMax::min()); updateSceneLiberty(scene, liberty_min_files, liberty_max_files);
updateSceneLiberty(scene, liberty_max_files, MinMax::max()); cmd_scene_ = scene;
cmd_scene_ = scene; }
else
report_->error(1572, "mode %s not found.", mode_name.c_str());
} }
Scene * Scene *
@ -2597,34 +2600,27 @@ Sta::findScenes(const std::string &name,
void void
Sta::updateSceneLiberty(Scene *scene, Sta::updateSceneLiberty(Scene *scene,
const StdStringSeq &liberty_files, const StdStringSeq &liberty_min_files,
const MinMax *min_max) const StdStringSeq &liberty_max_files)
{ {
for (const std::string &lib_file : liberty_files) { StdStringSet warned_files;
LibertyLibrary *lib = findLibertyFileBasename(lib_file); for (const MinMax *min_max : MinMax::range()) {
if (lib) const StdStringSeq &liberty_files = min_max == MinMax::min()
LibertyLibrary::makeSceneMap(lib, scene->libertyIndex(min_max), ? liberty_min_files
network_, report_); : liberty_max_files;
else for (const std::string &lib_file : liberty_files) {
report_->warn(1555, "liberty filename %s not found.", lib_file.c_str()); LibertyLibrary *lib = network_->findLiberty(lib_file.c_str());
} if (lib == nullptr)
} lib = network_->findLibertyFilename(lib_file.c_str());
if (lib)
LibertyLibrary * LibertyLibrary::makeSceneMap(lib, scene->libertyIndex(min_max),
Sta::findLibertyFileBasename(const std::string &filename) const network_, report_);
{ else if (!warned_files.contains(lib_file)) {
LibertyLibraryIterator *lib_iter = network_->libertyLibraryIterator(); report_->warn(1555, "liberty name/filename %s not found.", lib_file.c_str());
while (lib_iter->hasNext()) { warned_files.insert(lib_file);
LibertyLibrary *lib = lib_iter->next(); }
auto lib_file = std::filesystem::path(lib->filename()).filename().stem();
auto stem = lib_file.stem();
if (stem.string() == filename) {
delete lib_iter;
return lib;
} }
} }
delete lib_iter;
return nullptr;
} }
void void
@ -3128,7 +3124,7 @@ Sta::required(Vertex *vertex,
Slack Slack
Sta::slack(const Net *net, Sta::slack(const Net *net,
const MinMax *min_max) const MinMax *min_max)
{ {
ensureGraph(); ensureGraph();
Slack min_slack = MinMax::min()->initValue(); Slack min_slack = MinMax::min()->initValue();
@ -3150,7 +3146,7 @@ Slack
Sta::slack(const Pin *pin, Sta::slack(const Pin *pin,
const RiseFallBoth *rf, const RiseFallBoth *rf,
const SceneSeq &scenes, const SceneSeq &scenes,
const MinMax *min_max) const MinMax *min_max)
{ {
ensureGraph(); ensureGraph();
Vertex *vertex, *bidirect_drvr_vertex; Vertex *vertex, *bidirect_drvr_vertex;