diff --git a/CMakeLists.txt b/CMakeLists.txt index 7622bf90..8e0fa284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) cmake_policy(SET CMP0086 NEW) endif() -project(STA VERSION 2.3.0 +project(STA VERSION 2.3.1 LANGUAGES CXX ) diff --git a/doc/ChangeLog.txt b/doc/ChangeLog.txt index 0451c28b..14f7d923 100644 --- a/doc/ChangeLog.txt +++ b/doc/ChangeLog.txt @@ -3,6 +3,13 @@ OpenSTA Timing Analyzer Release Notes This file summarizes user visible changes for each release. +Release 2.3.1 2020/11/08 +------------------------- + +The read_sdf command no longer supports the -analysis_type, -type, -min_type, +and -max_type arguments. Use the set_operating_conditions -analysis_type +command to set the analysis type before read_sdf. + Release 2.2.0 2020/07/18 ------------------------- diff --git a/doc/OpenSTA.odt b/doc/OpenSTA.odt index e1f378c6..2953e6b6 100644 Binary files a/doc/OpenSTA.odt and b/doc/OpenSTA.odt differ diff --git a/doc/OpenSTA.pdf b/doc/OpenSTA.pdf index 0346b2a7..fd779d57 100644 Binary files a/doc/OpenSTA.pdf and b/doc/OpenSTA.pdf differ diff --git a/sdf/Sdf.i b/sdf/Sdf.i index d5ebdf61..02782602 100644 --- a/sdf/Sdf.i +++ b/sdf/Sdf.i @@ -30,8 +30,7 @@ using sta::AnalysisType; using sta::MinMax; using sta::MinMaxAllNull; using sta::stringEq; -using sta::readSdfSingle; -using sta::readSdfMinMax; +using sta::readSdf; using sta::reportAnnotatedDelay; using sta::reportAnnotatedCheck; @@ -39,62 +38,27 @@ using sta::reportAnnotatedCheck; %inline %{ -// min/max index is: -// sdf_min = 0 -// sdf_typ = 1 -// sdf_max = 2 - // If unescaped_dividers is true path names do not have to escape // hierarchy dividers when the path name is quoted. // For example verilog "\mod1/mod2 " can be referenced as "mod1/mod2" // instead of the correct "mod1\/mod2". -// Read sdf_index value from sdf triples. // Return true if successful. bool -read_sdf_file_single(const char *filename, - const char *path, - Corner *corner, - int sdf_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAllNull *cond_use) +read_sdf_file(const char *filename, + const char *path, + Corner *corner, + bool unescaped_dividers, + bool incremental_only, + MinMaxAllNull *cond_use) { cmdLinkedNetwork(); Sta *sta = Sta::sta(); sta->ensureGraph(); if (stringEq(path, "")) path = NULL; - bool success = readSdfSingle(filename, path, corner, sdf_index, - analysis_type, unescaped_dividers, - incremental_only, cond_use, sta); - sta->search()->arrivalsInvalid(); - return success; -} - -// Read sdf_min_index and sdf_max_index values from sdf triples. -// Return true if successful. -bool -read_sdf_file_min_max(const char *filename, - const char *path, - Corner *corner, - int sdf_min_index, - int sdf_max_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAllNull *cond_use) -{ - cmdLinkedNetwork(); - Sta *sta = Sta::sta(); - sta->ensureGraph(); - if (stringEq(path, "")) - path = NULL; - bool success = readSdfMinMax(filename, path, corner, sdf_min_index, - sdf_max_index, analysis_type, - unescaped_dividers, incremental_only, - cond_use, sta); + bool success = readSdf(filename, path, corner, unescaped_dividers, incremental_only, + cond_use, sta); sta->search()->arrivalsInvalid(); return success; } diff --git a/sdf/Sdf.tcl b/sdf/Sdf.tcl index 7130569c..1cd1c89c 100644 --- a/sdf/Sdf.tcl +++ b/sdf/Sdf.tcl @@ -18,17 +18,14 @@ namespace eval sta { define_cmd_args "read_sdf" \ {[-path path] [-corner corner_name]\ - [-analysis_type single|bc_wc|on_chip_variation]\ - [-type sdf_min|sdf_typ|sdf_max]\ - [-min_type sdf_min|sdf_typ|sdf_max]\ - [-max_type sdf_min|sdf_typ|sdf_max]\ [-cond_use min|max|min_max]\ [-unescaped_dividers] filename} proc_redirect read_sdf { parse_key_args "read_sdf" args \ - keys {-path -corner -analysis_type -type -min_type -max_type -cond_use} \ + keys {-path -corner -cond_use -analysis_type} \ flags {-unescaped_dividers -incremental_only} + check_argc_eq1 "read_sdf" $args set filename [file nativename [lindex $args 0]] set path "" @@ -36,17 +33,6 @@ proc_redirect read_sdf { set path $keys(-path) } set corner [parse_corner keys] - if [info exists keys(-analysis_type)] { - set analysis_type $keys(-analysis_type) - if { $analysis_type == "single" \ - || $analysis_type == "bc_wc" \ - || $analysis_type == "on_chip_variation" } { - # -analysis_type is an implicit set_operating_conditions - set_analysis_type_cmd $analysis_type - } else { - sta_error 429 "-analysis_type must be single, bc_wc or on_chip_variation" - } - } set cond_use "NULL" if [info exists keys(-cond_use)] { @@ -60,53 +46,14 @@ proc_redirect read_sdf { sta_error 430 "-cond_use min_max cannot be used with analysis type single." } } + if [info exists keys(-analysis_type)] { + sta_warn 617 "-analysis_type is deprecated. Use set_operating_conditions -analysis_type." + } set unescaped_dividers [info exists flags(-unescaped_dividers)] - set analysis_type [operating_condition_analysis_type] set incremental_only [info exists flags(-incremental_only)] - if { $analysis_type == "single" } { - # default sdf_max - set index 2 - if [info exists keys(-type)] { - set index [parse_sdf_index "-type" $keys(-type)] - } - if [info exists keys(-min_type)] { - sta_warn 613 "-min_type ignored by analysis_type single." - } - if [info exists keys(-max_type)] { - sta_warn 614 "-max_type ignored by analysis_type single." - } - read_sdf_file_single $filename $path $corner $index $analysis_type \ - $unescaped_dividers $incremental_only $cond_use - } elseif { $analysis_type == "bc_wc" \ - || $analysis_type == "on_chip_variation" } { - # default sdf_min, sdf_max - set min_index 0 - set max_index 2 - if [info exists keys(-min_type)] { - set min_index [parse_sdf_index "-min_type" $keys(-min_type)] - } - if [info exists keys(-max_type)] { - set max_index [parse_sdf_index "-max_type" $keys(-max_type)] - } - if [info exists keys(-type)] { - sta_warn 615 "-type ignored by analysis_type $analysis_type." - } - read_sdf_file_min_max $filename $path $corner $min_index $max_index \ - $analysis_type $unescaped_dividers $incremental_only $cond_use - } -} - -proc parse_sdf_index { key index } { - if { $index == "sdf_min" } { - return 0 - } elseif { $index == "sdf_typ" } { - return 1 - } elseif { $index == "sdf_max" } { - return 2 - } else { - sta_error 431 "$key must be sdf_min, sdf_typ, or sdf_max." - } + read_sdf_file $filename $path $corner $unescaped_dividers \ + $incremental_only $cond_use } ################################################################ diff --git a/sdf/SdfLex.ll b/sdf/SdfLex.ll index 4d9947cf..401b3071 100644 --- a/sdf/SdfLex.ll +++ b/sdf/SdfLex.ll @@ -17,7 +17,7 @@ // along with this program. If not, see . #include "util/FlexDisableRegister.hh" -#include "sdf/Sdf.hh" +#include "sdf/SdfReaderPvt.hh" #include "SdfParse.hh" #define YY_NO_INPUT diff --git a/sdf/SdfParse.yy b/sdf/SdfParse.yy index a2e37297..91983ff7 100644 --- a/sdf/SdfParse.yy +++ b/sdf/SdfParse.yy @@ -18,7 +18,7 @@ #include -#include "sdf/Sdf.hh" +#include "sdf/SdfReaderPvt.hh" int SdfLex_lex(); #define SdfParse_lex SdfLex_lex diff --git a/sdf/SdfReader.cc b/sdf/SdfReader.cc index 97b5416b..c9adff15 100644 --- a/sdf/SdfReader.cc +++ b/sdf/SdfReader.cc @@ -29,7 +29,8 @@ #include "Graph.hh" #include "Corner.hh" #include "DcalcAnalysisPt.hh" -#include "sdf/Sdf.hh" +#include "Sdc.hh" +#include "sdf/SdfReaderPvt.hh" extern int SdfParse_parse(); @@ -79,43 +80,20 @@ private: SdfReader *sdf_reader = nullptr; bool -readSdfSingle(const char *filename, - const char *path, - Corner *corner, - int sdf_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAll *cond_use, - StaState *sta) -{ - int arc_index = corner->findDcalcAnalysisPt(MinMax::max())->index(); - SdfReader reader(filename, path, arc_index, sdf_index, - SdfReader::nullIndex(), SdfReader::nullIndex(), - analysis_type, unescaped_dividers, incremental_only, - cond_use, sta); - sdf_reader = &reader; - return reader.read(); -} - -bool -readSdfMinMax(const char *filename, - const char *path, - Corner *corner, - int sdf_min_index, - int sdf_max_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAll *cond_use, - StaState *sta) +readSdf(const char *filename, + const char *path, + Corner *corner, + bool unescaped_dividers, + bool incremental_only, + MinMaxAll *cond_use, + StaState *sta) { int arc_min_index = corner->findDcalcAnalysisPt(MinMax::min())->index(); int arc_max_index = corner->findDcalcAnalysisPt(MinMax::max())->index(); SdfReader reader(filename, path, - arc_min_index, sdf_min_index, - arc_max_index, sdf_max_index, - analysis_type, unescaped_dividers, incremental_only, + arc_min_index, arc_max_index, + sta->sdc()->analysisType(), + unescaped_dividers, incremental_only, cond_use, sta); sdf_reader = &reader; return reader.read(); @@ -124,9 +102,7 @@ readSdfMinMax(const char *filename, SdfReader::SdfReader(const char *filename, const char *path, int arc_min_index, - int triple_min_index, int arc_max_index, - int triple_max_index, AnalysisType analysis_type, bool unescaped_dividers, bool is_incremental_only, @@ -135,8 +111,8 @@ SdfReader::SdfReader(const char *filename, StaState(sta), filename_(filename), path_(path), - triple_min_index_(triple_min_index), - triple_max_index_(triple_max_index), + triple_min_index_(0), + triple_max_index_(2), arc_delay_min_index_(arc_min_index), arc_delay_max_index_(arc_max_index), analysis_type_(analysis_type), @@ -475,28 +451,25 @@ SdfReader::timingCheck1(TimingRole *role, Pin *data_pin = network_->findPin(instance_, data_port_name); Pin *clk_pin = network_->findPin(instance_, clk_port_name); if (data_pin && clk_pin) { - // Hack to match PT; always use triple max value for check. - if (triple_min_index_ != null_index_ - && triple_max_index_ != null_index_) { - float **values = triple->values(); - float *value_min = values[triple_min_index_]; - float *value_max = values[triple_max_index_]; - if (value_min && value_max) { - switch (analysis_type_) { - case AnalysisType::single: - break; - case AnalysisType::bc_wc: - if (role->genericRole() == TimingRole::setup()) - *value_min = *value_max; - else - *value_max = *value_min; - break; - case AnalysisType::ocv: - *value_min = *value_max; - break; - } - } - } + // Hack: always use triple max value for check. + float **values = triple->values(); + float *value_min = values[triple_min_index_]; + float *value_max = values[triple_max_index_]; + if (value_min && value_max) { + switch (analysis_type_) { + case AnalysisType::single: + break; + case AnalysisType::bc_wc: + if (role->genericRole() == TimingRole::setup()) + *value_min = *value_max; + else + *value_max = *value_min; + break; + case AnalysisType::ocv: + *value_min = *value_max; + break; + } + } bool matched = annotateCheckEdges(data_pin, data_edge, clk_pin, clk_edge, role, triple, false); @@ -769,12 +742,8 @@ SdfReader::setEdgeArcDelaysCondUse(Edge *edge, SdfTriple *triple) { float **values = triple->values(); - float *value_min = nullptr; - if (triple_min_index_ != null_index_) - value_min = values[triple_min_index_]; - float *value_max = nullptr; - if (triple_max_index_ != null_index_) - value_max = values[triple_max_index_]; + float *value_min = values[triple_min_index_]; + float *value_max = value_max = values[triple_max_index_]; MinMax *min, *max; if (cond_use_ == MinMaxAll::min()) { min = MinMax::min(); diff --git a/sdf/SdfReader.hh b/sdf/SdfReader.hh index 2a15a87f..2c6cced6 100644 --- a/sdf/SdfReader.hh +++ b/sdf/SdfReader.hh @@ -53,29 +53,13 @@ class StaState; // conditions and the maximum of the conditional delay values is used for // maximum operating conditions. -// Read sdf_index value from sdf triples. bool -readSdfSingle(const char *filename, - const char *path, - Corner *corner, - int sdf_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAll *cond_use, - StaState *sta); - -// Read sdf_min_index and sdf_max_index values from sdf triples. -bool -readSdfMinMax(const char *filename, - const char *path, - Corner *corner, - int sdf_min_index, - int sdf_max_index, - AnalysisType analysis_type, - bool unescaped_dividers, - bool incremental_only, - MinMaxAll *cond_use, - StaState *sta); +readSdf(const char *filename, + const char *path, + Corner *corner, + bool unescaped_dividers, + bool incremental_only, + MinMaxAll *cond_use, + StaState *sta); } // namespace diff --git a/sdf/Sdf.hh b/sdf/SdfReaderPvt.hh similarity index 97% rename from sdf/Sdf.hh rename to sdf/SdfReaderPvt.hh index e9ad6fc2..b8b5af5e 100644 --- a/sdf/Sdf.hh +++ b/sdf/SdfReaderPvt.hh @@ -50,9 +50,7 @@ public: SdfReader(const char *filename, const char *path, int arc_min_index, - int triple_min_index, int arc_max_index, - int triple_max_index, AnalysisType analysis_type, bool unescaped_dividers, bool is_incremental_only, @@ -60,8 +58,6 @@ public: StaState *sta); ~SdfReader(); bool read(); - // Arc/Triple index passed to read() to ignore arg. - static int nullIndex() { return null_index_; } void setDivider(char divider); void setTimescale(float multiplier, const char *units);