forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parasitics.i
108 lines (95 loc) · 2.5 KB
/
Parasitics.i
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
108
%module parasitics
%{
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2024, 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/>.
#include "Sta.hh"
using sta::Sta;
using sta::cmdLinkedNetwork;
using sta::Instance;
using sta::MinMaxAll;
using sta::RiseFall;
using sta::Pin;
%}
%inline %{
bool
read_spef_cmd(const char *filename,
Instance *instance,
const Corner *corner,
const MinMaxAll *min_max,
bool pin_cap_included,
bool keep_coupling_caps,
float coupling_cap_factor,
bool reduce)
{
cmdLinkedNetwork();
return Sta::sta()->readSpef(filename, instance, corner, min_max,
pin_cap_included, keep_coupling_caps,
coupling_cap_factor, reduce);
}
void
report_parasitic_annotation_cmd(bool report_unannotated,
const Corner *corner)
{
cmdLinkedNetwork();
Sta::sta()->reportParasiticAnnotation(report_unannotated, corner);
}
FloatSeq
find_pi_elmore(Pin *drvr_pin,
RiseFall *rf,
MinMax *min_max)
{
float c2, rpi, c1;
bool exists;
Sta::sta()->findPiElmore(drvr_pin, rf, min_max, c2, rpi, c1, exists);
FloatSeq pi_elmore;
if (exists) {
pi_elmore.push_back(c2);
pi_elmore.push_back(rpi);
pi_elmore.push_back(c1);
}
return pi_elmore;
}
float
find_elmore(Pin *drvr_pin,
Pin *load_pin,
RiseFall *rf,
MinMax *min_max)
{
float elmore = 0.0;
bool exists;
Sta::sta()->findElmore(drvr_pin, load_pin, rf, min_max, elmore, exists);
return elmore;
}
void
set_pi_model_cmd(Pin *drvr_pin,
RiseFall *rf,
MinMaxAll *min_max,
float c2,
float rpi,
float c1)
{
Sta::sta()->makePiElmore(drvr_pin, rf, min_max, c2, rpi, c1);
}
void
set_elmore_cmd(Pin *drvr_pin,
Pin *load_pin,
RiseFall *rf,
MinMaxAll *min_max,
float elmore)
{
Sta::sta()->setElmore(drvr_pin, load_pin, rf, min_max, elmore);
}
%} // inline