2018-09-28 17:54:21 +02:00
|
|
|
// OpenSTA, Static Timing Analyzer
|
|
|
|
|
// Copyright (c) 2018, Parallax Software, Inc.
|
|
|
|
|
//
|
|
|
|
|
// 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/>.
|
|
|
|
|
|
2018-12-05 23:18:41 +01:00
|
|
|
#include "config.h"
|
|
|
|
|
|
2018-11-26 18:15:52 +01:00
|
|
|
#ifndef STA_DELAY_H
|
|
|
|
|
#define STA_DELAY_H
|
|
|
|
|
|
2018-12-05 23:18:41 +01:00
|
|
|
#if SSTA
|
|
|
|
|
// Delays are Normal PDFs with early/late sigma.
|
|
|
|
|
#include "DelayNormal2.hh"
|
|
|
|
|
#else
|
|
|
|
|
// Delays are floats.
|
2018-09-28 17:54:21 +02:00
|
|
|
#include "DelayFloat.hh"
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-12-05 23:18:41 +01:00
|
|
|
// API common to DelayFloat and DelayNormal2.
|
2018-11-26 18:15:52 +01:00
|
|
|
namespace sta {
|
|
|
|
|
|
|
|
|
|
class Units;
|
|
|
|
|
class StaState;
|
|
|
|
|
|
|
|
|
|
typedef Delay ArcDelay;
|
|
|
|
|
typedef Delay Slew;
|
|
|
|
|
typedef Delay Arrival;
|
|
|
|
|
typedef Delay Required;
|
|
|
|
|
typedef Delay Slack;
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
initDelayConstants();
|
|
|
|
|
Delay
|
|
|
|
|
makeDelay(float delay,
|
|
|
|
|
float sigma_early,
|
|
|
|
|
float sigma_late);
|
2018-12-11 19:47:04 +01:00
|
|
|
// sigma^2
|
|
|
|
|
Delay
|
|
|
|
|
makeDelay2(float delay,
|
|
|
|
|
float sigma2_early,
|
|
|
|
|
float sigma2_late);
|
2018-11-26 18:15:52 +01:00
|
|
|
float
|
|
|
|
|
delayAsFloat(const Delay &delay);
|
2018-12-05 23:18:41 +01:00
|
|
|
// mean late+/early- sigma
|
|
|
|
|
float
|
|
|
|
|
delayAsFloat(const Delay &delay,
|
|
|
|
|
const EarlyLate *early_late);
|
|
|
|
|
float
|
|
|
|
|
delaySigma(const Delay &delay,
|
|
|
|
|
const EarlyLate *early_late);
|
2018-12-11 19:47:04 +01:00
|
|
|
float
|
|
|
|
|
delaySigma2(const Delay &delay,
|
|
|
|
|
const EarlyLate *early_late);
|
2018-11-26 18:15:52 +01:00
|
|
|
const char *
|
|
|
|
|
delayAsString(const Delay &delay,
|
|
|
|
|
const Units *units);
|
|
|
|
|
const char *
|
|
|
|
|
delayAsString(const Delay &delay,
|
|
|
|
|
const StaState *sta);
|
|
|
|
|
const char *
|
|
|
|
|
delayAsString(const Delay &delay,
|
|
|
|
|
const Units *units,
|
|
|
|
|
int digits);
|
|
|
|
|
const char *
|
2018-12-05 23:18:41 +01:00
|
|
|
delayAsString(const Delay &delay,
|
|
|
|
|
const EarlyLate *early_late,
|
|
|
|
|
const Units *units,
|
|
|
|
|
int digits);
|
2018-11-26 18:15:52 +01:00
|
|
|
const Delay &
|
|
|
|
|
delayInitValue(const MinMax *min_max);
|
|
|
|
|
bool
|
|
|
|
|
delayIsInitValue(const Delay &delay,
|
|
|
|
|
const MinMax *min_max);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyZero(const Delay &delay);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyEqual(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyLess(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyLess(const Delay &delay1,
|
|
|
|
|
const Delay &delay2,
|
|
|
|
|
const MinMax *min_max);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyLessEqual(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyLessEqual(const Delay &delay1,
|
|
|
|
|
const Delay &delay2,
|
|
|
|
|
const MinMax *min_max);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyGreater(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyGreaterEqual(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyGreaterEqual(const Delay &delay1,
|
|
|
|
|
const Delay &delay2,
|
|
|
|
|
const MinMax *min_max);
|
|
|
|
|
bool
|
|
|
|
|
delayFuzzyGreater(const Delay &delay1,
|
|
|
|
|
const Delay &delay2,
|
|
|
|
|
const MinMax *min_max);
|
|
|
|
|
float
|
|
|
|
|
delayRatio(const Delay &delay1,
|
|
|
|
|
const Delay &delay2);
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
#endif
|