2018-09-28 17:54:21 +02:00
|
|
|
// OpenSTA, Static Timing Analyzer
|
2022-01-04 18:17:08 +01:00
|
|
|
// Copyright (c) 2022, Parallax Software, Inc.
|
2018-09-28 17:54:21 +02:00
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2022-01-04 18:17:08 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2018-09-28 17:54:21 +02:00
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2022-01-04 18:17:08 +01:00
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-09-28 17:54:21 +02:00
|
|
|
|
2020-04-05 23:53:44 +02:00
|
|
|
#include "GraphDelayCalc.hh"
|
2020-04-05 20:35:51 +02:00
|
|
|
|
2020-04-05 23:53:44 +02:00
|
|
|
#include "Liberty.hh"
|
|
|
|
|
#include "Network.hh"
|
|
|
|
|
#include "Graph.hh"
|
|
|
|
|
#include "Sdc.hh"
|
|
|
|
|
#include "Corner.hh"
|
2018-09-28 17:54:21 +02:00
|
|
|
|
|
|
|
|
namespace sta {
|
|
|
|
|
|
|
|
|
|
GraphDelayCalc::GraphDelayCalc(StaState *sta) :
|
|
|
|
|
StaState(sta)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
GraphDelayCalc::setObserver(DelayCalcObserver *observer)
|
|
|
|
|
{
|
|
|
|
|
// Observer not needed by GraphDelayCalc.
|
|
|
|
|
delete observer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string *
|
|
|
|
|
GraphDelayCalc::reportDelayCalc(Edge *,
|
|
|
|
|
TimingArc *,
|
|
|
|
|
const Corner *,
|
|
|
|
|
const MinMax *,
|
|
|
|
|
int)
|
|
|
|
|
{
|
|
|
|
|
return new string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float
|
|
|
|
|
GraphDelayCalc::incrementalDelayTolerance()
|
|
|
|
|
{
|
|
|
|
|
return 0.0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
GraphDelayCalc::loadCap(const Pin *,
|
|
|
|
|
Parasitic *,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const DcalcAnalysisPt *,
|
|
|
|
|
// Return values.
|
|
|
|
|
float &pin_cap,
|
|
|
|
|
float &wire_cap) const
|
|
|
|
|
{
|
|
|
|
|
pin_cap = wire_cap = 0.0F;
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-26 18:15:52 +01:00
|
|
|
float
|
|
|
|
|
GraphDelayCalc::loadCap(const Pin *,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2018-11-26 18:15:52 +01:00
|
|
|
const DcalcAnalysisPt *) const
|
|
|
|
|
{
|
|
|
|
|
return 0.0F;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 17:54:21 +02:00
|
|
|
float
|
|
|
|
|
GraphDelayCalc::loadCap(const Pin *,
|
|
|
|
|
Parasitic *,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const DcalcAnalysisPt *) const
|
|
|
|
|
{
|
|
|
|
|
return 0.0F;
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-28 07:46:24 +02:00
|
|
|
float
|
|
|
|
|
GraphDelayCalc::loadCap(const Pin *,
|
|
|
|
|
const DcalcAnalysisPt *) const
|
|
|
|
|
{
|
|
|
|
|
return 0.0F;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 17:54:21 +02:00
|
|
|
void
|
|
|
|
|
GraphDelayCalc::netCaps(const Pin *,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const DcalcAnalysisPt *,
|
|
|
|
|
// Return values.
|
|
|
|
|
float &pin_cap,
|
|
|
|
|
float &wire_cap,
|
|
|
|
|
float &fanout,
|
|
|
|
|
bool &has_set_load) const
|
|
|
|
|
{
|
|
|
|
|
pin_cap = wire_cap = fanout = 0.0F;
|
|
|
|
|
has_set_load = false;
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-14 08:53:17 +01:00
|
|
|
float
|
|
|
|
|
GraphDelayCalc::ceff(Edge *,
|
|
|
|
|
TimingArc *,
|
|
|
|
|
const DcalcAnalysisPt *)
|
|
|
|
|
{
|
|
|
|
|
return 0.0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 17:54:21 +02:00
|
|
|
void
|
|
|
|
|
GraphDelayCalc::minPulseWidth(const Pin *pin,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *hi_low,
|
2018-09-28 17:54:21 +02:00
|
|
|
DcalcAPIndex ap_index,
|
|
|
|
|
const MinMax *min_max,
|
|
|
|
|
// Return values.
|
|
|
|
|
float &min_width,
|
|
|
|
|
bool &exists)
|
|
|
|
|
{
|
|
|
|
|
// Sdf annotation.
|
|
|
|
|
graph_->widthCheckAnnotation(pin, hi_low, ap_index,
|
|
|
|
|
min_width, exists);
|
|
|
|
|
if (!exists) {
|
|
|
|
|
// Liberty library.
|
|
|
|
|
LibertyPort *port = network_->libertyPort(pin);
|
|
|
|
|
if (port) {
|
|
|
|
|
Instance *inst = network_->instance(pin);
|
2019-03-13 01:25:53 +01:00
|
|
|
Pvt *pvt = inst ? sdc_->pvt(inst, min_max) : nullptr;
|
2018-09-28 17:54:21 +02:00
|
|
|
OperatingConditions *op_cond=sdc_->operatingConditions(min_max);
|
|
|
|
|
port->minPulseWidth(hi_low, op_cond, pvt, min_width, exists);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
GraphDelayCalc::minPeriod(const Pin *pin,
|
|
|
|
|
// Return values.
|
|
|
|
|
float &min_period,
|
|
|
|
|
bool &exists)
|
|
|
|
|
{
|
|
|
|
|
exists = false;
|
|
|
|
|
const MinMax *min_max = MinMax::max();
|
2019-07-18 15:19:00 +02:00
|
|
|
for (auto dcalc_ap : corners_->dcalcAnalysisPts()) {
|
2018-09-28 17:54:21 +02:00
|
|
|
// Sdf annotation.
|
|
|
|
|
float min_period1 = 0.0;
|
|
|
|
|
bool exists1 = false;
|
|
|
|
|
graph_->periodCheckAnnotation(pin, dcalc_ap->index(),
|
|
|
|
|
min_period, exists);
|
|
|
|
|
if (exists1
|
|
|
|
|
&& (!exists || min_period1 < min_period)) {
|
|
|
|
|
min_period = min_period1;
|
|
|
|
|
exists = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!exists) {
|
|
|
|
|
LibertyPort *port = network_->libertyPort(pin);
|
|
|
|
|
if (port) {
|
|
|
|
|
// Liberty library.
|
|
|
|
|
Instance *inst = network_->instance(pin);
|
|
|
|
|
OperatingConditions *op_cond = sdc_->operatingConditions(min_max);
|
2019-03-13 01:25:53 +01:00
|
|
|
Pvt *pvt = inst ? sdc_->pvt(inst, min_max) : nullptr;
|
2018-09-28 17:54:21 +02:00
|
|
|
port->minPeriod(op_cond, pvt, min_period, exists);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace
|