forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Latches.hh
107 lines (100 loc) · 3.39 KB
/
Latches.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2022, 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/>.
#pragma once
#include "GraphClass.hh"
#include "SearchClass.hh"
#include "SdcClass.hh"
#include "StaState.hh"
namespace sta {
enum class LatchEnableState { enabled, open, closed };
// Latches class defines latch behavior.
class Latches : public StaState
{
public:
Latches(StaState *sta);
void latchTimeGivenToStartpoint(Path *d_path,
Path *q_path,
Edge *d_q_edge,
// Return values.
Arrival &time_given,
PathVertex &enable_path);
void latchRequired(const Path *data_path,
const PathVertex *enable_path,
const PathVertex *disable_path,
MultiCyclePath *mcp,
PathDelay *path_delay,
Arrival src_clk_latency,
const ArcDelay &margin,
// Return values.
Required &required,
Delay &borrow,
Arrival &adjusted_data_arrival,
Delay &time_given_to_startpoint);
void latchRequired(const Path *data_path,
const PathVertex *enable_path,
const PathVertex *disable_path,
const PathAnalysisPt *path_ap,
// Return values.
Required &required,
Delay &borrow,
Arrival &adjusted_data_arrival,
Delay &time_given_to_startpoint);
void latchBorrowInfo(const Path *data_path,
const PathVertex *enable_path,
const PathVertex *disable_path,
const ArcDelay &margin,
bool ignore_clk_latency,
// Return values.
float &nom_pulse_width,
Delay &open_latency,
Delay &latency_diff,
float &open_uncertainty,
Crpr &open_crpr,
Crpr &crpr_diff,
Delay &max_borrow,
bool &borrow_limit_exists);
bool isLatchDtoQ(Edge *edge) const;
// Find the latch EN->Q edge for a D->Q edge.
void latchDtoQEnable(Edge *d_q_edge,
const Instance *inst,
// Return values.
Vertex *&enable_vertex,
RiseFall *&enable_rf,
LatchEnableState &state) const;
LatchEnableState latchDtoQState(Edge *d_q_edge) const;
void latchEnableOtherPath(Path *path,
const PathAnalysisPt *tgt_clk_path_ap,
// Return value.
PathVertex &other_path);
void latchEnablePath(Path *q_path, Edge *d_q_edge,
// Return value.
PathVertex &enable_path) const;
void latchOutArrival(Path *data_path,
TimingArc *d_q_arc,
Edge *d_q_edge,
const PathAnalysisPt *path_ap,
Tag *&q_tag,
ArcDelay &arc_delay,
Arrival &q_arrival);
protected:
ArcDelay latchSetupMargin(Vertex *data_vertex,
const RiseFall *data_rf,
const Path *disable_path,
const PathAnalysisPt *path_ap);
ExceptionPath *exceptionTo(Path *data_path,
const ClockEdge *en_clk_edge);
};
} // namespace