misspelled "Deescription", gcc warnings
This commit is contained in:
parent
0f2dba7eff
commit
dae85f08e0
|
|
@ -69,7 +69,6 @@ set(STA_SOURCE
|
|||
dcalc/SimpleRCDelayCalc.cc
|
||||
dcalc/UnitDelayCalc.cc
|
||||
|
||||
graph/Delay.cc
|
||||
graph/DelayFloat.cc
|
||||
graph/DelayNormal2.cc
|
||||
graph/Graph.cc
|
||||
|
|
@ -700,7 +699,7 @@ endif()
|
|||
|
||||
message(STATUS "STA executable: ${STA_HOME}/app/sta")
|
||||
|
||||
set(STA_COMPILE_OPTIONS -Wall -Wcast-qual -Wunused-parameter -Wno-deprecated-register)
|
||||
set(STA_COMPILE_OPTIONS -Wall -Wcast-qual -Wunused-parameter -Wno-deprecated-register -Wredundant-decls)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES AppleClang|Clang|GNU)
|
||||
target_compile_options(OpenSTA PUBLIC ${STA_COMPILE_OPTIONS})
|
||||
|
|
|
|||
|
|
@ -30,91 +30,11 @@
|
|||
// API common to DelayFloat and DelayNormal2.
|
||||
namespace sta {
|
||||
|
||||
class Units;
|
||||
class StaState;
|
||||
|
||||
typedef Delay ArcDelay;
|
||||
typedef Delay Slew;
|
||||
typedef Delay Arrival;
|
||||
typedef Delay Required;
|
||||
typedef Delay Slack;
|
||||
|
||||
void
|
||||
initDelayConstants();
|
||||
Delay
|
||||
makeDelay(float delay,
|
||||
float sigma_early,
|
||||
float sigma_late);
|
||||
// sigma^2
|
||||
Delay
|
||||
makeDelay2(float delay,
|
||||
float sigma2_early,
|
||||
float sigma2_late);
|
||||
float
|
||||
delayAsFloat(const Delay &delay);
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma2(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max);
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyZero(const Delay &delay);
|
||||
bool
|
||||
delayFuzzyEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
} // namespace
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -48,12 +48,6 @@ delayIsInitValue(const Delay &delay,
|
|||
return fuzzyEqual(delay, min_max->initValue());
|
||||
}
|
||||
|
||||
float
|
||||
delayAsFloat(const Delay &delay)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
bool
|
||||
delayFuzzyZero(const Delay &delay)
|
||||
{
|
||||
|
|
@ -146,6 +140,13 @@ delayRatio(const Delay &delay1,
|
|||
return delay1 / delay2;
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta)
|
||||
{
|
||||
return delayAsString(delay, sta, sta->units()->timeUnit()->digits());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
|
|
|
|||
|
|
@ -23,10 +23,15 @@
|
|||
|
||||
namespace sta {
|
||||
|
||||
class StaState;
|
||||
|
||||
typedef float Delay;
|
||||
|
||||
const Delay delay_zero = 0.0;
|
||||
|
||||
void
|
||||
initDelayConstants();
|
||||
|
||||
inline Delay
|
||||
makeDelay(float delay,
|
||||
float,
|
||||
|
|
@ -43,5 +48,75 @@ makeDelay2(float delay,
|
|||
return delay;
|
||||
}
|
||||
|
||||
inline float
|
||||
delayAsFloat(const Delay &delay)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma2(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max);
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyZero(const Delay &delay);
|
||||
bool
|
||||
delayFuzzyEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
} // namespace
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -416,6 +416,13 @@ delaySigma2(const Delay &delay,
|
|||
return delay.sigma2(early_late);
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta)
|
||||
{
|
||||
return delayAsString(delay, sta, sta->units()->timeUnit()->digits());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ namespace sta {
|
|||
// Delay values defined as objects that hold a float value.
|
||||
|
||||
class Delay;
|
||||
class StaState;
|
||||
|
||||
// Normal distribution with early(left)/late(right) std deviations.
|
||||
class Delay
|
||||
|
|
@ -69,10 +70,20 @@ private:
|
|||
|
||||
const Delay delay_zero(0.0);
|
||||
|
||||
void
|
||||
initDelayConstants();
|
||||
|
||||
Delay
|
||||
makeDelay(float delay,
|
||||
float sigma_early,
|
||||
float sigma_late);
|
||||
|
||||
Delay
|
||||
makeDelay2(float delay,
|
||||
// sigma^2
|
||||
float sigma_early,
|
||||
float sigma_late);
|
||||
|
||||
inline float
|
||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
||||
|
||||
|
|
@ -89,5 +100,69 @@ Delay operator/(float delay1,
|
|||
Delay operator*(const Delay &delay1,
|
||||
float delay2);
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
float
|
||||
delaySigma2(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max);
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyZero(const Delay &delay);
|
||||
bool
|
||||
delayFuzzyEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayFuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayFuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
} // namespace
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -99,8 +99,11 @@ LibertyLibrary::LibertyLibrary(const char *name,
|
|||
default_ocv_derate_(NULL)
|
||||
{
|
||||
// Scalar templates are builtin.
|
||||
TableTemplate *scalar_template = new TableTemplate("scalar", NULL, NULL, NULL);
|
||||
addTableTemplate(scalar_template);
|
||||
for (int i = 0; i != table_template_count; i++) {
|
||||
TableTemplateType type = static_cast<TableTemplateType>(i);
|
||||
TableTemplate *scalar_template = new TableTemplate("scalar", NULL, NULL, NULL);
|
||||
addTableTemplate(scalar_template, type);
|
||||
}
|
||||
|
||||
TransRiseFallIterator tr_iter;
|
||||
while (tr_iter.hasNext()) {
|
||||
|
|
@ -117,7 +120,8 @@ LibertyLibrary::LibertyLibrary(const char *name,
|
|||
LibertyLibrary::~LibertyLibrary()
|
||||
{
|
||||
bus_dcls_.deleteContents();
|
||||
template_map_.deleteContents();
|
||||
for (int i = 0; i < table_template_count; i++)
|
||||
template_maps_[i].deleteContents();
|
||||
scale_factors_map_.deleteContents();
|
||||
delete scale_factors_;
|
||||
|
||||
|
|
@ -182,21 +186,17 @@ LibertyLibrary::findBusDcl(const char *name) const
|
|||
}
|
||||
|
||||
void
|
||||
LibertyLibrary::addTableTemplate(TableTemplate *tbl_template)
|
||||
LibertyLibrary::addTableTemplate(TableTemplate *tbl_template,
|
||||
TableTemplateType type)
|
||||
{
|
||||
template_map_[tbl_template->name()] = tbl_template;
|
||||
}
|
||||
|
||||
void
|
||||
LibertyLibrary::deleteTableTemplate(TableTemplate *tbl_template)
|
||||
{
|
||||
template_map_.eraseKey(tbl_template->name());
|
||||
template_maps_[type][tbl_template->name()] = tbl_template;
|
||||
}
|
||||
|
||||
TableTemplate *
|
||||
LibertyLibrary::findTableTemplate(const char *name)
|
||||
LibertyLibrary::findTableTemplate(const char *name,
|
||||
TableTemplateType type)
|
||||
{
|
||||
return template_map_[name];
|
||||
return template_maps_[type][name];
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -96,6 +96,14 @@ typedef enum {
|
|||
scale_factor_pvt_unknown
|
||||
} ScaleFactorPvt;
|
||||
|
||||
typedef enum {
|
||||
table_template_delay,
|
||||
table_template_power,
|
||||
table_template_output_current,
|
||||
table_template_ocv,
|
||||
table_template_count
|
||||
} TableTemplateType;
|
||||
|
||||
void
|
||||
initLiberty();
|
||||
void
|
||||
|
|
@ -138,8 +146,10 @@ public:
|
|||
void setDelayModelType(DelayModelType type);
|
||||
void addBusDcl(BusDcl *bus_dcl);
|
||||
BusDcl *findBusDcl(const char *name) const;
|
||||
void addTableTemplate(TableTemplate *tbl_template);
|
||||
TableTemplate *findTableTemplate(const char *name);
|
||||
void addTableTemplate(TableTemplate *tbl_template,
|
||||
TableTemplateType type);
|
||||
TableTemplate *findTableTemplate(const char *name,
|
||||
TableTemplateType type);
|
||||
float nominalProcess() { return nominal_process_; }
|
||||
void setNominalProcess(float process);
|
||||
float nominalVoltage() const { return nominal_voltage_; }
|
||||
|
|
@ -289,12 +299,11 @@ protected:
|
|||
const TableModel *model,
|
||||
float in_slew,
|
||||
float wire_delay) const;
|
||||
void deleteTableTemplate(TableTemplate *tbl_template);
|
||||
|
||||
Units *units_;
|
||||
DelayModelType delay_model_type_;
|
||||
BusDclMap bus_dcls_;
|
||||
TableTemplateMap template_map_;
|
||||
TableTemplateMap template_maps_[table_template_count];
|
||||
float nominal_process_;
|
||||
float nominal_voltage_;
|
||||
float nominal_temperature_;
|
||||
|
|
@ -365,8 +374,9 @@ private:
|
|||
class TableTemplateIterator : public TableTemplateMap::ConstIterator
|
||||
{
|
||||
public:
|
||||
TableTemplateIterator(const LibertyLibrary *library) :
|
||||
TableTemplateMap::ConstIterator(library->template_map_) {}
|
||||
TableTemplateIterator(const LibertyLibrary *library,
|
||||
TableTemplateType type) :
|
||||
TableTemplateMap::ConstIterator(library->template_maps_[type]) {}
|
||||
};
|
||||
|
||||
class OperatingConditionsIterator : public OperatingConditionsMap::ConstIterator
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "LibertyExpr.hh"
|
||||
#include "LibertyExprPvt.hh"
|
||||
|
||||
int LibertyExprLex_lex();
|
||||
#define LibertyExprParse_lex LibertyExprLex_lex
|
||||
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@
|
|||
|
||||
#include "DisallowCopyAssign.hh"
|
||||
|
||||
int
|
||||
LibertyExprLex_lex();
|
||||
|
||||
namespace sta {
|
||||
|
||||
class Report;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include "LibertyParser.hh"
|
||||
|
||||
int LibertyLex_lex();
|
||||
int LibertyParse_error(const char *msg);
|
||||
#define LibertyParse_lex LibertyLex_lex
|
||||
// Use yacc generated parser errors.
|
||||
#define YYERROR_VERBOSE
|
||||
|
|
|
|||
|
|
@ -234,12 +234,11 @@ LibertyReader::defineVisitors()
|
|||
defineAttrVisitor("slew_derate_from_library",
|
||||
&LibertyReader::visitSlewDerateFromLibrary);
|
||||
|
||||
defineGroupVisitor("lu_table_template", &LibertyReader::beginTableTemplate,
|
||||
defineGroupVisitor("lu_table_template",
|
||||
&LibertyReader::beginTableTemplateDelay,
|
||||
&LibertyReader::endTableTemplate);
|
||||
defineGroupVisitor("output_current_template",
|
||||
&LibertyReader::beginTableTemplate,
|
||||
&LibertyReader::endTableTemplate);
|
||||
defineGroupVisitor("ocv_table_template", &LibertyReader::beginTableTemplate,
|
||||
&LibertyReader::beginTableTemplateOutputCurrent,
|
||||
&LibertyReader::endTableTemplate);
|
||||
defineAttrVisitor("variable_1", &LibertyReader::visitVariable1);
|
||||
defineAttrVisitor("variable_2", &LibertyReader::visitVariable2);
|
||||
|
|
@ -395,7 +394,8 @@ LibertyReader::defineVisitors()
|
|||
defineAttrVisitor("sdf_cond", &LibertyReader::visitSdfCond);
|
||||
|
||||
// Power attributes.
|
||||
defineGroupVisitor("power_lut_template", &LibertyReader::beginTableTemplate,
|
||||
defineGroupVisitor("power_lut_template",
|
||||
&LibertyReader::beginTableTemplatePower,
|
||||
&LibertyReader::endTableTemplate);
|
||||
defineGroupVisitor("leakage_power", &LibertyReader::beginLeakagePower,
|
||||
&LibertyReader::endLeakagePower);
|
||||
|
|
@ -415,7 +415,7 @@ LibertyReader::defineVisitors()
|
|||
&LibertyReader::visitDefaultOcvDerateGroup);
|
||||
defineAttrVisitor("ocv_derate_group", &LibertyReader::visitOcvDerateGroup);
|
||||
defineGroupVisitor("ocv_table_template",
|
||||
&LibertyReader::beginTableTemplate,
|
||||
&LibertyReader::beginTableTemplateOcv,
|
||||
&LibertyReader::endTableTemplate);
|
||||
defineGroupVisitor("ocv_derate",
|
||||
&LibertyReader::beginOcvDerate,
|
||||
|
|
@ -1211,13 +1211,26 @@ LibertyReader::visitSlewDerateFromLibrary(LibertyAttr *attr)
|
|||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
LibertyReader::beginTableTemplate(LibertyGroup *group)
|
||||
LibertyReader::beginTableTemplateDelay(LibertyGroup *group)
|
||||
{
|
||||
beginTableTemplate(group, table_template_delay);
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::beginTableTemplateOutputCurrent(LibertyGroup *group)
|
||||
{
|
||||
beginTableTemplate(group, table_template_output_current);
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::beginTableTemplate(LibertyGroup *group,
|
||||
TableTemplateType type)
|
||||
{
|
||||
if (library_) {
|
||||
const char *name = group->firstName();
|
||||
if (name) {
|
||||
tbl_template_ = new TableTemplate(name);
|
||||
library_->addTableTemplate(tbl_template_);
|
||||
library_->addTableTemplate(tbl_template_, type);
|
||||
}
|
||||
else
|
||||
libWarn(group, "table template does not have a name.\n");
|
||||
|
|
@ -3732,7 +3745,8 @@ void
|
|||
LibertyReader::beginRiseTransitionDegredation(LibertyGroup *group)
|
||||
{
|
||||
if (library_)
|
||||
beginTableModel(group, TransRiseFall::rise(), time_scale_,
|
||||
beginTableModel(group, table_template_delay,
|
||||
TransRiseFall::rise(), time_scale_,
|
||||
scale_factor_transition);
|
||||
}
|
||||
|
||||
|
|
@ -3740,7 +3754,8 @@ void
|
|||
LibertyReader::beginFallTransitionDegredation(LibertyGroup *group)
|
||||
{
|
||||
if (library_)
|
||||
beginTableModel(group, TransRiseFall::fall(), time_scale_,
|
||||
beginTableModel(group, table_template_delay,
|
||||
TransRiseFall::fall(), time_scale_,
|
||||
scale_factor_transition);
|
||||
}
|
||||
|
||||
|
|
@ -3768,16 +3783,18 @@ LibertyReader::beginTimingTableModel(LibertyGroup *group,
|
|||
ScaleFactorType scale_factor_type)
|
||||
{
|
||||
if (timing_)
|
||||
beginTableModel(group, tr, time_scale_, scale_factor_type);
|
||||
beginTableModel(group, table_template_delay, tr,
|
||||
time_scale_, scale_factor_type);
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::beginTableModel(LibertyGroup *group,
|
||||
TableTemplateType type,
|
||||
TransRiseFall *tr,
|
||||
float scale,
|
||||
ScaleFactorType scale_factor_type)
|
||||
{
|
||||
beginTable(group, scale);
|
||||
beginTable(group, type, scale);
|
||||
tr_ = tr;
|
||||
scale_factor_type_ = scale_factor_type;
|
||||
sigma_type_ = EarlyLateAll::all();
|
||||
|
|
@ -3791,11 +3808,12 @@ LibertyReader::endTableModel()
|
|||
|
||||
void
|
||||
LibertyReader::beginTable(LibertyGroup *group,
|
||||
TableTemplateType type,
|
||||
float scale)
|
||||
{
|
||||
const char *template_name = group->firstName();
|
||||
if (template_name) {
|
||||
tbl_template_ = library_->findTableTemplate(template_name);
|
||||
tbl_template_ = library_->findTableTemplate(template_name, type);
|
||||
if (tbl_template_) {
|
||||
axis_[0] = tbl_template_->axis1();
|
||||
axis_[1] = tbl_template_->axis2();
|
||||
|
|
@ -4401,6 +4419,12 @@ LibertyReader::libError(LibertyStmt *stmt,
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
LibertyReader::beginTableTemplatePower(LibertyGroup *group)
|
||||
{
|
||||
beginTableTemplate(group, table_template_power);
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::beginLeakagePower(LibertyGroup *group)
|
||||
{
|
||||
|
|
@ -4441,7 +4465,8 @@ void
|
|||
LibertyReader::beginFallPower(LibertyGroup *group)
|
||||
{
|
||||
if (internal_power_)
|
||||
beginTableModel(group, TransRiseFall::fall(), energy_scale_,
|
||||
beginTableModel(group, table_template_power,
|
||||
TransRiseFall::fall(), energy_scale_,
|
||||
scale_factor_internal_power);
|
||||
}
|
||||
|
||||
|
|
@ -4449,7 +4474,8 @@ void
|
|||
LibertyReader::beginRisePower(LibertyGroup *group)
|
||||
{
|
||||
if (internal_power_)
|
||||
beginTableModel(group, TransRiseFall::rise(), energy_scale_,
|
||||
beginTableModel(group, table_template_power,
|
||||
TransRiseFall::rise(), energy_scale_,
|
||||
scale_factor_internal_power);
|
||||
}
|
||||
|
||||
|
|
@ -4498,6 +4524,12 @@ LibertyReader::visitRelatedPgPin(LibertyAttr *attr)
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
LibertyReader::beginTableTemplateOcv(LibertyGroup *group)
|
||||
{
|
||||
beginTableTemplate(group, table_template_ocv);
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::visitOcvArcDepth(LibertyAttr *attr)
|
||||
{
|
||||
|
|
@ -4558,7 +4590,7 @@ LibertyReader::beginOcvDerateFactors(LibertyGroup *group)
|
|||
rf_type_ = TransRiseFallBoth::riseFall();
|
||||
derate_type_ = EarlyLateAll::all();
|
||||
path_type_ = path_type_clk_and_data;
|
||||
beginTable(group, 1.0);
|
||||
beginTable(group, table_template_ocv, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,10 @@ public:
|
|||
TransRiseFall *tr);
|
||||
virtual void visitSlewDerateFromLibrary(LibertyAttr *attr);
|
||||
|
||||
virtual void beginTableTemplate(LibertyGroup *group);
|
||||
virtual void beginTableTemplateDelay(LibertyGroup *group);
|
||||
virtual void beginTableTemplateOutputCurrent(LibertyGroup *group);
|
||||
virtual void beginTableTemplate(LibertyGroup *group,
|
||||
TableTemplateType type);
|
||||
virtual void endTableTemplate(LibertyGroup *group);
|
||||
virtual void visitVariable1(LibertyAttr *attr);
|
||||
virtual void visitVariable2(LibertyAttr *attr);
|
||||
|
|
@ -320,6 +323,7 @@ public:
|
|||
virtual void endRiseFallTransitionDegredation(LibertyGroup *group);
|
||||
|
||||
virtual void beginTableModel(LibertyGroup *group,
|
||||
TableTemplateType type,
|
||||
TransRiseFall *tr,
|
||||
float scale,
|
||||
ScaleFactorType scale_factor_type);
|
||||
|
|
@ -328,7 +332,8 @@ public:
|
|||
TransRiseFall *tr,
|
||||
ScaleFactorType scale_factor_type);
|
||||
virtual void beginTable(LibertyGroup *group,
|
||||
float scale);
|
||||
TableTemplateType type,
|
||||
float scale);
|
||||
virtual void endTable();
|
||||
virtual void makeTable(LibertyAttr *attr,
|
||||
float scale);
|
||||
|
|
@ -351,6 +356,7 @@ public:
|
|||
virtual void visitSdfCond(LibertyAttr *attr);
|
||||
|
||||
// Power attributes.
|
||||
virtual void beginTableTemplatePower(LibertyGroup *group);
|
||||
virtual void beginLeakagePower(LibertyGroup *group);
|
||||
virtual void endLeakagePower(LibertyGroup *group);
|
||||
virtual void beginInternalPower(LibertyGroup *group);
|
||||
|
|
@ -370,6 +376,7 @@ public:
|
|||
InternalPowerGroup *power_group);
|
||||
|
||||
// AOCV attributes.
|
||||
virtual void beginTableTemplateOcv(LibertyGroup *group);
|
||||
virtual void visitOcvArcDepth(LibertyAttr *attr);
|
||||
virtual void visitDefaultOcvDerateGroup(LibertyAttr *attr);
|
||||
virtual void visitOcvDerateGroup(LibertyAttr *attr);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public:
|
|||
TimingArc *&arc2);
|
||||
const TimingArcSeq &arcs() const { return arcs_; }
|
||||
// Use the TimingArcSetArcIterator(arc_set) constructor instead.
|
||||
TimingArcSetArcIterator *timingArcIterator();
|
||||
TimingArcSetArcIterator *timingArcIterator() __attribute__ ((deprecated));
|
||||
TimingArcIndex addTimingArc(TimingArc *arc);
|
||||
void deleteTimingArc(TimingArc *arc);
|
||||
TimingArc *findTimingArc(unsigned arc_index);
|
||||
|
|
|
|||
|
|
@ -562,7 +562,8 @@ ConcretePort::memberIterator() const
|
|||
ConcreteCellPortBitIterator::ConcreteCellPortBitIterator(const ConcreteCell*
|
||||
cell) :
|
||||
port_iter_(cell->ports_),
|
||||
member_iter_(NULL)
|
||||
member_iter_(NULL),
|
||||
next_(NULL)
|
||||
{
|
||||
findNext();
|
||||
}
|
||||
|
|
@ -585,24 +586,29 @@ void
|
|||
ConcreteCellPortBitIterator::findNext()
|
||||
{
|
||||
if (member_iter_) {
|
||||
if (member_iter_->hasNext())
|
||||
if (member_iter_->hasNext()) {
|
||||
next_ = member_iter_->next();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
delete member_iter_;
|
||||
member_iter_ = NULL;
|
||||
}
|
||||
}
|
||||
if (member_iter_ == NULL) {
|
||||
if (port_iter_.hasNext()) {
|
||||
next_ = port_iter_.next();
|
||||
if (next_->isBus()) {
|
||||
member_iter_ = next_->memberIterator();
|
||||
next_ = member_iter_->next();
|
||||
}
|
||||
while (port_iter_.hasNext()) {
|
||||
ConcretePort *next = port_iter_.next();
|
||||
if (next->isBus()) {
|
||||
member_iter_ = next->memberIterator();
|
||||
next_ = member_iter_->next();
|
||||
return;
|
||||
}
|
||||
else
|
||||
next_ = NULL;
|
||||
else if (!next->isBundle()) {
|
||||
next_ = next;
|
||||
return;
|
||||
}
|
||||
next_ = NULL;
|
||||
}
|
||||
next_ = NULL;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ Corner::libertyLibraries(const MinMax *min_max)
|
|||
int
|
||||
Corner::libertyIndex(const MinMax *min_max) const
|
||||
{
|
||||
return index_ * 2 + min_max->index();
|
||||
return index_ * MinMax::index_count + min_max->index();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -2891,9 +2891,8 @@ ReportPath::reportPathHeader(string &result)
|
|||
if (field->enabled()) {
|
||||
if (!first_field)
|
||||
result += ' ';
|
||||
first_field = false;
|
||||
|
||||
reportField(field->title(), field, result);
|
||||
first_field = false;
|
||||
}
|
||||
}
|
||||
trimRight(result);
|
||||
|
|
@ -2988,11 +2987,11 @@ ReportPath::reportLine(const char *what,
|
|||
string &result)
|
||||
{
|
||||
ReportFieldSeq::Iterator field_iter(fields_);
|
||||
int field_index = 0;
|
||||
size_t field_index = 0;
|
||||
bool first_field = true;
|
||||
while (field_iter.hasNext()) {
|
||||
ReportField *field = field_iter.next();
|
||||
bool first_field = field_index == 0;
|
||||
bool last_field = field_index == fields_.size() - 1;
|
||||
bool last_field = field_index == (fields_.size() - 1);
|
||||
|
||||
if (field->enabled()) {
|
||||
if (!first_field)
|
||||
|
|
@ -3021,19 +3020,16 @@ ReportPath::reportLine(const char *what,
|
|||
reportFieldDelay(total, early_late, field, result);
|
||||
}
|
||||
else if (field == field_edge_) {
|
||||
if (tr) {
|
||||
result += ' ';
|
||||
if (tr)
|
||||
reportField(tr->shortName(), field, result);
|
||||
}
|
||||
// Compatibility kludge; suppress trailing spaces.
|
||||
else if (field_iter.hasNext()) {
|
||||
result += ' ';
|
||||
else if (field_iter.hasNext())
|
||||
reportFieldBlank(field, result);
|
||||
}
|
||||
}
|
||||
else if (field == field_case_ && line_case)
|
||||
result += line_case;
|
||||
|
||||
first_field = false;
|
||||
}
|
||||
field_index++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1068,11 +1068,11 @@ Sta::makeGeneratedClock(const char *name,
|
|||
char *comment)
|
||||
{
|
||||
sdc_->makeGeneratedClock(name, pins, add_to_pins,
|
||||
src_pin, master_clk,
|
||||
pll_out, pll_fdbk,
|
||||
divide_by, multiply_by, duty_cycle,
|
||||
invert, combinational,
|
||||
edges, edge_shifts, comment);
|
||||
src_pin, master_clk,
|
||||
pll_out, pll_fdbk,
|
||||
divide_by, multiply_by, duty_cycle,
|
||||
invert, combinational,
|
||||
edges, edge_shifts, comment);
|
||||
update_genclks_ = true;
|
||||
search_->arrivalsInvalid();
|
||||
}
|
||||
|
|
@ -1257,7 +1257,7 @@ Sta::setClockUncertainty(Clock *from_clk,
|
|||
float uncertainty)
|
||||
{
|
||||
sdc_->setClockUncertainty(from_clk, from_tr, to_clk, to_tr,
|
||||
setup_hold, uncertainty);
|
||||
setup_hold, uncertainty);
|
||||
search_->arrivalsInvalid();
|
||||
}
|
||||
|
||||
|
|
@ -1282,11 +1282,11 @@ Sta::makeClockGroups(const char *name,
|
|||
const char *comment)
|
||||
{
|
||||
ClockGroups *groups = sdc_->makeClockGroups(name,
|
||||
logically_exclusive,
|
||||
physically_exclusive,
|
||||
asynchronous,
|
||||
allow_paths,
|
||||
comment);
|
||||
logically_exclusive,
|
||||
physically_exclusive,
|
||||
asynchronous,
|
||||
allow_paths,
|
||||
comment);
|
||||
search_->requiredsInvalid();
|
||||
return groups;
|
||||
}
|
||||
|
|
@ -1828,8 +1828,8 @@ Sta::setInputDelay(Pin *pin,
|
|||
float delay)
|
||||
{
|
||||
sdc_->setInputDelay(pin, tr, clk, clk_tr, ref_pin,
|
||||
source_latency_included, network_latency_included,
|
||||
min_max, add, delay);
|
||||
source_latency_included, network_latency_included,
|
||||
min_max, add, delay);
|
||||
|
||||
search_->arrivalInvalid(pin);
|
||||
}
|
||||
|
|
@ -1858,8 +1858,8 @@ Sta::setOutputDelay(Pin *pin,
|
|||
float delay)
|
||||
{
|
||||
sdc_->setOutputDelay(pin, tr, clk, clk_tr, ref_pin,
|
||||
source_latency_included,network_latency_included,
|
||||
min_max, add, delay);
|
||||
source_latency_included,network_latency_included,
|
||||
min_max, add, delay);
|
||||
search_->requiredInvalid(pin);
|
||||
}
|
||||
|
||||
|
|
@ -1895,8 +1895,8 @@ Sta::makeMulticyclePath(ExceptionFrom *from,
|
|||
const char *comment)
|
||||
{
|
||||
sdc_->makeMulticyclePath(from, thrus, to, min_max,
|
||||
use_end_clk, path_multiplier,
|
||||
comment);
|
||||
use_end_clk, path_multiplier,
|
||||
comment);
|
||||
search_->arrivalsInvalid();
|
||||
}
|
||||
|
||||
|
|
@ -1910,8 +1910,8 @@ Sta::makePathDelay(ExceptionFrom *from,
|
|||
const char *comment)
|
||||
{
|
||||
sdc_->makePathDelay(from, thrus, to, min_max,
|
||||
ignore_clk_latency, delay,
|
||||
comment);
|
||||
ignore_clk_latency, delay,
|
||||
comment);
|
||||
search_->endpointsInvalid();
|
||||
search_->arrivalsInvalid();
|
||||
}
|
||||
|
|
@ -1954,7 +1954,7 @@ Sta::makeExceptionFrom(PinSet *from_pins,
|
|||
const TransRiseFallBoth *from_tr)
|
||||
{
|
||||
return sdc_->makeExceptionFrom(from_pins, from_clks, from_insts,
|
||||
from_tr);
|
||||
from_tr);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ private:
|
|||
//
|
||||
// stage
|
||||
// |---------------|
|
||||
// |\ |\
|
||||
// |\ |\ .
|
||||
// -------| >---/\/\/----| >---
|
||||
// gate |/ drvr load|/
|
||||
// input
|
||||
|
|
@ -1122,6 +1122,7 @@ WritePathSpice::onePort(FuncExpr *expr)
|
|||
return port;
|
||||
case FuncExpr::op_one:
|
||||
case FuncExpr::op_zero:
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -1337,7 +1338,7 @@ WritePathSpice::recordSpicePortNames(const char *cell_name,
|
|||
auto cell = network_->findLibertyCell(cell_name);
|
||||
if (cell) {
|
||||
auto spice_port_names = new StringVector;
|
||||
for (auto i = 2; i < tokens.size(); i++) {
|
||||
for (size_t i = 2; i < tokens.size(); i++) {
|
||||
auto port_name = tokens[i].c_str();
|
||||
auto port = cell->findLibertyPort(port_name);
|
||||
auto pg_port = cell->findPgPort(port_name);
|
||||
|
|
@ -1526,7 +1527,8 @@ streamPrint(ofstream &stream,
|
|||
va_list args;
|
||||
va_start(args, fmt);
|
||||
char *result;
|
||||
vasprintf(&result, fmt, args);
|
||||
if (vasprintf(&result, fmt, args) == -1)
|
||||
internalError("out of memory");
|
||||
stream << result;
|
||||
free(result);
|
||||
va_end(args);
|
||||
|
|
|
|||
34
tcl/Cmds.tcl
34
tcl/Cmds.tcl
|
|
@ -1876,22 +1876,6 @@ proc get_object_type { obj } {
|
|||
}
|
||||
}
|
||||
|
||||
proc sort_by_full_name { objects } {
|
||||
return [lsort -command full_name_cmp $objects]
|
||||
}
|
||||
|
||||
proc sort_by_name { objects } {
|
||||
return [lsort -command name_cmp $objects]
|
||||
}
|
||||
|
||||
proc full_name_cmp { obj1 obj2 } {
|
||||
return [string compare [get_full_name $obj1] [get_full_name $obj2]]
|
||||
}
|
||||
|
||||
proc name_cmp { obj1 obj2 } {
|
||||
return [string compare [get_name $obj1] [get_name $obj2]]
|
||||
}
|
||||
|
||||
proc get_name { object } {
|
||||
return [get_object_property $object "name"]
|
||||
}
|
||||
|
|
@ -1900,22 +1884,12 @@ proc get_full_name { object } {
|
|||
return [get_object_property $object "full_name"]
|
||||
}
|
||||
|
||||
if {0} {
|
||||
proc get_name { objects } {
|
||||
set names {}
|
||||
foreach object $objects {
|
||||
lappend names [get_object_property $object "name"]
|
||||
}
|
||||
return $names
|
||||
proc sort_by_full_name { objects } {
|
||||
return [lsort -command full_name_cmp $objects]
|
||||
}
|
||||
|
||||
proc get_full_name { objects } {
|
||||
set names {}
|
||||
foreach object $objects {
|
||||
lappend names [get_object_property $object "full_name"]
|
||||
}
|
||||
return $names
|
||||
}
|
||||
proc full_name_cmp { obj1 obj2 } {
|
||||
return [string compare [get_full_name $obj1] [get_full_name $obj2]]
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
|
|
|||
|
|
@ -40,15 +40,15 @@ proc define_report_path_fields {} {
|
|||
set_rise_fall_short_names "^" "v"
|
||||
set_report_path_field_order { fanout capacitance slew \
|
||||
incr total edge case description }
|
||||
set_report_path_field_properties "description" "Deescription" 36 1
|
||||
set_report_path_field_properties "description" "Description" 36 1
|
||||
set width $report_path_field_width_extra
|
||||
set_report_path_field_properties "total" "Time" $width 0
|
||||
set_report_path_field_properties "incr" "Delay" $width 0
|
||||
set_report_path_field_properties "capacitance" "Cap" $width 0
|
||||
set_report_path_field_properties "slew" "Slew" $width 0
|
||||
set_report_path_field_properties "fanout" "Fanout" 5 0
|
||||
set_report_path_field_properties "edge" "" 1 0
|
||||
set_report_path_field_properties "case" "" 11 0
|
||||
set_report_path_field_properties "edge" " " 1 0
|
||||
set_report_path_field_properties "case" " " 11 0
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
|
@ -1002,7 +1002,7 @@ proc report_object_names { args } {
|
|||
if { [info exists flags(-verbose)] } {
|
||||
puts -nonewline "{"
|
||||
set first 1
|
||||
foreach obj [sort_name $objects] {
|
||||
foreach obj [sort_by_full_name $objects] {
|
||||
if { !$first } {
|
||||
puts -nonewline ", "
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue