// OpenSTA, Static Timing Analyzer // Copyright (c) 2025, 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 . // // 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. #pragma once #include #include #include #include #include #include #include "Iterator.hh" namespace sta { class Network; class NetworkEdit; class NetworkReader; class Library; class Cell; class Port; class PortDirection; class Instance; class Pin; class Term; class Net; class ConstantPinIterator; class ViewType; class LibertyLibrary; using LibraryIterator = Iterator; using LibertyLibraryIterator = Iterator; using CellSeq = std::vector; using PortSeq = std::vector; using CellPortIterator = Iterator; using CellPortBitIterator = Iterator; using PortMemberIterator = Iterator; using PinSeq = std::vector; using PinUnorderedSet = std::unordered_set; using InstanceSeq = std::vector; using NetSeq = std::vector; using ConstNetSeq = std::vector; using InstanceChildIterator = Iterator; using InstancePinIterator = Iterator; using InstanceNetIterator = Iterator; using LeafInstanceIterator = Iterator; using NetIterator = Iterator; using NetPinIterator = Iterator; using NetTermIterator = Iterator; using ConnectedPinIterator = Iterator; using NetConnectedPinIterator = ConnectedPinIterator; using PinConnectedPinIterator = ConnectedPinIterator; using ObjectId = uint32_t; using AttributeMap = std::map; enum class LogicValue : unsigned { zero, one, unknown, rise, fall }; class CellIdLess { public: CellIdLess(const Network *network); bool operator()(const Cell *cell1, const Cell *cell2) const; private: const Network *network_; }; class PortIdLess { public: PortIdLess(const Network *network); bool operator()(const Port *port1, const Port *port2) const; private: const Network *network_; }; class InstanceIdLess { public: InstanceIdLess(const Network *network); bool operator()(const Instance *inst1, const Instance *inst2) const; private: const Network *network_; }; class PinIdLess { public: PinIdLess(const Network *network); bool operator()(const Pin *pin1, const Pin *pin2) const; private: const Network *network_; }; class PinIdHash { public: PinIdHash(const Network *network); size_t operator()(const Pin *pin) const; private: const Network *network_; }; class NetIdLess { public: NetIdLess(const Network *network); bool operator()(const Net *net1, const Net *net2) const; private: const Network *network_; }; //////////////////////////////////////////////////////////////// class CellSet : public std::set { public: CellSet(const Network *network); }; class PortSet : public std::set { public: PortSet(const Network *network); }; class InstanceSet : public std::set { public: InstanceSet(); InstanceSet(const Network *network); }; class PinSet : public std::set { public: PinSet(); PinSet(const Network *network); }; class NetSet : public std::set { public: NetSet(); NetSet(const Network *network); }; } // namespace