define_scene use filename or library name resolves #386
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
79ebc3469b
commit
d1bfb1df2e
|
|
@ -3,6 +3,13 @@ OpenSTA Timing Analyzer Release Notes
|
|||
|
||||
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
|
||||
------------------------
|
||||
|
||||
|
|
|
|||
2584
doc/OpenSTA.fodt
2584
doc/OpenSTA.fodt
File diff suppressed because it is too large
Load Diff
BIN
doc/OpenSTA.pdf
BIN
doc/OpenSTA.pdf
Binary file not shown.
|
|
@ -9,9 +9,9 @@ set_timing_derate -late 1.1
|
|||
create_clock -name clk -period 10 {clk1 clk2 clk3}
|
||||
set_input_delay -clock clk 0 {in1 in2}
|
||||
|
||||
define_scene ss -liberty nangate45_slow
|
||||
define_scene tt -liberty nangate45_typ
|
||||
define_scene ff -liberty nangate45_fast
|
||||
define_scene ss -liberty NangateOpenCellLibrary_slow
|
||||
define_scene tt -liberty NangateOpenCellLibrary
|
||||
define_scene ff -liberty NangateOpenCellLibrary_fast
|
||||
|
||||
# report all scenes
|
||||
report_checks -path_delay min_max
|
||||
|
|
|
|||
|
|
@ -1591,9 +1591,8 @@ protected:
|
|||
void setThreadCount1(int thread_count);
|
||||
void updateLibertyScenes();
|
||||
void updateSceneLiberty(Scene *scene,
|
||||
const StdStringSeq &liberty_files,
|
||||
const MinMax *min_max);
|
||||
LibertyLibrary *findLibertyFileBasename(const std::string &filename) const;
|
||||
const StdStringSeq &liberty_min_files,
|
||||
const StdStringSeq &liberty_max_files);
|
||||
|
||||
Scene *makeScene(const std::string &name,
|
||||
Mode *mode,
|
||||
|
|
|
|||
|
|
@ -208,7 +208,6 @@ Network::checkNetworkLibertyScenes()
|
|||
}
|
||||
}
|
||||
|
||||
// Only used by Sta::setMinLibrary so linear search is acceptable.
|
||||
LibertyLibrary *
|
||||
Network::findLibertyFilename(const char *filename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2517,8 +2517,7 @@ Sta::makeScene(const std::string &name,
|
|||
updateComponentsState();
|
||||
if (graph_)
|
||||
graph_->makeSceneAfter();
|
||||
updateSceneLiberty(scene, liberty_min_files, MinMax::min());
|
||||
updateSceneLiberty(scene, liberty_max_files, MinMax::max());
|
||||
updateSceneLiberty(scene, liberty_min_files, liberty_max_files);
|
||||
cmd_scene_ = scene;
|
||||
}
|
||||
else
|
||||
|
|
@ -2601,34 +2600,27 @@ Sta::findScenes(const std::string &name,
|
|||
|
||||
void
|
||||
Sta::updateSceneLiberty(Scene *scene,
|
||||
const StdStringSeq &liberty_files,
|
||||
const MinMax *min_max)
|
||||
const StdStringSeq &liberty_min_files,
|
||||
const StdStringSeq &liberty_max_files)
|
||||
{
|
||||
for (const std::string &lib_file : liberty_files) {
|
||||
LibertyLibrary *lib = findLibertyFileBasename(lib_file);
|
||||
if (lib)
|
||||
LibertyLibrary::makeSceneMap(lib, scene->libertyIndex(min_max),
|
||||
network_, report_);
|
||||
else
|
||||
report_->warn(1555, "liberty filename %s not found.", lib_file.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
LibertyLibrary *
|
||||
Sta::findLibertyFileBasename(const std::string &filename) const
|
||||
{
|
||||
LibertyLibraryIterator *lib_iter = network_->libertyLibraryIterator();
|
||||
while (lib_iter->hasNext()) {
|
||||
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;
|
||||
StdStringSet warned_files;
|
||||
for (const MinMax *min_max : MinMax::range()) {
|
||||
const StdStringSeq &liberty_files = min_max == MinMax::min()
|
||||
? liberty_min_files
|
||||
: liberty_max_files;
|
||||
for (const std::string &lib_file : liberty_files) {
|
||||
LibertyLibrary *lib = network_->findLiberty(lib_file.c_str());
|
||||
if (lib == nullptr)
|
||||
lib = network_->findLibertyFilename(lib_file.c_str());
|
||||
if (lib)
|
||||
LibertyLibrary::makeSceneMap(lib, scene->libertyIndex(min_max),
|
||||
network_, report_);
|
||||
else if (!warned_files.contains(lib_file)) {
|
||||
report_->warn(1555, "liberty name/filename %s not found.", lib_file.c_str());
|
||||
warned_files.insert(lib_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
delete lib_iter;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in New Issue