forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParasitics.i
105 lines (93 loc) · 2.44 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
%module parasitics
%{
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2020, 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::ReducedParasiticType;
using sta::RiseFall;
using sta::Pin;
using sta::TmpFloatSeq;
%}
%inline %{
bool
read_spef_cmd(const char *filename,
Instance *instance,
MinMaxAll *min_max,
bool increment,
bool pin_cap_included,
bool keep_coupling_caps,
float coupling_cap_factor,
ReducedParasiticType reduce_to,
bool delete_after_reduce,
bool quiet)
{
cmdLinkedNetwork();
return Sta::sta()->readSpef(filename, instance, min_max,
increment, pin_cap_included,
keep_coupling_caps, coupling_cap_factor,
reduce_to, delete_after_reduce, quiet);
}
TmpFloatSeq *
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);
TmpFloatSeq *floats = new FloatSeq;
if (exists) {
floats->push_back(c2);
floats->push_back(rpi);
floats->push_back(c1);
}
return floats;
}
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