2018-09-28 17:54:21 +02:00
|
|
|
// OpenSTA, Static Timing Analyzer
|
2023-02-19 01:55:40 +01:00
|
|
|
// Copyright (c) 2023, 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-02-16 01:13:16 +01:00
|
|
|
#pragma once
|
2018-09-28 17:54:21 +02:00
|
|
|
|
2023-11-19 18:04:45 +01:00
|
|
|
#include "ArcDelayCalc.hh"
|
2018-09-28 17:54:21 +02:00
|
|
|
|
|
|
|
|
namespace sta {
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
class GateTableModel;
|
|
|
|
|
|
2023-11-19 18:04:45 +01:00
|
|
|
class DelayCalcBase : public ArcDelayCalc
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2023-11-19 18:04:45 +01:00
|
|
|
explicit DelayCalcBase(StaState *sta);
|
2024-01-07 21:44:04 +01:00
|
|
|
void finishDrvrPin() override;
|
|
|
|
|
|
|
|
|
|
ArcDelay checkDelay(const Pin *check_pin,
|
|
|
|
|
const TimingArc *arc,
|
|
|
|
|
const Slew &from_slew,
|
|
|
|
|
const Slew &to_slew,
|
|
|
|
|
float related_out_cap,
|
2023-03-24 23:15:57 +01:00
|
|
|
const DcalcAnalysisPt *dcalc_ap) override;
|
2024-01-07 21:44:04 +01:00
|
|
|
|
|
|
|
|
string reportCheckDelay(const Pin *check_pin,
|
|
|
|
|
const TimingArc *arc,
|
|
|
|
|
const Slew &from_slew,
|
|
|
|
|
const char *from_slew_annotation,
|
|
|
|
|
const Slew &to_slew,
|
|
|
|
|
float related_out_cap,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap,
|
|
|
|
|
int digits) override;
|
2018-09-28 17:54:21 +02:00
|
|
|
|
|
|
|
|
protected:
|
2024-01-07 21:44:04 +01:00
|
|
|
GateTimingModel *gateModel(const TimingArc *arc,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap) const;
|
|
|
|
|
GateTableModel *gateTableModel(const TimingArc *arc,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap) const;
|
|
|
|
|
CheckTimingModel *checkModel(const TimingArc *arc,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap) const;
|
|
|
|
|
TimingModel *model(const TimingArc *arc,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap) const;
|
2023-11-19 18:04:45 +01:00
|
|
|
// Find the liberty library to use for logic/slew thresholds.
|
|
|
|
|
LibertyLibrary *thresholdLibrary(const Pin *load_pin);
|
|
|
|
|
// Adjust load_delay and load_slew from driver thresholds to load thresholds.
|
|
|
|
|
void thresholdAdjust(const Pin *load_pin,
|
2024-01-07 21:44:04 +01:00
|
|
|
const LibertyLibrary *drvr_library,
|
|
|
|
|
const RiseFall *rf,
|
2023-11-19 18:04:45 +01:00
|
|
|
ArcDelay &load_delay,
|
|
|
|
|
Slew &load_slew);
|
2018-09-28 17:54:21 +02:00
|
|
|
// Helper function for input ports driving dspf parasitic.
|
|
|
|
|
void dspfWireDelaySlew(const Pin *load_pin,
|
2024-01-07 21:44:04 +01:00
|
|
|
const RiseFall *rf,
|
|
|
|
|
Slew drvr_slew,
|
|
|
|
|
float elmore,
|
|
|
|
|
// Return values.
|
2018-09-28 17:54:21 +02:00
|
|
|
ArcDelay &wire_delay,
|
|
|
|
|
Slew &load_slew);
|
2024-01-07 21:44:04 +01:00
|
|
|
const Pvt *pinPvt(const Pin *pin,
|
|
|
|
|
const DcalcAnalysisPt *dcalc_ap);
|
2018-09-28 17:54:21 +02:00
|
|
|
|
2023-11-19 18:04:45 +01:00
|
|
|
// Parasitics returned by findParasitic that are reduced or estimated
|
|
|
|
|
// that can be deleted after delay calculation for the driver pin
|
|
|
|
|
// is finished.
|
|
|
|
|
Vector<Parasitic*> unsaved_parasitics_;
|
|
|
|
|
Vector<const Pin *> reduced_parasitic_drvrs_;
|
2018-09-28 17:54:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace
|