Files
OpenSTA/include/sta/TimingModel.hh
T

89 lines
2.7 KiB
C++
Raw Normal View History

2018-09-28 08:54:21 -07:00
// OpenSTA, Static Timing Analyzer
2023-02-18 17:55:40 -07:00
// Copyright (c) 2023, Parallax Software, Inc.
2018-09-28 08:54:21 -07: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 10:17:08 -07:00
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2018-09-28 08:54:21 -07:00
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
2022-01-04 10:17:08 -07:00
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2018-09-28 08:54:21 -07:00
2020-02-15 17:13:16 -07:00
#pragma once
2018-09-28 08:54:21 -07:00
#include <string>
2023-06-15 08:59:56 -07:00
2020-04-05 14:53:44 -07:00
#include "Delay.hh"
#include "LibertyClass.hh"
2018-09-28 08:54:21 -07:00
namespace sta {
using std::string;
2023-02-08 09:23:24 -07:00
// Abstract base class for GateTimingModel and CheckTimingModel.
2018-09-28 08:54:21 -07:00
class TimingModel
{
public:
virtual ~TimingModel() {}
protected:
virtual void setIsScaled(bool is_scaled) = 0;
friend class LibertyCell;
};
2023-02-08 09:23:24 -07:00
// Abstract base class for LinearModel and TableModel.
2018-09-28 08:54:21 -07:00
class GateTimingModel : public TimingModel
{
public:
// Gate delay calculation.
virtual void gateDelay(const LibertyCell *cell,
const Pvt *pvt,
float in_slew,
float load_cap,
float related_out_cap,
2019-01-26 23:03:01 -08:00
bool pocv_enabled,
2018-09-28 08:54:21 -07:00
// Return values.
2018-11-26 09:15:52 -08:00
ArcDelay &gate_delay,
Slew &drvr_slew) const = 0;
2023-03-24 15:15:57 -07:00
virtual string reportGateDelay(const LibertyCell *cell,
const Pvt *pvt,
float in_slew,
float load_cap,
float related_out_cap,
bool pocv_enabled,
int digits) const = 0;
2018-09-28 08:54:21 -07:00
virtual float driveResistance(const LibertyCell *cell,
const Pvt *pvt) const = 0;
};
// Abstract base class for timing check timing models.
class CheckTimingModel : public TimingModel
{
public:
// Timing check margin delay calculation.
2018-11-26 09:15:52 -08:00
virtual void checkDelay(const LibertyCell *cell,
const Pvt *pvt,
float from_slew,
float to_slew,
float related_out_cap,
2019-01-26 23:03:01 -08:00
bool pocv_enabled,
2018-11-26 09:15:52 -08:00
// Return values.
ArcDelay &margin) const = 0;
2023-03-24 15:15:57 -07:00
virtual string reportCheckDelay(const LibertyCell *cell,
const Pvt *pvt,
float from_slew,
const char *from_slew_annotation,
float to_slew,
float related_out_cap,
bool pocv_enabled,
int digits) const = 0;
2018-09-28 08:54:21 -07:00
};
} // namespace