OpenSTA/include/sta/ArcDelayCalc.hh

145 lines
4.4 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
2020-03-07 03:50:37 +01:00
// Copyright (c) 2020, 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
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2020-02-16 01:13:16 +01:00
#pragma once
2018-09-28 17:54:21 +02:00
#include <string>
2020-04-05 23:53:44 +02:00
#include "DisallowCopyAssign.hh"
#include "MinMax.hh"
#include "LibertyClass.hh"
#include "NetworkClass.hh"
#include "Delay.hh"
#include "StaState.hh"
2018-09-28 17:54:21 +02:00
namespace sta {
using std::string;
class Parasitic;
class DcalcAnalysisPt;
// Delay calculator class hierarchy.
// ArcDelayCalc
// UnitDelayCalc
// LumpedCapDelayCalc
// RCDelayCalc
// SimpleRCDelayCalc
// DmpCeffDelayCalc
// DmpCeffElmoreDelayCalc
// DmpCeffTwoPoleDelayCalc
// Abstract class to interface to a delay calculator primitive.
class ArcDelayCalc : public StaState
{
public:
explicit ArcDelayCalc(StaState *sta);
virtual ~ArcDelayCalc() {}
virtual ArcDelayCalc *copy() = 0;
// Find the parasitic for drvr_pin that is acceptable to the delay
// calculator by probing parasitics_.
virtual Parasitic *findParasitic(const Pin *drvr_pin,
2019-11-11 23:30:19 +01:00
const RiseFall *rf,
const DcalcAnalysisPt *dcalc_ap) = 0;
2018-09-28 17:54:21 +02:00
// Find the wire delays and slews for an input port without a driving cell.
// This call primarily initializes the load delay/slew iterator.
virtual void inputPortDelay(const Pin *port_pin,
float in_slew,
2019-11-11 23:30:19 +01:00
const RiseFall *rf,
2018-09-28 17:54:21 +02:00
Parasitic *parasitic,
const DcalcAnalysisPt *dcalc_ap) = 0;
// Find the delay and slew for arc driving drvr_pin.
virtual void gateDelay(const LibertyCell *drvr_cell,
TimingArc *arc,
const Slew &in_slew,
// Pass in load_cap or drvr_parasitic.
float load_cap,
Parasitic *drvr_parasitic,
float related_out_cap,
2019-01-27 08:03:01 +01:00
const Pvt *pvt,
const DcalcAnalysisPt *dcalc_ap,
2018-09-28 17:54:21 +02:00
// Return values.
2018-11-26 18:15:52 +01:00
ArcDelay &gate_delay,
Slew &drvr_slew) = 0;
2018-09-28 17:54:21 +02:00
// Find the wire delay and load slew of a load pin.
// Called after inputPortDelay or gateDelay.
virtual void loadDelay(const Pin *load_pin,
// Return values.
ArcDelay &wire_delay,
Slew &load_slew) = 0;
virtual void setMultiDrvrSlewFactor(float factor) = 0;
2018-11-26 18:15:52 +01:00
// Ceff for parasitics with pi models.
virtual float ceff(const LibertyCell *drvr_cell,
TimingArc *arc,
const Slew &in_slew,
float load_cap,
Parasitic *drvr_parasitic,
float related_out_cap,
const Pvt *pvt,
const DcalcAnalysisPt *dcalc_ap) = 0;
2018-09-28 17:54:21 +02:00
// Find the delay for a timing check arc given the arc's
// from/clock, to/data slews and related output pin parasitic.
2018-11-26 18:15:52 +01:00
virtual void checkDelay(const LibertyCell *drvr_cell,
TimingArc *arc,
const Slew &from_slew,
const Slew &to_slew,
float related_out_cap,
const Pvt *pvt,
const DcalcAnalysisPt *dcalc_ap,
// Return values.
ArcDelay &margin) = 0;
2018-09-28 17:54:21 +02:00
// Report delay and slew calculation.
virtual void reportGateDelay(const LibertyCell *drvr_cell,
TimingArc *arc,
const Slew &in_slew,
// Pass in load_cap or drvr_parasitic.
float load_cap,
Parasitic *drvr_parasitic,
float related_out_cap,
const Pvt *pvt,
const DcalcAnalysisPt *dcalc_ap,
int digits,
string *result) = 0;
// Report timing check delay calculation.
virtual void reportCheckDelay(const LibertyCell *cell,
TimingArc *arc,
const Slew &from_slew,
const char *from_slew_annotation,
const Slew &to_slew,
float related_out_cap,
const Pvt *pvt,
const DcalcAnalysisPt *dcalc_ap,
int digits,
string *result) = 0;
virtual void finishDrvrPin() = 0;
2018-09-28 17:54:21 +02:00
protected:
GateTimingModel *gateModel(TimingArc *arc,
const DcalcAnalysisPt *dcalc_ap) const;
CheckTimingModel *checkModel(TimingArc *arc,
const DcalcAnalysisPt *dcalc_ap) const;
TimingModel *model(TimingArc *arc,
const DcalcAnalysisPt *dcalc_ap) const;
private:
DISALLOW_COPY_AND_ASSIGN(ArcDelayCalc);
};
} // namespace