Files
OpenSTA/include/sta/SdcClass.hh
T

140 lines
3.9 KiB
C++
Raw Normal View History

2018-09-28 08:54:21 -07:00
// OpenSTA, Static Timing Analyzer
2026-03-10 13:21:17 -07:00
// Copyright (c) 2026, 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/>.
2025-01-21 18:54:33 -07:00
//
// The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// This notice may not be removed or altered from any source distribution.
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
2026-01-03 16:59:35 -08:00
#include <map>
#include <set>
#include <vector>
2020-04-05 14:53:44 -07:00
#include "LibertyClass.hh"
#include "MinMaxValues.hh"
2026-04-15 09:38:10 -07:00
#include "NetworkClass.hh"
2020-04-05 14:53:44 -07:00
#include "PinPair.hh"
2026-04-15 09:38:10 -07:00
#include "Transition.hh"
2018-09-28 08:54:21 -07:00
namespace sta {
class Sdc;
class Clock;
class ClockEdge;
class CycleAccting;
class InputDelay;
class OutputDelay;
class FalsePath;
class PathDelay;
class MultiCyclePath;
class FilterPath;
class GroupPath;
class ExceptionFromTo;
class ExceptionFrom;
class ExceptionThru;
class ExceptionTo;
class ExceptionPt;
class InputDrive;
class MinMax;
class MinMaxAll;
class RiseFallMinMax;
class DisabledInstancePorts;
class DisabledCellPorts;
class ExceptionPath;
class DataCheck;
class Wireload;
class ClockLatency;
class ClockInsertion;
class ClockGroups;
2021-12-06 16:36:01 -07:00
class PortDelay;
2018-09-28 08:54:21 -07:00
2019-03-12 17:25:53 -07:00
enum class AnalysisType { single, bc_wc, ocv };
2018-09-28 08:54:21 -07:00
2019-03-12 17:25:53 -07:00
enum class ExceptionPathType { false_path, loop, multi_cycle, path_delay,
2026-01-03 16:59:35 -08:00
group_path, filter, any};
2018-09-28 08:54:21 -07:00
2019-03-12 17:25:53 -07:00
enum class ClockSense { positive, negative, stop };
2018-09-28 08:54:21 -07:00
2026-01-03 16:59:35 -08:00
using ClockPair = std::pair<const Clock*, const Clock*>;
2018-09-28 08:54:21 -07:00
2023-01-19 11:23:45 -07:00
class ClockIndexLess
{
public:
bool operator()(const Clock *clk1,
const Clock *clk2) const;
};
2026-01-03 16:59:35 -08:00
using FloatSeq = std::vector<float>;
using IntSeq = std::vector<int>;
using ClockSeq = std::vector<Clock*>;
using ConstClockSeq = std::vector<const Clock*>;
using ClockSet = std::set<Clock*, ClockIndexLess>;
using ConstClockSet = std::set<const Clock*, ClockIndexLess>;
using ClockGroup = ClockSet;
using PinSetSeq = std::vector<PinSet*>;
using SetupHold = MinMax;
using SetupHoldAll = MinMaxAll;
using ExceptionThruSeq = std::vector<ExceptionThru*>;
using LibertyPortPairSet = std::set<LibertyPortPair, LibertyPortPairLess>;
using DisabledInstancePortsMap = std::map<const Instance*, DisabledInstancePorts*>;
using DisabledCellPortsMap = std::map<LibertyCell*, DisabledCellPorts*>;
using ClockUncertainties = MinMaxValues<float>;
using ExceptionPathSet = std::set<ExceptionPath*>;
using EdgePins = PinPair;
using EdgePinsSet = PinPairSet;
using LogicValueMap = std::map<const Pin*, LogicValue>;
2023-01-19 11:23:45 -07:00
class ClockSetLess
{
public:
bool operator()(const ClockSet *set1,
const ClockSet *set2) const;
};
2026-01-03 16:59:35 -08:00
using ClockGroupSet = std::set<ClockGroup*, ClockSetLess>;
2018-09-28 08:54:21 -07:00
// For Search.
class ExceptionState;
2023-01-19 11:23:45 -07:00
class ExceptionStateLess
{
public:
bool operator()(const ExceptionState *state1,
const ExceptionState *state2) const;
};
2018-09-28 08:54:21 -07:00
class ExceptionPath;
2026-01-03 16:59:35 -08:00
using ExceptionStateSet = std::set<ExceptionState*, ExceptionStateLess>;
2018-09-28 08:54:21 -07:00
// Constraint applies to clock or data paths.
2019-03-12 17:25:53 -07:00
enum class PathClkOrData { clk, data };
2018-09-28 08:54:21 -07:00
2026-04-15 09:38:10 -07:00
const size_t path_clk_or_data_count = 2;
2018-09-28 08:54:21 -07:00
2019-03-12 17:25:53 -07:00
enum class TimingDerateType { cell_delay, cell_check, net_delay };
2026-04-15 09:38:10 -07:00
constexpr size_t timing_derate_type_count = 3;
2022-01-13 16:29:38 -07:00
enum class TimingDerateCellType { cell_delay, cell_check };
2026-04-15 09:38:10 -07:00
constexpr size_t timing_derate_cell_type_count = 2;
using DriveCellSlews = std::array<float, RiseFall::index_count>;
2018-09-28 08:54:21 -07:00
2026-04-13 14:58:16 -07:00
} // namespace sta