OpenSTA/include/sta/PathVertexRep.hh

76 lines
2.5 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2025, 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/>.
//
// 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 17:54:21 +02:00
2020-02-16 01:13:16 +01:00
#pragma once
2018-09-28 17:54:21 +02:00
2020-04-05 23:53:44 +02:00
#include "SdcClass.hh"
#include "SearchClass.hh"
2018-09-28 17:54:21 +02:00
2019-11-11 16:28:42 +01:00
namespace sta {
2018-09-28 17:54:21 +02:00
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
// "Pointer" to a previous path on a vertex (PathVertex) thru an edge/arc.
2018-09-28 17:54:21 +02:00
class PathVertexRep
{
public:
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
PathVertexRep();
PathVertexRep(const PathVertex *path,
const Edge *prev_edge,
const TimingArc *prev_arc,
const StaState *sta);
2018-09-28 17:54:21 +02:00
void init();
void init(const PathVertexRep *path);
void init(const PathVertexRep &path);
void init(const PathVertex *path,
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
const Edge *prev_edge,
const TimingArc *prev_arc,
2018-09-28 17:54:21 +02:00
const StaState *sta);
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
bool isNull() const;
const char *name(const StaState *sta) const;
Vertex *vertex(const StaState *sta) const;
VertexId vertexId(const StaState *sta) const;
Edge *prevEdge(const StaState *sta) const;
TimingArc *prevArc(const StaState *sta) const;
2018-09-28 17:54:21 +02:00
Tag *tag(const StaState *sta) const;
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
TagIndex tagIndex() const { return prev_tag_index_; }
2018-09-28 17:54:21 +02:00
Arrival arrival(const StaState *sta) const;
void prevPath(const StaState *sta,
// Return values.
PathRef &prev_path,
TimingArc *&prev_arc) const;
static bool equal(const PathVertexRep *path1,
const PathVertexRep *path2);
static bool equal(const PathVertexRep &path1,
const PathVertexRep &path2);
static int cmp(const PathVertexRep &path1,
const PathVertexRep &path2);
protected:
report_checks -endpoint_path_count speedup commit 265f5d69051c823656fcfedfa7e086255c4df4d2 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 26 14:43:28 2025 -0800 PathEnum::makeDivertedPath rm visited set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bbf28deab4f01eb925b4d7c86e23f4ec39e8d11d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 11:37:38 2025 -0700 Search::always_save_prev_paths_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit fd587877c3931ea6dd05d2f21d53365fd70d4268 Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 22 08:33:34 2025 -0700 PathVertexRep -> PathPrev Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3c972474b85875c1acaea808eb66fcfd26356120 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 21 11:26:02 2025 -0700 PathVertexPtr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3755de934a8ecd292595d781ef794d60f0f5a67b Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:34 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 3dca0c21c0117bc2fc64ee94ddb1513f3ff92d30 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 17:19:15 2025 -0700 PathVertexPtr for ClkInfo Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 419f78f75d1393b8b07de1e7028960a5fb7c8cad Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 16:05:44 2025 -0700 PathVertexRep rm unused funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 32052f32eb09e6fe7fb2e3c3953ee55b5aaf976f Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 14:49:19 2025 -0700 PathVertexRep rm vertex_id_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 89c65de68b12daa1c3869b83a5fd9afbcb2ce098 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:21:16 2025 -0700 rm Search::arrivalInvalidDelete Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 7d5d88ed124b94e08da433e1c6ea70629aa6c6e7 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 20 09:17:35 2025 -0700 passes fast Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e6810d64993938e912b7cf89a4c36b24d744270f Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 19 21:05:45 2025 -0700 always save prev_path Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2025-02-26 23:44:38 +01:00
EdgeId prev_edge_id_;
TagIndex prev_tag_index_:tag_index_bit_count;
unsigned prev_arc_idx_:2;
2018-09-28 17:54:21 +02:00
};
} // namespace