diff --git a/include/sta/Liberty.hh b/include/sta/Liberty.hh index c7f374b4..ec898916 100644 --- a/include/sta/Liberty.hh +++ b/include/sta/Liberty.hh @@ -636,6 +636,7 @@ public: float &fanout_load, bool &exists) const; void setFanoutLoad(float fanout_load); + float capacitance() const; float capacitance(const RiseFall *rf, const MinMax *min_max) const; void capacitance(const RiseFall *rf, diff --git a/include/sta/RiseFallMinMax.hh b/include/sta/RiseFallMinMax.hh index 57f2900d..69711fe4 100644 --- a/include/sta/RiseFallMinMax.hh +++ b/include/sta/RiseFallMinMax.hh @@ -36,6 +36,9 @@ public: float &value, bool &exists) const; bool hasValue() const; + void maxValue(// Return values + float &max_value, + bool &exists) const; bool empty() const; bool hasValue(const RiseFall *rf, const MinMax *min_max) const; diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index efb7919d..11c9c317 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -1928,6 +1928,18 @@ LibertyPort::setCapacitance(const RiseFall *rf, } } +float +LibertyPort::capacitance() const +{ + float cap; + bool exists; + capacitance_.maxValue(cap, exists); + if (exists) + return cap; + else + return 0.0; +} + float LibertyPort::capacitance(const RiseFall *rf, const MinMax *min_max) const diff --git a/sdc/RiseFallMinMax.cc b/sdc/RiseFallMinMax.cc index 47e66a28..35c95b23 100644 --- a/sdc/RiseFallMinMax.cc +++ b/sdc/RiseFallMinMax.cc @@ -163,6 +163,23 @@ RiseFallMinMax::hasValue() const return !empty(); } +void +RiseFallMinMax::maxValue(// Return values + float &max_value, + bool &exists) const +{ + max_value = MinMax::max()->initValue(); + exists = false; + for (int rf_index=0;rf_index