OpenSTA/search/Crpr.hh

96 lines
2.8 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2022, 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
2020-04-05 23:53:44 +02:00
#include "SdcClass.hh"
#include "StaState.hh"
#include "SearchClass.hh"
2018-09-28 17:54:21 +02:00
namespace sta {
class CrprPaths;
// Clock Reconvergence Pessimism Removal.
2018-12-11 19:47:04 +01:00
class CheckCrpr : public StaState
2018-09-28 17:54:21 +02:00
{
public:
2018-12-11 19:47:04 +01:00
explicit CheckCrpr(StaState *sta);
2018-09-28 17:54:21 +02:00
// Find the maximum possible crpr (clock min/max delta delay) for path.
Arrival maxCrpr(ClkInfo *clk_info);
// Timing check CRPR.
2018-12-11 19:47:04 +01:00
Crpr checkCrpr(const Path *src_clk_path,
const PathVertex *tgt_clk_path);
2018-09-28 17:54:21 +02:00
void checkCrpr(const Path *src_path,
const PathVertex *tgt_clk_path,
// Return values.
2018-12-11 19:47:04 +01:00
Crpr &crpr,
2018-09-28 17:54:21 +02:00
Pin *&crpr_pin);
// Output delay CRPR.
2018-12-11 19:47:04 +01:00
Crpr outputDelayCrpr(const Path *src_clk_path,
const ClockEdge *tgt_clk_edge);
2018-09-28 17:54:21 +02:00
void outputDelayCrpr(const Path *src_clk_path,
const ClockEdge *tgt_clk_edge,
// Return values.
2018-12-11 19:47:04 +01:00
Crpr &crpr,
2018-09-28 17:54:21 +02:00
Pin *&crpr_pin);
// Previous clk path when crpr is enabled.
2020-09-26 02:35:56 +02:00
PathVertex clkPathPrev(const PathVertex *path);
2018-09-28 17:54:21 +02:00
// For Search::reportArrivals.
2020-09-26 02:35:56 +02:00
PathVertex clkPathPrev(Vertex *vertex,
int arrival_index);
2018-09-28 17:54:21 +02:00
private:
2020-09-26 02:35:56 +02:00
PathVertex *clkPathPrev(const PathVertex *path,
PathVertex &tmp);
2018-09-28 17:54:21 +02:00
Arrival otherMinMaxArrival(const PathVertex *path);
void checkCrpr1(const Path *src_path,
const PathVertex *tgt_clk_path,
bool same_pin,
// Return values.
2018-12-11 19:47:04 +01:00
Crpr &crpr,
2018-09-28 17:54:21 +02:00
Pin *&crpr_pin);
void outputDelayCrpr1(const Path *src_path,
const ClockEdge *tgt_clk_edge,
const PathAnalysisPt *tgt_path_ap,
bool same_pin,
// Return values.
2018-12-11 19:47:04 +01:00
Crpr &crpr,
2018-09-28 17:54:21 +02:00
Pin *&crpr_pin);
bool crprPossible(Clock *clk1,
Clock *clk2);
void genClkSrcPaths(const PathVertex *path,
PathVertexSeq &gclk_paths);
void findCrpr(const PathVertex *src_clk_path,
const PathVertex *tgt_clk_path,
bool same_pin,
// Return values.
2018-12-11 19:47:04 +01:00
Crpr &crpr,
2018-09-28 17:54:21 +02:00
Pin *&common_pin);
void portClkPath(const ClockEdge *clk_edge,
const Pin *clk_src_pin,
const PathAnalysisPt *path_ap,
// Return value.
PathVertex &port_clk_path);
2018-12-11 19:47:04 +01:00
Crpr findCrpr1(const PathVertex *src_clk_path,
const PathVertex *tgt_clk_path);
2018-09-28 17:54:21 +02:00
float crprArrivalDiff(const PathVertex *path);
};
} // namespace