forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPortDelay.hh
102 lines (84 loc) · 2.31 KB
/
PortDelay.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
// 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 "RiseFallMinMax.hh"
#include "SdcClass.hh"
namespace sta {
class PortDelay;
typedef Vector<PortDelay*> PortDelaySeq;
// set_input_delay arrival, set_output_delay departure
class PortDelay
{
public:
RiseFallMinMax *delays() { return &delays_; }
Pin *pin() const { return pin_; }
PinSet &leafPins() { return leaf_pins_; }
Clock *clock() const;
ClockEdge *clkEdge() const { return clk_edge_; }
bool sourceLatencyIncluded() const;
void setSourceLatencyIncluded(bool included);
bool networkLatencyIncluded() const;
void setNetworkLatencyIncluded(bool included);
Pin *refPin() const { return ref_pin_; }
RiseFall *refTransition() const;
protected:
PortDelay(Pin *pin,
ClockEdge *clk_edge,
Pin *ref_pin);
Pin *pin_;
ClockEdge *clk_edge_;
bool source_latency_included_;
bool network_latency_included_;
Pin *ref_pin_;
RiseFallMinMax delays_;
PinSet leaf_pins_;
};
class InputDelay : public PortDelay
{
public:
int index() const { return index_; }
protected:
InputDelay(Pin *pin,
ClockEdge *clk_edge,
Pin *ref_pin,
int index,
Network *network);
private:
int index_;
friend class Sdc;
};
class OutputDelay : public PortDelay
{
public:
protected:
OutputDelay(Pin *pin,
ClockEdge *clk_edge,
Pin *ref_pin,
Network *network);
private:
friend class Sdc;
};
// Prediate used to sort port delays.
class PortDelayLess
{
public:
explicit PortDelayLess(const Network *network);
bool operator()(const PortDelay *delay1,
const PortDelay *delay2) const;
private:
const Network *network_;
};
} // namespace