OpenSTA/include/sta/TimingModel.hh

88 lines
2.7 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
// 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
// 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
// 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
#include <string>
2020-04-05 23:53:44 +02:00
#include "Delay.hh"
#include "LibertyClass.hh"
2018-09-28 17:54:21 +02:00
namespace sta {
using std::string;
liberty ccs support commit 8f90f9e7ba1eb29621faa3efed9154501c600537 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 3 09:02:22 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0bb6b07fd965dc948a63ed383ac05893af4cbd87 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 2 08:07:17 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 408a19ae7750bdd41641ac6efebec0df565987bc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 16:55:03 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a193adf0efdfa9c2a3b4272609e03f9279fc3479 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 16:37:36 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f26f47698ccd3a43d31f031f5cb6a70f0ffe1f91 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 10:34:41 2023 -0700 cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 54613569fcb9d714b77833d54492b4dc8121a966 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 10:18:20 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4e34c391abc46e9e98d78725e139d739aff7fd44 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 09:05:43 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7b1e5af344948d84f82621d054efa206508a5cb8 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 31 08:58:23 2023 -0700 table report Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 501a53715f27a1ada6477f29b2efdc96fbaec8be Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 31 08:33:53 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e68cd932db03724e1344259d79bd6397cca777d2 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 30 11:47:01 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1b279d3ae1e4a8fc156ee92999eab92e6a0a50ff Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 29 13:56:05 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 43e039650373f9a9bb9e7b7cae6b48d7d2db455b Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 29 11:54:08 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 648965c2433f4e7ed87371fced85e80d0198df10 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 27 19:16:39 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02ac4e3e3f3f97308ff71a2f9984aa3aacb6e7ee Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 24 09:40:22 2023 -0700 ccs liberty Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2023-02-08 17:23:24 +01:00
// Abstract base class for GateTimingModel and CheckTimingModel.
2018-09-28 17:54:21 +02:00
class TimingModel
{
public:
virtual ~TimingModel() {}
protected:
virtual void setIsScaled(bool is_scaled) = 0;
friend class LibertyCell;
};
liberty ccs support commit 8f90f9e7ba1eb29621faa3efed9154501c600537 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 3 09:02:22 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0bb6b07fd965dc948a63ed383ac05893af4cbd87 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 2 08:07:17 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 408a19ae7750bdd41641ac6efebec0df565987bc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 16:55:03 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit a193adf0efdfa9c2a3b4272609e03f9279fc3479 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 16:37:36 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f26f47698ccd3a43d31f031f5cb6a70f0ffe1f91 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 10:34:41 2023 -0700 cleanup Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 54613569fcb9d714b77833d54492b4dc8121a966 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 10:18:20 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4e34c391abc46e9e98d78725e139d739aff7fd44 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 1 09:05:43 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7b1e5af344948d84f82621d054efa206508a5cb8 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 31 08:58:23 2023 -0700 table report Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 501a53715f27a1ada6477f29b2efdc96fbaec8be Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 31 08:33:53 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e68cd932db03724e1344259d79bd6397cca777d2 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Jan 30 11:47:01 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1b279d3ae1e4a8fc156ee92999eab92e6a0a50ff Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 29 13:56:05 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 43e039650373f9a9bb9e7b7cae6b48d7d2db455b Author: James Cherry <cherry@parallaxsw.com> Date: Sun Jan 29 11:54:08 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 648965c2433f4e7ed87371fced85e80d0198df10 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Jan 27 19:16:39 2023 -0700 ccs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 02ac4e3e3f3f97308ff71a2f9984aa3aacb6e7ee Author: James Cherry <cherry@parallaxsw.com> Date: Tue Jan 24 09:40:22 2023 -0700 ccs liberty Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2023-02-08 17:23:24 +01:00
// Abstract base class for LinearModel and TableModel.
2018-09-28 17:54:21 +02: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-27 08:03:01 +01:00
bool pocv_enabled,
2018-09-28 17:54:21 +02:00
// Return values.
2018-11-26 18:15:52 +01:00
ArcDelay &gate_delay,
Slew &drvr_slew) const = 0;
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 17:54:21 +02: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 18:15:52 +01:00
virtual void checkDelay(const LibertyCell *cell,
const Pvt *pvt,
float from_slew,
float to_slew,
float related_out_cap,
2019-01-27 08:03:01 +01:00
bool pocv_enabled,
2018-11-26 18:15:52 +01:00
// Return values.
ArcDelay &margin) const = 0;
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 17:54:21 +02:00
};
} // namespace