forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSdf.i
126 lines (114 loc) · 3.38 KB
/
Sdf.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%module sdf
%{
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2023, 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 "sdf/SdfReader.hh"
#include "sdf/ReportAnnotation.hh"
#include "sdf/SdfWriter.hh"
#include "Search.hh"
#include "Sta.hh"
using sta::Sta;
using sta::cmdLinkedNetwork;
using sta::AnalysisType;
using sta::MinMax;
using sta::MinMaxAllNull;
using sta::stringEq;
using sta::readSdf;
using sta::reportAnnotatedDelay;
using sta::reportAnnotatedCheck;
%}
%inline %{
// If unescaped_dividers is true path names do not have to escape
// hierarchy dividers when the path name is quoted.
// For example verilog "\mod1/mod2 " can be referenced as "mod1/mod2"
// instead of the correct "mod1\/mod2".
// Return true if successful.
bool
read_sdf_file(const char *filename,
const char *path,
Corner *corner,
bool unescaped_dividers,
bool incremental_only,
MinMaxAllNull *cond_use)
{
cmdLinkedNetwork();
Sta *sta = Sta::sta();
sta->ensureGraph();
if (stringEq(path, ""))
path = NULL;
bool success = readSdf(filename, path, corner, unescaped_dividers, incremental_only,
cond_use, sta);
sta->search()->arrivalsInvalid();
return success;
}
void
report_annotated_delay_cmd(bool report_cells,
bool report_nets,
bool report_in_ports,
bool report_out_ports,
unsigned max_lines,
bool list_annotated,
bool list_not_annotated,
bool report_constant_arcs)
{
cmdLinkedNetwork();
Sta *sta = Sta::sta();
sta->ensureGraph();
reportAnnotatedDelay(report_cells, report_nets,
report_in_ports, report_out_ports,
max_lines, list_annotated, list_not_annotated,
report_constant_arcs, sta);
}
void
report_annotated_check_cmd(bool report_setup,
bool report_hold,
bool report_recovery,
bool report_removal,
bool report_nochange,
bool report_width,
bool report_period,
bool report_max_skew,
unsigned max_lines,
bool list_annotated,
bool list_not_annotated,
bool report_constant_arcs)
{
cmdLinkedNetwork();
Sta *sta = Sta::sta();
sta->ensureGraph();
reportAnnotatedCheck(report_setup, report_hold,
report_recovery, report_removal,
report_nochange, report_width,
report_period, report_max_skew,
max_lines, list_annotated, list_not_annotated,
report_constant_arcs, sta);
}
void
write_sdf_cmd(char *filename,
Corner *corner,
char divider,
bool include_typ,
int digits,
bool gzip,
bool no_timestamp,
bool no_version)
{
cmdLinkedNetwork();
Sta *sta = Sta::sta();
sta->writeSdf(filename, corner, divider, include_typ, digits, gzip,
no_timestamp, no_version);
}
%} // inline